05.10.2014, 09:02
You can do something like:
and then when a player buy cigars:
and when a player use a lighter to light one cigar:
and when a player is out of a lighter and try to smoke a cigars:
pawn Код:
new PlayerLight[MAX_PLAYERS];
new Cigars[MAX_PLAYERS];
pawn Код:
Cigars[playerid] = Cigarshere;
PlayerLight[playerid] = 10;
pawn Код:
Cigars[playerid] --;
PlayerLight[playerid] --;
pawn Код:
if(PlayerLight[playerid] == 0) return SendClientMessage(playerid,-1,"You have to buy a lighter again to smoke more!");