public LoteriaPublic()
{
new stringcm[256];
new numerosorteado = randomEx(0, 99);
new rand = random(9000);
rand += 5000;
DinheiroAcumuladoLoto += rand;
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (TaJogando[i] == 1)
{
if (vernumerosorteado[i] == numerosorteado)
{
TGanhador = i;
}
TaJogando[i] = 0;
NumeroLoto[i] = 0;
}
if (TGanhador != 0)
{
format(stringcm, sizeof(stringcm), "~g~[ ~w~Loteria ~g~] ~n~Premio Acumulado~w~ : %i~g~R$ ~n~Numero Sorteado~w~ : %i~n~~g~Ganhador ~w~: %s", DinheiroAcumuladoLoto, numerosorteado, nome(TGanhador));
TextDrawSetString(TextLoteria, stringcm);
TextDrawShowForPlayer(i, TextLoteria);
TextDrawShowForPlayer(i, BoxLoto);
GivePlayerMoney(TGanhador, DinheiroAcumuladoLoto);
SetTimerEx("DestruirTDLoto", 5000, false, "d", i);
TGanhador = -1;
}
format(stringcm, sizeof(stringcm), "~g~[ ~w~Loteria ~g~] ~n~Premio Acumulado~w~ : %iR$~g~ R$~n~Numero Sorteado~w~ : %i~n~~g~Ganhador ~w~: Niguem", DinheiroAcumuladoLoto, numerosorteado);
TextDrawSetString(TextLoteria, stringcm);
TextDrawShowForPlayer(i, TextLoteria);
TextDrawShowForPlayer(i, BoxLoto);
GivePlayerMoney(TGanhador, DinheiroAcumuladoLoto);
SetTimerEx("DestruirTDLoto", 5000, false, "d", i);
}
return 1;
}
public LoteriaPublic()
{
new stringcm[256], numerosorteado = randomEx(0, 99), rand = random(9000);
TGanhador = -1;
rand += 5000;
DinheiroAcumuladoLoto += rand;
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if (vernumerosorteado[i] == numerosorteado && TaJogando[i] == 1)
{
TGanhador = i;
GivePlayerMoney(i, DinheiroAcumuladoLoto);
}
TaJogando[i] = 0;
NumeroLoto[i] = 0;
if(TGanhador != -1) format(stringcm, sizeof(stringcm), "~g~[~w~Loteria~g~]~w~~n~Premio Acumulado~w~: %i~g~R$~n~Numero Sorteado~w~: %i~n~~g~Ganhador~w~: %s", DinheiroAcumuladoLoto, numerosorteado, nome(TGanhador));
else format(stringcm, sizeof(stringcm), "~g~[~w~Loteria~g~]~w~~n~Premio Acumulado~w~: %i~g~R$~n~Numero Sorteado~w~: %i~n~~g~Ganhador~w~: Niguem", DinheiroAcumuladoLoto, numerosorteado);
TextDrawSetString(TextLoteria, stringcm);
TextDrawShowForPlayer(i, TextLoteria);
TextDrawShowForPlayer(i, BoxLoto);
SetTimerEx("DestruirTDLoto", 5000, false, "d", i);
}
return 1;
}
public LotericaPublic()
{
new
MyString[120],
PlayerSorteado,
NumeroSorteado
;
static
PlayersOnline,
Percorrer
;
for(PlayersOnline = -1 Percorrer = GetMaxPlayers(); PlayersOnline != Percorrer; ++PlayersOnline){
if(IsPlayerConnected(PlayersOnline)){
PlayersOnline++;
}
}
PlayerSorteado = random(PlayersOnline);
NumeroSorteado = random(9000);
if(TaJogando[PlayerSorteado]){
if(vernumerosorteado[PlayerSorteado] == NumeroSorteado){
format(MyString, sizeof(MyString), "~g~[ ~w~Loteria ~g~] ~n~Premio Acumulado~w~ : %i~g~R$ ~n~Numero Sorteado~w~ : %i~n~~g~Ganhador ~w~: %s", DinheiroAcumuladoLoto, numerosorteado, nome(TGanhador));
TextDrawSetString(TextLoteria, MyString);
TextDrawShowForPlayer(i, TextLoteria);
TextDrawShowForPlayer(i, BoxLoto);
GivePlayerMoney(TGanhador, DinheiroAcumuladoLoto);
SetTimerEx("DestruirTDLoto", 5000, false, "d", i);
TGanhador = -1;
}
}
if(!TaJogando[PlayerSorteado]){
for(new Interador; Interador != PlayersOnline; ++Interador){
format(MyString, sizeof(MyString), "~g~[ ~w~Loteria ~g~] ~n~Premio Acumulado~w~ : %iR$~g~ R$~n~Numero Sorteado~w~ : %i~n~~g~Ganhador ~w~: Niguem", DinheiroAcumuladoLoto, numerosorteado);
TextDrawSetString(TextLoteria, MyString);
TextDrawShowForPlayer(Interador, TextLoteria);
TextDrawShowForPlayer(Interador, BoxLoto);
GivePlayerMoney(TGanhador, DinheiroAcumuladoLoto);
SetTimerEx("DestruirTDLoto", 5000, false, "d", Interador);
}
}
return true;
}
Bora usa camisinha ? porque dar para todos os jogadores pode pegar doenзas..
#Tуpico. pawn Код:
|
for(PlayersOnline = -1 Percorrer = GetMaxPlayers(); PlayersOnline != Percorrer; ++PlayersOnline)
C:\Users\Vitor\Desktop\Oy Oy oy\filterscripts\Loteria.pwn(81) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Vitor\Desktop\Oy Oy oy\filterscripts\Loteria.pwn(81) : warning 215: expression has no effect
C:\Users\Vitor\Desktop\Oy Oy oy\filterscripts\Loteria.pwn(81) : error 001: expected token: ")", but found ";"
C:\Users\Vitor\Desktop\Oy Oy oy\filterscripts\Loteria.pwn(81) : error 036: empty statement
C:\Users\Vitor\Desktop\Oy Oy oy\filterscripts\Loteria.pwn(81) : fatal error 107: too many error messages on one line
for(PlayersOnline = -1 Percorrer = GetMaxPlayers(); PlayersOnline != Percorrer; ++PlayersOnline);
pawn Код:
|
Avб ¬¬'
#Topico Dando erro aqui .. pawn Код:
pawn Код:
|
for(PlayersOnline = -1, Percorrer = GetMaxPlayers(); PlayersOnline != Percorrer; ++PlayersOnline)
Rjj / Garfield obrigado
![]() @ o ~n~ nгo estб funcionando ... vou ver oque posso fazer.. |
for(PlayersOnline = 0, Percorrer = GetMaxPlayers(); PlayersOnline != Percorrer; ++PlayersOnline);