View Single Post
Author Message
FarHaN_ShaiKh
New Member
Join Date: Sep 2020
Old 10-26-2020 , 03:14   [Help] auto side choose
Reply With Quote #1

Guys i want a plugin, when a player will enter/join the server if his steamid is not registered he will kick and we will decide their teams by their steam id, here you can check a code which i got from a friend but it is not working anyone plz help.

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

#define PLUGIN  "New Plug-In"
#define VERSION "1.0"
#define AUTHOR  "Author"

new n_steamidMAX_PLAYERS ];
new 
n_connectidMAX_PLAYERS ];
new 
filename256 ];

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
get_configsdir(filename,255);
    
format(filename,255,"%s/matchplayers.ini",filename);
}

public 
client_authorizedid )
{
    
get_user_authid(idn_connectidcharsmaxn_connectid ));
}

public 
client_putinserver(id)
{
    new 
linelenData128 ];
    new 
team];

    while((
line read_filefilename line Data 127 len) ) != 
    {
          
parse(Datateam,7n_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( 
equalteam"CT") )
          {
              
rg_set_user_team(idTEAM_CTMODEL_AUTOtrue);

        }

        if( 
equalteam"TT") )
          {
              
rg_set_user_team(idTEAM_TERRORISTMODEL_AUTOtrue);

        }
    }


FarHaN_ShaiKh is offline