There's an invalid character constant did a little research trying to figure out HOW to fix it.. but I don't know how to trouble shoot at all lol so I'm stuck trying to figure out why it's not working. It should be very simple for some1 who knows what they're doing and not a noob like me
Code:
#include <amxmodx>
#define PLUGIN "No Team Unassigned"
#define VERSION "1.0"
#define AUTHOR "alan_el_more"
#define TASK_TEAM 9853
new g_count [ 33 ]
new g_jointeam [ 33 ]
new const MAX_TIME = 30
new const RAZON_KICK [ ] = "Do not choose a team"
public plugin_init ( )
{
register_plugin ( PLUGIN, VERSION, AUTHOR )
register_event ( "TeamInfo" , "fwPlayerJoinedTeam" , "a" , "2 = TERRORIST" , "2 = CT" )
}
public client_putinserver ( id )
{
g_jointeam [ id ] = 0
g_count [ id ] = MAX_TIME
set_task ( 1.0 , "check_team" , id + TASK_TEAM, _, _, "b" )
}
public check_team ( id )
{
id - = TASK_TEAM
if ( --g_count [ id ] == 0 )
{
server_cmd ( "kick #% d ^" % s ^ "" , get_user_userid ( id ) , RAZON_KICK )
}
client_print ( id, print_center, "You have% d sec to choose a team" , g_count [ id ] )
}
public fwPlayerJoinedTeam ( )
{
new id = read_data ( 1 )
if ( ! g_jointeam [ id ] )
{
// Team chosen
g_jointeam [ id ] = 1
}
else
{
// Class chosen
g_jointeam [ id ] = 0
remove_task ( id + TASK_TEAM )
g_count [ id ] = 0
}
}
public client_disconnect ( id )
{
g_count [ id ] = 0
remove_task ( id + TASK_TEAM )
}