Guys i want chat when player will enter / join the server if his steamid is not registered he will kick and we will decide there teams with this here you can chek my code but it is not working any one help plz
PHP Code:
/* Sublime AMXX Editor v2.2 */
#include <amxmodx>
#include <amxmisc>
#include <reapi>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Author"
new n_steamid[ MAX_PLAYERS + 1 ];
new n_connectid[ MAX_PLAYERS + 1 ];
new filename[ 256 ];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
get_configsdir(filename,255);
format(filename,255,"%s/matchplayers.ini",filename);
}
public client_authorized( id )
{
get_user_authid(id, n_connectid, charsmax( n_connectid ));
}
public client_putinserver(id)
{
new line, len, Data[ 128 ];
new team[ 8 ];
while((line = read_file( filename , line , Data , 127 , len) ) != 0 )
{
parse(Data, team,7, n_steamid,7);
if( n_connectid[id] != n_steamid[id] )
{
server_cmd("amx_kick #%s You Have No Entry To The Server^n", n_steamid);
}
if( equal( team, "CT") )
{
rg_set_user_team(id, TEAM_CT, MODEL_AUTO, true);
}
if( equal( team, "TT") )
{
rg_set_user_team(id, TEAM_TERRORIST, MODEL_AUTO, true);
}
}
}