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(playerid, params[])
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
foreach (new i:Player)
{
if (IsPlayerInRangeOfPoint(i, 50.0, x, y, z))
{
GivePlayerWeapon(i, WEAPON_MOLTOV, 9);
}
}
}
Re: Weapon near. +REP. -
canip0000 - 13.07.2016
Wow, thanks alot Untonyst.