Пользователь
- Сообщения
- 48
- Реакции
- 1
- Предупреждения
- 5
Ну с NextClient все более-менее ясно, а вот с GSClient все туманно.
native bool:is_user_authemu(const index);
not needed authemu_amxx_i386.so module ?VasyaVas990,Код:native bool:is_user_authemu(const index);
#include <amxmodx>
const AUTH_REVEMU = 4;
new const KICK_REASON[] = "Download GSClient!";
public plugin_init()
{
register_plugin("PLUGIN", "1.0", "AUTHOR");
}
public client_authorized(id)
{
CheckGsClient(id);
}
public CheckGsClient(id)
{
server_cmd("dp_clientinfo %d", id);
server_exec();
if(get_pcvar_num(get_cvar_pointer("dp_r_protocol")) == 48)
{
new iGetAuth = get_pcvar_num(get_cvar_pointer("dp_r_id_provider"));
if(iGetAuth == AUTH_REVEMU) {
query_client_cvar(id, "voice_quality", "Cvar_Check_Client", 0, "");
}
}
}
public Cvar_Check_Client(id, szCvar[], szValue[])
{
if(!equali(szValue, "Bad CVAR request")) {
return;
} else {
server_cmd("kick #%d %s", get_user_userid(id), KICK_REASON);
}
}
I want to check if this is a gs client, not old client not a steam client not a next client not another client "exactly GS clienet" :)Murz, if u wanna check without module:
Код:#include <amxmodx> const AUTH_REVEMU = 4; new const KICK_REASON[] = "Download GSClient!"; public plugin_init() { register_plugin("PLUGIN", "1.0", "AUTHOR"); } public client_authorized(id) { CheckGsClient(id); } public CheckGsClient(id) { server_cmd("dp_clientinfo %d", id); server_exec(); if(get_pcvar_num(get_cvar_pointer("dp_r_protocol")) == 48) { new iGetAuth = get_pcvar_num(get_cvar_pointer("dp_r_id_provider")); if(iGetAuth == AUTH_REVEMU) { query_client_cvar(id, "voice_quality", "Cvar_Check_Client", 0, ""); } } } public Cvar_Check_Client(id, szCvar[], szValue[]) { if(!equali(szValue, "Bad CVAR request")) { return; } else { server_cmd("kick #%d %s", get_user_userid(id), KICK_REASON); } }