22.09.2010, 05:34
(
Последний раз редактировалось Kitten; 24.11.2013 в 05:19.
)
Solved
if(IsPlayerInRangeOfPoint(closest,1,x,y,z))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_FIRE))
{
new closest = GetClosestPlayer(something);
if(gTeam[playerid] == TEAM_ZOMBIE)
{
if(gTeam[closest] == TEAM_ZOMBIE) return SendClientMessage(playerid,red,"You cannot infect zombies");
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
if(IsPlayerInRangeOfPoint(closest,1,x,y,z))
{
SetPlayerSkin(closest,162);
gTeam[closest] = 1;//w
GameTextForPlayer(closest, "~r~infected!", 5000,5);
TogglePlayerControllable(closest,1);
Zombie(closest);
}
}
}
return 1;
}