Raised This Month: $12 Target: $400
 3% 

calculate


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zombieplague
Veteran Member
Join Date: Apr 2009
Old 12-10-2010 , 03:45   calculate
Reply With Quote #1

how do i calculate the total max players ? using random find num


like when there 12 players in the server, the random function will find ( total max players / ? ) = something. then find random num = ? to be terror.
zombieplague is offline
shadow.hk
Senior Member
Join Date: Dec 2008
Location: WA, Australia
Old 12-10-2010 , 03:51   Re: calculate
Reply With Quote #2

Code:
new players[ 32 ], num;
get_players( players, num );

new random = random( num );
shadow.hk is offline
Send a message via MSN to shadow.hk
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-10-2010 , 04:35   Re: calculate
Reply With Quote #3

U can get da max slots ov da server by using get_maxplayers()
and to get the amount of player's currently on server, you need to use get_playersnum()
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode