Raised This Month: $ Target: $400
 0% 

getting players, not working.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
devWaleed
Member
Join Date: Apr 2013
Location: Karachi, Pakistan
Old 07-20-2013 , 07:31   getting players, not working.
Reply With Quote #1

I don't know why this isn't working.

PHP Code:
get_players playersnum 
    for (new 
0i<numi++){
        
tempid    players[i]
        if(
cs_get_user_team(tempid) == CS_TEAM_T && is_user_alive(tempid)) t_count++;
        if(
cs_get_user_team(tempid) == CS_TEAM_CT && is_user_alive(tempid)) ct_count++;
    } 
It should get all team players for CT including bots, It firstly shows correct CT count, I have put it in /show event. So when I retype /show it doubles the CT count, for another /show. It doubles again and so on.

Why doesn't it work? I have tried it with live players too.

Last edited by devWaleed; 07-20-2013 at 07:34. Reason: Sorry, provided wrong code.
devWaleed is offline
Send a message via Skype™ to devWaleed
 



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 06:26.


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