15.11.2014, 17:55
este ygzeb ni supo lo que copiу y pegу jajajaja DIOS primero lee y luego analiza mira el quiere que detecte el ultimo jugador con vida puedes hacer simpre:
no te quize hacer mas para que sigas tu y aprendas pero es algo asн, OJO ponle restricciones cuando devuelva una ID pregunta si el jugador estб conectado o no! Suerte
pawn Код:
#define MAX_PARTICIPANTES 10
new VariableEvento[MAX_PARTICIPANTES];
new ContEvento;
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerid != INVALID_PLAYER_ID)
{
for(new i = 0, i < MAX_PARTICIPANTES; i++)
{
if(VariableEvento[i] == playerid)
VariableEvento[i] = -1;
}
ContEvento ++;
if( ContEvento == MAX_PARTICIPANTES - 1) VerificarUltimoVivo();
}
return 1;
}
stock VerificarUltimoVivo()
{
new UltimoVivo;
for(new i = 0, i < MAX_PARTICIPANTES; i++)
if( VariableEvento[i] > -1 )
UltimoVivo = VariableEvento[i];
// LA ID del ultimo vivo es = UltimoVivo;
//aqui pon la recompensa!
return 1;
}