SA-MP Forums Archive
check everyone's x,y,z - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: check everyone's x,y,z (/showthread.php?tid=75329)



check everyone's x,y,z - Qeux - 01.05.2009

I'm not very good with loops. I run a godfather edit and when someone does /open on their house to unlock the door i want it so that the server checks everyone xyz to see if they are standing within a radius of 5 of the house entrance if they are then i want it to send a client message. i can get all the other code down i just need a way to loop all the players online to check all their xyz cords


Re: check everyone's x,y,z - [HiC]TheKiller - 01.05.2009

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
This will loop through all players. I would also suggest using playertopoint other than XYZ Cords.


Re: check everyone's x,y,z - Qeux - 01.05.2009

i was planning on useing playertopoint... thanks for the loop man


Re: check everyone's x,y,z - Qeux - 02.05.2009

resolved


Re: check everyone's x,y,z - Danny_Costelo - 02.05.2009

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) GetPlayerPos(i, X, Y, Z);