SA-MP Forums Archive
Help with turning a survivor into a zombie! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with turning a survivor into a zombie! (/showthread.php?tid=127590)



Help with turning a survivor into a zombie! - Lorenc_ - 13.02.2010

well this is my onplayerdeath...
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  if(killerid == INVALID_PLAYER_ID) {
    SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
  }
  else {
    if(gTeam[playerid] == TEAM_HUMAN) {
      if(gTeam[killerid] == TEAM_ZOMBIE)
        SetTimer("INFECTED", 900, 0);
      GivePlayerMoney(killerid, 1000);
    }
    if(gTeam[playerid] == TEAM_ZOMBIE) {
      if(gTeam[killerid] == TEAM_HUMAN)
        GivePlayerMoney(killerid, 1000);
    }
  }
  return 1;
}
Well when someone kills me i just dont turn in to a zombie
for the infected timer aka
Код:
SetTimer("INFECTED", 900, 0);
This is the func

Код:
public INFECTED(playerid)
{
  TogglePlayerControllable(playerid, true);
  SpawnPlayer(playerid);
  SetSpawnInfo(playerid, TEAM_ZOMBIE, 137, 1305.0315,-1806.6390,13.5469,112.9055, 4, 1, 0, 0, 0, 0);
}
Can someone help me!



Re: Help with turning a survivor into a zombie! - dice7 - 13.02.2010

pawn Код:
SetTimerEx("INFECTED", 900, 0, "d", playerid);



Re: Help with turning a survivor into a zombie! - Lorenc_ - 14.02.2010

what would that do


Re: Help with turning a survivor into a zombie! - DiddyBop - 14.02.2010

Quote:
Originally Posted by ((Lorenc))
what would that do
Sets the timer for the Player only, Using SetTimer("bla, rklgjerlkjerg and some more bla. Does it for whole server i believe.


Re: Help with turning a survivor into a zombie! - Lorenc_ - 14.02.2010

Thanks!