07.09.2015, 20:14
PHP код:
new Float:Health[MAX_PLAYERS];
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(damagedid != INVALID_PLAYER_ID)
{
if(IsPlayerInRangeOfPoint(playerid, 30.0, PosX, PosY, PosZ))
{
GetPlayerHealth(damageid, Health[damageid]);
GetPlayerHealth(playerid, Health[playerid])
GameTextForPlayer(playerid, "~r~~h~PROIBIDO ~w~USO DE ARMA~r~~h~!", 5000, 3);
SetPlayerHealth(damageid, Health[damageid]);
SetPlayerHealth(playerid, (Health[playerid]-10));
SendClientMessage(playerid, -1, "[ ATENCAO ] Vocк perdeu 10 de vida por atirar em local proibido!");
}
}
return 1;
}