26.04.2012, 08:51
Hi Every one i tried to make bite system no error but script i mean Bite System does't work
Check
then
Check
Код:
#define KEY_AIM (128)
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { new Float:health; if(newkeys & KEY_AIM) { if(gTeam[playerid] == TEAM_ZOMBIES) { new victimid = GetClosestPlayer(playerid); GetPlayerHealth(victimid, health); if(gTeam[victimid] == TEAM_HUMANS) { if(GetDistanceBetweenPlayers(playerid,victimid) < 2) { SetPlayerHealth(victimid, health - 6.0); GameTextForPlayer(victimid, "~p~Biten", 1000, 3); PlayerPlaySound(playerid, 1136, 0, 0, 0); PlayerPlaySound(victimid, 1136, 0, 0, 0); } } } } return 1; }