Ayuda con un Anti Spawnkill
#1

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerTime(playerid, 12, 00);
    SendClientMessage(playerid, BLANCO, "5 Segundos de Invulnerabilidad");
    SetTimerEx("SpawnProtectionOff", 5000, 0, "d", playerid);
    if(PlayerInfo[playerid][Swat] == 1)
    {
La Parte del OnPlayerSpawn

pawn Код:
public SpawnProtectionOff(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, ROJO, "Ahora Eres Vulnerable.");
        SetPlayerArmour(playerid, 100);
        SetPlayerHealth(playerid, 100);
    }
    return 1;
}
Cuando entras hace la proteccion spawnkill pero no termina nunca
tenes que suicidarte volves a spawnear y ahi recien te anda

Ayuda hay algun error?
Gracias
Reply
#2

Prueba poniendo esto:

/* ARRIBA DEL TODO */
new timerproteccion[MAX_PLAYERS];
/* ARRIBA DEL TODO */

/* EN OnPlayerSpawn */

luego timerproteccion[playerid] = SetTimerEx("SpawnProtectionOff", 5000, 0, "d", playerid);
/* EN OnPlayerSpawn */

/* EN EL PUBLIC public SpawnProtectionOff */

Y por ъltimo: KillTimer(timerproteccion[playerid]);
/* EN EL PUBLIC public SpawnProtectionOff */
Reply
#3

Nop sigue igual Spawneas y no termina mas el spawnkill,pones/kill volves a spawnear y ahi recien te anda sigue igual
IGUAL Gracias
Reply
#4

pawn Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerHealth(playerid, 9999999);
  SetTimerEx("AnSpawn", 10000, false, "d", playerid);
  //..
  return 1;
}

forward AnSpawn(playerid);
pubilc AnSpawn(playerid)
{
   SetPlayerHealth(playerid, 100);
   SetPlayerArmour(playerid, 100);
   SendClientMessage(playerid, color, "Tu protecciуn ah terminado");
   return 1;
}
Me es incomodo hacer codigos aquн:S dime si te funciona o hice un fail x)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)