Raised This Month: $ Target: $400
 0% 

Error 010: invalid function or declaration


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 11-06-2011 , 04:15   Re: Error 010: invalid function or declaration
Reply With Quote #3

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#include <cstrike>

new gp_TeamRatio
new gp_CtMax
new CTCount
new TCount

public plugin_init()
{
        
gp_TeamRatio register_cvar("jb_teamratio""3")
        
gp_CtMax register_cvar("jb_maxct""6")
}

public 
count_teams()

{
    
CTCount 0
    TCount 
0

    
new Players[32
    new 
playerCount
    get_players
(PlayersplayerCount""
    for (
i=0i<playerCounti++) 
    {
        if (
is_user_connected(Players[i])) 
        {
            if (
cs_get_user_team(Players[i]) == CS_TEAM_CTCTCount++;
            if (
cs_get_user_team(Players[i]) == CS_TEAM_TTCount++;
        }
    }
    
    
    
    
}

bool:is_ct_allowed()
{



new 
count
count 
= ((TCount CTCount) / get_pcvar_num(gp_TeamRatio))
if(
count 2)
    
count 2
    
    
else if(count get_pcvar_num(gp_CtMax))
        
count get_pcvar_num(gp_CtMax)
         if( 
count CTCount )
    {
             
remove_task(id)
        return 
PLUGIN_CONTINUE

    
}     
         else
    {
             
engclient_cmd(id"chooseteam"
        return 
PLUGIN_HANDLED  
         
}
}

public 
client_disconnect(id)
        {
        
count_teams()
        }

public 
jointeam(id)
        {
        return 
PLUGIN_HANDLED

__________________
kiki33hun 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 14:28.


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