Nahchito Posted April 1, 2010 Author Share Posted April 1, 2010 Hi guys, i spent the last 2 days trying to figure out how can i add the gold amount in the menu, like, under character or inventory.I'm checking in EO's source but i cant get it right.Any clues? Link to comment Share on other sites More sharing options...
ilovelisa Posted April 1, 2010 Share Posted April 1, 2010 **THIS WAS TAKEN FROM ECLIPSE ORIGINS AND I TAKE NO CREDIT FOR THIS!!!**I'll be giving variables that you'll need to used to get the amount of gold and how to display it…```Amount = CStr(GetPlayerInvItemValue(MyIndex, *INSERT 1*))```Amount is our variable to get how many gold we have.Change the *INSERT 1* to the item number you have your gold. (ex: number 14 is the item number i have set my gold to in the item editor)_________________Create a label,(NAME IT lblGold) make sure it's set to 0!!!then use this piece of code to actually update the label to how much money you have:```If GetPlayerInvItemNum(MyIndex,*SAME INSERT*) = 1 Then '1 = gold :P frmMainGame.lblGold.Caption = Format$(Amount, "#,###,###,###") End If```There you go :) Link to comment Share on other sites More sharing options...
Nahchito Posted April 1, 2010 Author Share Posted April 1, 2010 I tried extractin it from EO but i coulnd find the variable, i'll try it now. Link to comment Share on other sites More sharing options...
ilovelisa Posted April 1, 2010 Share Posted April 1, 2010 Alright, tell me how it goes Link to comment Share on other sites More sharing options...
Robin Posted April 2, 2010 Share Posted April 2, 2010 @ilovelisa:> **THIS WAS TAKEN FROM ECLIPSE ORIGINS AND I TAKE NO CREDIT FOR THIS!!!**Lol. Link to comment Share on other sites More sharing options...
Nahchito Posted April 3, 2010 Author Share Posted April 3, 2010 Uh I forgot to post:Yes, i got it working. Maybe I'll post it in Source Tutorials so people can find this edit more easily Link to comment Share on other sites More sharing options...
Zop Posted April 10, 2010 Share Posted April 10, 2010 @ilovelisa:> **THIS WAS TAKEN FROM ECLIPSE ORIGINS AND I TAKE NO CREDIT FOR THIS!!!**> > I'll be giving variables that you'll need to used to get the amount of gold and how to display it…> > ```> Amount = CStr(GetPlayerInvItemValue(MyIndex, *INSERT 1*))> ```Amount is our variable to get how many gold we have.> Change the *INSERT 1* to the item number you have your gold. (ex: number 14 is the item number I have set my gold to in the item editor)> > _________________> Create a label,(NAME IT lblGold) make sure it's set to 0!!!> then use this piece of code to actually update the label to how much money you have:> > ```> If GetPlayerInvItemNum(MyIndex,*SAME INSERT*) = 1 Then '1 = gold :P> frmMainGame.lblGold.Caption = Format$(Amount, "#,###,###,###")> End If> ```> There you go :)Well how exactly do i use this? i know changing it to frmstable nd stuff, i tried putting it in several places but i wasn't really sure what to do with it. Link to comment Share on other sites More sharing options...
Zop Posted April 21, 2010 Share Posted April 21, 2010 Can anyone help me with how to implement this in eclipse stable 1.2? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now