Get Random Player
Is there a better way to do this? Sometimes it doesn't select a player.
What I'm trying to do is select a random human player at the start of each round to be the VIP. The way the server is set up, humans are on 1 team with bots on the other. Would this code cause any problems if there was only 1 human on the server? PHP Code:
|
Re: Get Random Player
It looks like all that you are doing there is selecting a random player in the server. You don't check if they are human or otherwise.
|
Re: Get Random Player
I just found what was causing my problem. I thought it was a problem in NewRound but was wrong. I was settings the value of the VIP player variable back to 0 on player death. Then on the next round there was no VIP chosen. I removed that one thing and everything is perfect.
Using flag "c" (skip bots) in get_players should only give me human players right? Or am I misunderstanding that. :shock: |
Re: Get Random Player
Quote:
|
| All times are GMT -4. The time now is 04:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.