30.12.2011, 16:01
Hello,i've this lotto code to sent the jackpot money at the winner,i made some tests in my server and when i pickup the winning number,it shows the winning message but IT DOESN'T GIVE MONEY
What's wrong?
pawn Код:
if(winner != -1) //If there was a winner
{
for(new i; i<MAX_PLAYERS; i++) //checks through all players
{
new Pname[24];
GetPlayerName(i, Pname, 24);
new str[128];
SendClientMessageToAll(0x62FF32FF, "****LOTTO INFORMATION****"); //Lotto info
format(str, sizeof(str), "WE HAVE A WINNER! %s (Id: %d) won $%d!!!!", Pname, i, Jackpot);
LottoLog(str);
GivePlayerMoney(i, Jackpot);
SendClientMessageToAll(0x62FF32FF, str); //Lotto info
SendClientMessageToAll(0x62FF32FF, "Make sure you get a ticket for next draw - /lotto [1-30]"); //Lotto info
Jackpot = LOTTO_START; //Resets the jackpot
}
}