SA-MP Forums Archive
Weapon near. +REP. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Weapon near. +REP. (/showthread.php?tid=612070)



Weapon near. +REP. - canip0000 - 13.07.2016

I know I shouldn't be requesting here, but it's the fastest way to get an answer.

Is it possible to create a script, that will give a player a certain weapon in like, a radius of 50 from the admin that uses the command?


Re: Weapon near. +REP. - Vince - 13.07.2016

Yes.


Re: Weapon near. +REP. - Untonyst - 13.07.2016

Yes. For example

PHP код:
CMD:giveweap(playeridparams[])
{
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    foreach (new 
i:Player)
    {
        if (
IsPlayerInRangeOfPoint(i50.0xyz))
        {
            
GivePlayerWeapon(iWEAPON_MOLTOV9);
        }
    }




Re: Weapon near. +REP. - canip0000 - 13.07.2016

Wow, thanks alot Untonyst.