I already know your method but it is too slow. Like if I add any more options then the countdown from 0 to 9999 will become slow like seconds. I need a snippet which will take the id instantly without this loopy thing
I think it is impossible to instantly get the ID without Looping, since at the "PLAYER POOL memory", the Player ID is the offset Index of the information about the Player itself... You need to use a Loop to it in order to fetch it, the method is the same as searching an actor from the "Ped Pool Memory"(using loop) but this time, it is the player.
If you're making the CLEO for a specific server, change the 9999 to the max players on the server, or the highest you've ever seen it go (with some leeway). For example, if a server has max slots of 500 but it rarely goes to 350, set it to max 400.
Or you can use Opcode
0C8A since you might have sampfuncs with you:
Code:
0C8A: samp 1@ = get_max_player_id streamed_only false
Opcode
0C8A will get the Max ID that is currently Connected... If the max ID of an online user is 230 out of 1000,
0C8A will return 230 thus saving you from next useless iterations...