pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_FIRE)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
new Float:x, Float:y, Float:z,name[24],str[128];
GetPlayerPos(i, x, y, z);
GetPlayerName(playerid,name,24);
if(IsPlayerInRangeOfPoint(playerid,5,x,y,z))
{
format(str,sizeof(str),"Zombie %s has bitten you",name);
SendClientMessage(i,-1,str);
SetPlayerHealth(i,-50);
}
return 1;
}
}
return 1;
}
just an example, u can modify it,
when the fire key is pressed and any player is near zombie then he will loose -50 health