Raised This Month: $ Target: $400
 0% 

finding players num by a var


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nick123
BANNED
Join Date: Dec 2006
Old 07-24-2007 , 00:50   finding players num by a var
Reply With Quote #1

im trying check if there a x amount of players that have a global var
nick123 is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 07-24-2007 , 05:55   Re: finding players num by a var
Reply With Quote #2

Please rephrase that.
A "global var" ?!?
_Master_ is offline
nick123
BANNED
Join Date: Dec 2006
Old 07-24-2007 , 07:02   Re: finding players num by a var
Reply With Quote #3

yes for example, i have a new bool:Sexy[33]
and in some events\functions i used the var on clients sexy[id] = true
now i wanna look for how many players are sexy?
nick123 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-24-2007 , 09:45   Re: finding players num by a var
Reply With Quote #4

PHP Code:
new 0;
new 
count 0;
while (
33)
{
     if (
Sexy[k++])
          
count++;
}

//count now contains the number of clients who are sexy 
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
nick123
BANNED
Join Date: Dec 2006
Old 07-24-2007 , 15:08   Re: finding players num by a var
Reply With Quote #5

ok ty
nick123 is offline
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 08:47.


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