23.08.2011, 15:43
When the lotto ends, use
also when player connecting to the server
and on the command, above the strtok, add
What i've done here, is that the pLotto variable will be equal to 0 when the player didn't choosen any number.
If the PlayerInfo[playerid][pLotto] is not equal to 0, it means that he bought a ticket.
pawn Code:
for(new i = 0; i < MAX_PLAYERS; i++) PlayerInfo[i][pLotto] = 0;
pawn Code:
PlayerInfo[playerid][pLotto] = 0;
pawn Code:
if(PlayerInfo[playerid][pLotto] != 0) return SendClientMessage(playerid,0xff0000ff,"You have already bought a ticket.");
If the PlayerInfo[playerid][pLotto] is not equal to 0, it means that he bought a ticket.