07.12.2009, 15:30
Hey,well i want to make that zombie can infect other people,but it wont work,its like if someone takes some Healths away from you,you will be zombie,heres the Code,oh btw,if u got more time,can someone make me code if u die u will be zombie,thanks
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:NewArmor;
new Float:NewHP;
GetPlayerHealth(playerid,NewHP);
GetPlayerArmour(playerid,NewArmor);
if(NewHP < OldHP[playerid])
{
if(NewArmor < OldArmor[playerid])
{
new Skin = GetPlayerSkin(playerid);
if(Skin == 280 || Skin == 104 || Skin == 12 || Skin == 277)
{
format(string, sizeof(string), "~r~Infected",playerid);
GameTextForPlayer(playerid, string, 2000,5);
ZombieTeam(playerid);
SetPlayerSkin(playerid,137);
}
}
}
OldHP[playerid] = NewHP;
OldArmor[playerid] = NewArmor;
return 1;
}