[AYUDA] Problema con sistema de loterнa - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [AYUDA] Problema con sistema de loterнa (
/showthread.php?tid=408975)
[AYUDA] Problema con sistema de loterнa -
godoy32 - 19.01.2013
Bueno, tengo un problema con mi sistema de loteria, sucede que al hacer el sorteo y comprobar si tiene el ticket ganador, SIEMPRE sale como si nadie ganу...
pawn Код:
stock ComienzoSorteo()
{
new ab = random(50);
new c=0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))
{
if(Numero[i]== ab)
{
c++;
Ganador(i);
}
}
}
if(c==0) NoGano(ab);
new st[128 char];
format(st,128,"LOTTO~n~~n~NUMERO GANADOR ~b~ %i",ab);
TextDrawSetString(TDLOTO,st);
return 1;
}
Creo que el problema podria estar en la linea del random.. :/
espero su ayuda
Respuesta: [AYUDA] Problema con sistema de loterнa -
iKeN - 20.01.2013
Creo que el problema esta en la condiciуn "if(!IsPlayerConnected(i))" estas verificando si el jugador no esta conectado realice la acciуn.
Respuesta: [AYUDA] Problema con sistema de loterнa -
Adoniiz - 20.01.2013
pawn Код:
stock ComienzoSorteo()
{
new ab = random(50);
new c=0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Numero[i]== ab)
{
c++;
Ganador(i);
}
}
}
if(c==0) NoGano(ab);
new st[128 char];
format(st,128,"LOTTO~n~~n~NUMERO GANADOR ~b~ %i",ab);
TextDrawSetString(TDLOTO,st);
return 1;
}
Respuesta: [AYUDA] Problema con sistema de loterнa -
godoy32 - 20.01.2013
Muchas gracias, era ese el problema