AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP]Auto side chose (https://forums.alliedmods.net/showthread.php?t=307615)

soumyadip77 05-18-2018 09:54

[HELP]Auto side chose
 
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_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);

        }
    }





All times are GMT -4. The time now is 04:37.

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