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

Code question


Killa_
 Share

Recommended Posts

One way to do it, although not the best way would be to do this.

Find PlayerRec (server side of course) and add a variable for example
GotCake as boolean 'This is a true/false variable

Then replace your code with this….

```
Case "/ineedsomecakes"
        if player(player_index).GotCake = false then
            Call GiveInvItem(player_index, [item id], [item value])
            Call AddText("You have got some cakes!", HelpColor)
            Player(player_index).GotCake = true
        end if

```
Link to comment
Share on other sites

Killa_ when you add something to the playerrec, make sure it is as the end of the playerrec list of features

you also need to find the initialisation functions and add false as the standard value for it when a new player is created.
Link to comment
Share on other sites

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