02.10.2012, 02:10
O correto seria sem o return 1; dentro do loop.
pawn Код:
public Lotto(number)
{
new JackpotFallen = 0;
DeletarArmasAoMorrer();
new string[256];
//new strtext[256];
new rand = random(10000);
new winner[MAX_PLAYER_NAME];
format(string, sizeof(string), "||LOTЙRICA||: O nъmero sorteado de hoje foi: %d", number);
OOCOff(COLOR_WHITE, string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(i,COLOR_YELLOW2, "||===========| GANHADORES |===========||");
if(PlayerInfo[i][pLottoNr] == number)
{
GetPlayerName(i, winner, sizeof(winner));
format(string, 256, "|| %s - R$%d Reais", winner, Jackpot);
//strcat(strtext, string);
JackpotFallen++;
}
if(JackpotFallen != 0)
{
SendClientMessage(i,COLOR_WHITE, string);
PlayerPlaySound(i,1057,0.0,0.0,0.0);
}
if(JackpotFallen == 0)
{
SendClientMessage(i,COLOR_WHITE, "|| Nenhuma pessoa foi Sorteada! ||");
PlayerPlaySound(i,1057,0.0,0.0,0.0);
}
SendClientMessage(i,COLOR_YELLOW2, "||===================================||");
if(PlayerInfo[i][pLottoNr] == number)
{
format(string, sizeof(string), "||DKS||: Parabйns! Vocк ganhou R$%d Reais da Loteria!", Jackpot);
SendClientMessage(i, COLOR_WHITE, string);
SafeGivePlayerReal(i, Jackpot);
PlayerInfo[i][pLottoNr] = 0;
}
}
}
Jackpot += rand;
format(string, sizeof(string), "||LOTЙRICA||: O prкmio mudou para R$%d Reais! O prуximo sorteio serб daqui 1 hora!", Jackpot);
OOCOff(COLOR_LIGHTBLUE, string);
return 1;
}