Raised This Month: $ Target: $400
 0% 

Looping through all players and getting global variable


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 06-19-2009 , 02:48   Re: Looping through all players and getting global variable
Reply With Quote #4

Bug.
Imagine in the server are 11 players and get_pcvar_num(cvar_tickets) = 2
It will print always when kill : "Preds Remaining : 21,then in second kill 41, in third global kill 60 etc...
I don't need to "+" :/ So how to fix
PHP Code:
public Ev_RoundRestart()
{
    for (new 
id 1id <= g_maxplayersid++)
    {
        
g_Tickets[id] = get_pcvar_num(cvar_tickets)
    }

PHP Code:
cvar_tickets register_cvar("amx_tickets""2"// Give X tickets on round start. 

Last edited by xbatista; 06-19-2009 at 02:51.
xbatista is offline
Send a message via Skype™ to xbatista
 



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 15:41.


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