Raised This Month: $ Target: $400
 0% 

Round Counter


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ichiban
Member
Join Date: Dec 2008
Old 11-29-2010 , 06:33   Round Counter
Reply With Quote #1

I am trying to record the amount of rounds played. It is currently increasing by two instead of one. What could the problem be?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Test"
#define VERSION "1.0"
#define AUTHOR "Test"

new iRound[33];

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_event("TeamScore""teamScore""a");    
    
register_clcmd("say /round","showRound");
}

public 
teamScore()
{
    
//Increase Rounds Played for All Players
    
for(new 1<= get_maxplayers(); i++)
    {
        if(
is_user_connected(i))
        {
            if (!(
cs_get_user_team(i) == CS_TEAM_SPECTATOR))
            {
                
iRound[i]++;
            }
        }
    }
}

public 
showRound(id)
{
    
client_print(idprint_chat"You have played %i rounds"iRound[id]);

ichiban is offline
 



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 11:18.


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