House help
#1

Okay I set a player to have 1house key but i want to create a donate were I am able to
Код:
/upgrade [id] housekey [amount]
And the player would now be able to have more house keys for the amount i enter in the dini info
Reply
#2

Dude dude dude... We are not a kid of magician to know how your house system is set...

At least try make it yourself, then post here the bugs...
Reply
#3

Use two arrays, one holds the keys, one is a boolean like this:

pawn Код:
enum HouseInfo /* or whatever u haz */
{
    bool:KeyEnable[MAX_KEYS],
    Keys[MAX_KEYS]
};

/* then in your command u check if KeyEnable[KEYID] and if it is, you allow him to have a key on that array
    and in order for you to check if he still has keys left u just loop through MAX_KEYS and check if theres one
    which is KeyEnable but Keys is not set yet. Simple.
*/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)