AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   finding players num by a var (https://forums.alliedmods.net/showthread.php?t=58332)

nick123 07-24-2007 00:50

finding players num by a var
 
im trying check if there a x amount of players that have a global var

_Master_ 07-24-2007 05:55

Re: finding players num by a var
 
Please rephrase that.
A "global var" ?!?

nick123 07-24-2007 07:02

Re: finding players num by a var
 
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?

YamiKaitou 07-24-2007 09:45

Re: finding players num by a var
 
PHP Code:

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

//count now contains the number of clients who are sexy 


nick123 07-24-2007 15:08

Re: finding players num by a var
 
ok ty


All times are GMT -4. The time now is 21:30.

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