SA-MP Forums Archive
[Ajuda] Proibir atirar em certos locais - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Proibir atirar em certos locais (/showthread.php?tid=588325)



Proibir atirar em certos locais - maxblaya01 - 07.09.2015

tem como eu fazer no samp igual no mta proibir atirar em alguns locais? , se tiver alguem me passa um code ae como fazer isso.. agradeзo


Re: PROIBIR - [BOPE]Seu._.Madruga - 07.09.2015

PHP код:
new Float:Health[MAX_PLAYERS];
public 
OnPlayerGiveDamage(playeriddamagedidFloatamountweaponid)
{
    if(
damagedid != INVALID_PLAYER_ID)
    {
        if(
IsPlayerInRangeOfPoint(playerid30.0PosXPosYPosZ))
        {
            
GetPlayerHealth(damageidHealth[damageid]);
            
GetPlayerHealth(playeridHealth[playerid])
            
GameTextForPlayer(playerid"~r~~h~PROIBIDO ~w~USO DE ARMA~r~~h~!"50003);
            
SetPlayerHealth(damageidHealth[damageid]);
            
SetPlayerHealth(playerid, (Health[playerid]-10));
            
SendClientMessage(playerid, -1"[ ATENCAO ] Vocк perdeu 10 de vida por atirar em local proibido!");
        }
    }
    return 
1;