Verify online users.
I need a little help to my script. I don't know is there exist a command to check if there are online users like:
PHP Code:
|
Re: Verify online users.
With get_players you can do that.get_players()
If second parameter (&num) is 0, there are nor players in the server Also, function is_user_connected() return if the user is connected or not. |
Re: Verify online users.
PHP Code:
|
Re: Verify online users.
Thank you for fast reply. I solved the problem.
(I have a war server and I want to make additional scripts, to moderate the game if there is no admins online.) I have a second question about "maximum team score". So is there 2 players, one CT and one T, and somebody reach the maximum score allowed, suddenly both get's a team switch. Eg. T reach 10 allowed score and he will be changed to CT, and the CT player changed to T, after the switch the game will be restarted. Any ideas? |
Re: Verify online users.
Quote:
PHP Code:
|
Re: Verify online users.
PHP Code:
PHP Code:
PHP Code:
|
Re: Verify online users.
Use cs_get_user_team() if it's for CS. And you're retrieving same players' teams twice for unknown reason.
|
Re: Verify online users.
Quote:
To get the victim, use something like new iVictim = read_data(2) |
Re: Verify online users.
PHP Code:
|
Re: Verify online users.
Quote:
|
| All times are GMT -4. The time now is 10:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.