09.06.2012, 20:15
Quote:
I made like
If a zombie kills human, the human turns into zombie after death but how do I make like If a zombie kills human, zombie turns into human? This is the human to zombie one pawn Code:
But I tried to make zombie into human but it doesn't work. pawn Code:
|
pawn Code:
if(gTeam[killerid] == TEAM_ZOMBIE) return gTeam[playerid] = TEAM_ZOMBIE, GameTextForPlayer(playerid,"~r~Infected",3000,4);
pawn Code:
if(gTeam[killerid] == TEAM_ZOMBIE) return gTeam[killerid] = TEAM_HUMAN, GameTextForPlayer(killerid,"~r~Cured",3000,4);
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[killerid] == TEAM_ZOMBIE)
{
gTeam[playerid] = TEAM_ZOMBIE
GameTextForPlayer(playerid,"~r~Infected",3000,4);
}
if(gTeam[killerid] == TEAM_HUMAN) //this was TEAM_ZOMBIE, but if you wanted it that..You would need to add a check for the players current team or the above would be useless
{
gTeam[killerid] = TEAM_HUMAN
GameTextForPlayer(killerid,"~r~Cured",3000,4);
}
return 1;
}