24.10.2018, 01:56
PHP код:
stock IsPlayerInRC(playerid)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if(Pos[0] >= 1435.4246 && Pos[1] >= -1720.3379 && Pos[0] <= 1522.1321 && Pos[1] <= -1600.3434) return 1; // Prefeitura
else if(Pos[0] >= 1290.7766 && Pos[1] >= -1720.0077 && Pos[0] <= 1034.1986 && Pos[1] <= -1842.6490) return 1; // Spawn Civil
else if(Pos[0] >= 1249.3438 && Pos[1] >= -1288.7474 && Pos[0] <= 1069.0786 && Pos[1] <= -1387.2887) return 1; // Hospital
return 0;
}
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) {
if(IsPlayerInRC(playerid)) return printf("%d estб em бrea neutra.", playerid);
return 1;
}