31.10.2010, 23:04
(
Последний раз редактировалось Kitten; 24.11.2013 в 05:05.
)
Solved
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(cTeam[playerid] == ZOMBIE)
if(newkeys & KEY_FIRE)
{
if(GetPlayerWeapon(playerid) == 4)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid2, x+2, y+2, z)) return Infected(playerid2);
return 1;
}
}
return 1;
}
new float:zx,float:zy,float:zz; GetPlayerPoz(playerid,zx,zy,zz); for new(z=0;z<MAX_PLAYERS,z++){ if(!IsPlayerConnected(z))continue; if(IsPlayerInRangeOfPoint(z,zx,zy,zz){ GetPlayerHealth(z,zh[playerid]); } }