12.06.2012, 05:01
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.
*/