max clients and xxx% of...
hi.
how can i get xx% of maxclients? for example 12 users are on server and i want to catch if are 50% of this 12 users alive. i think there was anything like this with the same question but i'm still searching around 15 min. and i cant find it :( |
Re: max clients and xxx% of...
Try this:
PHP Code:
|
Re: max clients and xxx% of...
counter = 0;
loop from 0 to maxplayers-1{ is_alive(x) counter++; } then get_playersnum() & do the math edit: damn, Seta00 was faster :P but he's made some mistakes: -for should start from 0 -maxplayers should be get_playersnum() in percentage calculation |
Re: max clients and xxx% of...
he has not, but you has :P
|
Re: max clients and xxx% of...
Why do so many people not know how to loop through all players using get_maxplayers()?
Code:
|
Re: max clients and xxx% of...
My bad, I'm used to things starting from 0 to max-1 :(
|
Re: max clients and xxx% of...
Quote:
|
Re: max clients and xxx% of...
ty guys :P
|
| All times are GMT -4. The time now is 07:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.