Next PlayerID - 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: Next PlayerID (
/showthread.php?tid=491539)
Next PlayerID -
Kyance - 31.01.2014
I'm testing stuff with radars etc, and i would want to know how do you detect the next player id?
For an example:
If i'm checking/aiming at
ID 2, then if i press let's say "Left Mouse Button", then it would check/aim at
ID 3.
Is it like BLABLA[id]++; etc..?
If so, could someone give me an example on any command?
Re: Next PlayerID -
Konstantinos - 31.01.2014
Use foreach and Iter_Next function. An example would be:
pawn Код:
Iter_Next(Player, playerid)
and it will return the next valid ID.
Re: Next PlayerID -
Kyance - 31.01.2014
Quote:
Originally Posted by Konstantinos
Use foreach and Iter_Next function. An example would be:
pawn Код:
Iter_Next(Player, playerid)
and it will return the next valid ID.
|
Ah alright, will try it later, thanks!