Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Gold amount on menu


Nahchito
 Share

Recommended Posts

**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

@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

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...