Potrafi ktoś zeedytować plugin, dzięki któremu do CT mogą wchodzić gracze only STEAM, aby działał tak, żeby mogli do niego wchodzić także gracze NonSteam, którym nadam daną flagę w users.ini ?, dajmy na to "ADMIN_LEVEL_E" ( flaga 'q' ).
Za pomoc wielki ++
#include <amxmodx>
#include <cstrike>
#include <colorchat>
#define PLUGIN "Only STEAM in CT"
#define VERSION "1.0"
#define AUTHOR "Raku"
#pragma semicolon 1
const AUTH_STEAM = 2;
new bool: dproto_installed;
new pcv_dp_r_id_provider;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
if ( cvar_exists( "dp_version" ) )
{
dproto_installed = true;
pcv_dp_r_id_provider = get_cvar_pointer("dp_r_id_provider");
}
else
{
dproto_installed = false;
pcv_dp_r_id_provider = 0;
}
register_event("TeamInfo","team_assign","a");
}
public team_assign()
{
new id = read_data(1);
if(!is_user_steam(id))
{
new team[32];
read_data(2, team, charsmax(team));
if(equal(team,"CT"))
{
ColorChat(id, RED, "Tylko gracze steam moga byc staraznikiem!");
cs_set_user_team(id, CS_TEAM_T);
return PLUGIN_HANDLED;
}
}
return PLUGIN_HANDLED;
}
stock bool: is_user_steam(id)
{
if ( dproto_installed )
{
server_cmd("dp_clientinfo %d", id);
server_exec();
static uClient;
uClient = get_pcvar_num(pcv_dp_r_id_provider);
if ( uClient == AUTH_STEAM )
return true;
}
else
{
static sAuthID[32];
get_user_authid(id, sAuthID, charsmax(sAuthID) );
if ( containi( sAuthID, "STEAM_0:" ) > -1 )
return true;
}
return false;
}