Raised This Month: $ Target: $400
 0% 

Not work ,why ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
okletsgo
Junior Member
Join Date: Aug 2011
Old 12-07-2011 , 05:01   Not work ,why ?
Reply With Quote #1

I find this code , bu not work ,why ?

Can fix this plugin ?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN ""
#define VERSION "1.0"
#define AUTHOR "scriptxxcaz"
static jointeam[] = "jointeam"
static Spectator[] = "3"
new players[32],t_num,ct_num
new players_per_team
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event"TeamInfo""join_team""a")
    
players_per_team register_cvar("amxx_playerspt","5")
}    
bool:teams_full() {
    
get_players(players,t_num,"c","T")
    
get_players(players,ct_num,"c","CT")
    new 
total_num t_num ct_num
    
if(total_num == (players_per_team 2)) return true
    
return false
}
public 
client_putinserver(id) {
    new 
full bool:teams_full()
    if(
full)
    {
        
engclient_cmd(id,jointeam,Spectator)
    }
}
public 
join_team() {
    new 
id read_data(1)
    new 
user_team[32]
    
read_data(2user_team31)    
    if(!
is_user_connected(id)) return PLUGIN_CONTINUE  
    
new msg[32]
    
format(msg,31,"echo Only %s players per team allowed",players_per_team)
    switch(
user_team[0])
    {
        case 
'C'
        {
            if(
teams_full())
            {
                
engclient_cmd(id,"disconnect")
                
engclient_cmd(id,msg)
            }
            if(
ct_num == 5)
            {
                
client_print(id,print_chat,"Counter Terrorist's have 5 players already. You must join the Terrorist's")
                
engclient_cmd(id,jointeam,Spectator)
            }
        }
        case 
'T'
        {
            if(
teams_full())
            {
                
engclient_cmd(id,"disconnect")
                
engclient_cmd(id,msg)
            }
            if(
t_num == 5)
            {
                
client_print(id,print_chat,"Terrorist's have 5 players already. You must join the Counter Terrorist's")
                
engclient_cmd(id,jointeam,Spectator)
            }
        }
    }
    return 
PLUGIN_CONTINUE

Attached Files
File Type: sma Get Plugin or Get Source (5v5.sma - 579 views - 1.9 KB)

Last edited by okletsgo; 12-07-2011 at 05:02.
okletsgo 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 20:56.


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