Lotto System Bug
#2

When the lotto ends, use
pawn Code:
for(new i = 0; i < MAX_PLAYERS; i++) PlayerInfo[i][pLotto] = 0;
also when player connecting to the server
pawn Code:
PlayerInfo[playerid][pLotto] = 0;
and on the command, above the strtok, add
pawn Code:
if(PlayerInfo[playerid][pLotto] != 0) return SendClientMessage(playerid,0xff0000ff,"You have already bought a ticket.");
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.
Reply


Messages In This Thread
Lotto System Bug - by Join7 - 23.08.2011, 14:40
Re: Lotto System Bug - by Amit_B - 23.08.2011, 15:43
Re: Lotto System Bug - by FireCat - 23.08.2011, 15:46
Re: Lotto System Bug - by Join7 - 23.08.2011, 16:36
Re: Lotto System Bug - by Join7 - 24.08.2011, 17:58

Forum Jump:


Users browsing this thread: 1 Guest(s)