0 players on server
Hi , i want a code , when all players from server disconnect and on server are 0 players to change the map, can someone help me with this?
|
Re: 0 players on server
Check if get_playersnum( ) equals 1 on client_disconnect, then change the map?
|
Re: 0 players on server
hmm.... it'l be smth like this yeap?
PHP Code:
|
Re: 0 players on server
No, why are you looping through the players? get_players already gives you the amount of players which is "iNum". You can specify whether it ignore bots in the flags, look up how to use the function on Google.
Also, I said the player count should be 1. Check against if( iNum == 1 ). client_disconnect is called before get_players and get_playersnum results are updated, so it will give you 1 if the last player disconnected. |
| All times are GMT -4. The time now is 09:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.