Detectar ъltimo jugador vivo.
#5

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:


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;
}
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
Reply


Messages In This Thread
Detectar ъltimo jugador vivo. - by xSeveNx - 15.11.2014, 16:05
Respuesta - by Ygzeb - 15.11.2014, 16:36
Respuesta: Respuesta - by jotajeda - 15.11.2014, 16:50
Respuesta: Detectar ъltimo jugador vivo. - by jotajeda - 15.11.2014, 17:11
Re: Detectar ъltimo jugador vivo. - by Mr.GeEk - 15.11.2014, 17:55
Respuesta - by Ygzeb - 15.11.2014, 18:04
Respuesta: Respuesta - by xSeveNx - 15.11.2014, 19:50
Respuesta: Respuesta - by jotajeda - 15.11.2014, 19:54
Respuesta: Respuesta - by xSeveNx - 15.11.2014, 19:58
Respuesta: Respuesta - by jotajeda - 15.11.2014, 20:01

Forum Jump:


Users browsing this thread: 1 Guest(s)