Zombie Kill Help - 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)
+--- Thread: Zombie Kill Help (
/showthread.php?tid=372848)
Zombie Kill Help -
Deaglez - 28.08.2012
Can anyone teach me how to do this. Example; Im a zombie, when i kill a human,
the human will turn into a zombie.
I will gave you 1+rep ;(
Re: Zombie Kill Help -
cod5devious - 28.08.2012
if(gTeam[killerid] == TEAM_ZOMBIE)
{
gTeam[playerid] = TEAM_ZOMBIE;
GameTextForPlayer(playerid,"~y~Infected",3000,4);
}
Re: Zombie Kill Help -
_Khaled_ - 28.08.2012
pawn Код:
if(gTeam[killerid] == TEAM_ZOMBIE)
{
gTeam[playerid] = TEAM_ZOMBIE;
GameTextForPlayer(playerid,"~y~Infected",3000,4);
SendClientMessage(playerid,COLOR_RED,"You have been infected by a zombie, You're now one of them");
return 1;
}
Re: Zombie Kill Help - Jarnu - 28.08.2012
pawn Код:
new Infected[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
Infected[playerid] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[killerid] == ZOMBIE)
{
Infected[playerid] = 1;
ForceClassSelection(playerid);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(Infected[playerid] == 1)
{
gTeam[playerid] = ZOMBIE;
Infected[playerid] = 0;
SpawnPlayer(playerid); //it is to set his skin and spawn..
}
return 1;
}