Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
Hello there.
I am currently attempting to form an advanced spectating system and I would like to make it so a player could press a button and then they would spectate the next connected player. How can I do this properly? I want to avoid unconnected players obviously...
Posts: 1,751
Threads: 20
Joined: Nov 2010
Reputation:
0
Are you using zcmd, strcmp, dini .. ? Which one are you using ?
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
Kind of. Although, why are you using "whoid + 1" instead of "whoid?" Why are you adding the one to the ID?
I am trying to make it so if a player isn't connected, it moves to the next ID. It should keep doing that until it finds a connected ID. Any thoughts?
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
I basically need a function which will choose the next available player ID.
For example:
I am spectating player ID 43 and I want to spectate the next player, I push LMB and it should advance to the next player (i.e. ID 52). I don't want to need to push LMB 9 times in order to get to ID 52- it should automatically choose the next player and return the ID.
Does this make sense?
Posts: 977
Threads: 10
Joined: Apr 2011
Reputation:
0
There is an EXACT example of what you're trying to accomplish in the Barron gamemode that comes with the SA:MP Server Package.