Raised This Month: $ Target: $400
 0% 

get_playersnum exclude HLTV


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sparkey
Senior Member
Join Date: May 2010
Old 06-08-2010 , 18:13   get_playersnum exclude HLTV
Reply With Quote #1

Hi there,

Is there any way to exclude a hltv from being counted in the get_playersnum function or a similar function. Today i have a piece of coding looking kinda like this:

Code:
public client_disconnect(id)
{
    if (get_playersnum(1) <= 1)
    {
        remove_task(TASKID_RESET);
        reset();
    }
}
When all of the players are disconnected it stops the reset function.
My dilemma now is that it is ofcource counting the HLTV as a player and therefore it does not remove the task.

I know i can change it to if (get_playersnum(1) <= 2) but then everything depends on the HLTV being connected which it might not be all the time.

I'm very thankfull for your answers. Thx!
sparkey is offline
 


Thread Tools
Display Modes

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 05:19.


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