SA-MP Forums Archive
[Include] GetClosestPlayer ( With Virtualworld and Distance detection ) - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] GetClosestPlayer ( With Virtualworld and Distance detection ) (/showthread.php?tid=506722)



GetClosestPlayer ( With Virtualworld and Distance detection ) - nGen.SoNNy - 14.04.2014

Function:
pawn Код:
GetClosestPlayer( playerid, checkvw = false, Float:range = FLOAT_INFINITY )
Example:
pawn Код:
new targetid = GetClosestPlayer( playerid, .checkvw = true, .range = 2.0 ); // This will get the closest player in a range of 2.0 meters with the save virtual world
PasteBin: http://pastebin.com/1Gt0E8ss

Instructions: Put this file in the "include" folder of your pawn compiler and after that include it in your main script after
pawn Код:
#include a_samp and #include foreach
you can include it like this:
pawn Код:
#include GCP
Foreach Include: https://sampforum.blast.hk/showthread.php?tid=92679


Re: GetClosestPlayer ( With Virtualworld and Distance detection ) - iAnonymous - 16.04.2014

Quote:
Originally Posted by xF4Life
Посмотреть сообщение
Useful FS, nice.
It's not an FS !

OT :
This is very simple but Many people will find it useful
Thanks for sharing !


Re: GetClosestPlayer ( With Virtualworld and Distance detection ) - Riddick94 - 17.04.2014

******' code.


Re: GetClosestPlayer ( With Virtualworld and Distance detection ) - nGen.SoNNy - 25.04.2014

Sorry mate... i didn't knew it I have this function since the last summer from somebody else... ! I apologize..


Re: GetClosestPlayer ( With Virtualworld and Distance detection ) - nGen.SoNNy - 29.11.2014

UP


Re: GetClosestPlayer ( With Virtualworld and Distance detection ) - Lordzy - 29.11.2014

Quote:
Originally Posted by nGen.SoNNy
Посмотреть сообщение
Sorry mate... i didn't knew it I have this function since the last summer from somebody else... ! I apologize..
Then what's the point in releasing such an include without crediting them?


Re: GetClosestPlayer ( With Virtualworld and Distance detection ) - iFarbod - 29.11.2014

What a Bump ...


Re: GetClosestPlayer ( With Virtualworld and Distance detection ) - Steel_ - 29.11.2014

Quote:
Originally Posted by iFarbod
Посмотреть сообщение
What a Bump ...
So? It's a release even if it was 6 Years old i could still bump it if i needed to ask a question or somthing.


Re: GetClosestPlayer ( With Virtualworld and Distance detection ) - Hirsw0w - 01.12.2014

I have a question about the range...

that really stupid option... this take the closest player that not meter the range... if that will be 999999 range or 15000 range the returning id will be the same.