25.04.2013, 01:37
So i scripted this system and the problem is... Zombies can bite Zombies.. I need help with making it so they cannot bite each other.. They may only bite Humans.
Quote:
if(newkeys == 12 { new victim = GetClosestPlayer(playerid); if(PlayerInfo[playerid][Zombie] == 0) { SendClientMessage(playerid, COLOR_UNEMD, "SERVER: You are not a Zombie."); return 1; } if(PlayerInfo[playerid][Zombie] == 1) { if(GetDistanceBetweenPlayers(playerid, victim)) { GameTextForPlayer(victim,"[Zombie]: ~w~Arghh!",6000,5); PlayerPlaySound(victim, 1130, 0.0, 0.0, 0.0); PlayerPlaySound(playerid, 1130, 0.0, 0.0, 0.0);// PlayerInfo[victim][Zombie] = 1; format(string, sizeof(string), "%s rushes over to %s biting him.", GetPlayerNameEx(playerid), GetPlayerNameEx(victim)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); GetPlayerHealth(victim, health); SetPlayerHealth(victim, health-31); } else { GameTextForPlayer(playerid,"[ZOMBIE:] There is no one around.",6000,5); } } } |