#include <amxmodx>
#include <amxmisc>
#include <nvault>
#include <colorchat>
#define PLUGIN "Anti Steam Id Changer"
#define VERSION "1.0"
#define AUTHOR "Tax1r"
new SVault
new authid[ 35 ], szip[ 35 ]
new authid2[ 35 ], szip2[ 35 ]
new name[ 33 ]
public plugin_init() {
register_plugin("Anti Steam Id Changer", "1.0", "Tax1r")
SVault = nvault_open( "AntiSteamIDChanger" )
}
public plugin_end()
nvault_close( SVault )
public client_authorized(id) {
LoadSteam(id);
}
public client_disconnect(id) {
SaveSteam(id);
}
public SaveSteam(id) {
if(is_user_bot(id) || is_user_hltv(id)) {
return PLUGIN_HANDLED
}
get_user_authid(id, authid, charsmax(authid))
get_user_ip(id, szip, charsmax(szip), 0)
new vaultkey[71]
new vaultdata[256]
format(vaultkey,70,"%s-IP", szip)
format(vaultdata,255,"%s-SteamID", authid)
nvault_set(SVault, vaultkey, vaultdata)
get_user_name(id, name, charsmax(name))
get_user_authid(id, authid2, charsmax(authid2))
get_user_ip(id, szip2, charsmax(szip2), 0)
if(equal(szip2, szip)) {
if(!equal(authid2, authid)) {
client_print(id, print_console, "[Tűzfal] %s Ki lett rúgva SteamID váltás miatt!", name);
server_cmd("kick ^"%s^" ^"[Tűzfal] Kirúgva SteamID váltás miatt!^"", name)
log_amx("[Tűzfal] %s Kirúgva SteamID váltás miatt!", name)
ColorChat(0, RED, "[Tűzfal] ^4%s ^3Kirúgva ^4SteamID ^3váltás ^1miatt!", name);
}
}
return PLUGIN_HANDLED
}
public LoadSteam(id) {
if(is_user_bot(id) || is_user_hltv(id)) {
return PLUGIN_HANDLED
}
new vaultkey[71]
new vaultdata[256]
format(vaultkey,70,"%s-IP", szip)
format(vaultdata,255,"%s-SteamID", authid)
nvault_set(SVault, vaultkey, vaultdata)
get_user_name(id, name, charsmax(name))
get_user_authid(id, authid2, charsmax(authid2))
get_user_ip(id, szip2, charsmax(szip2), 0)
if(equal(szip2, szip)) {
if(!equal(authid2, authid)) {
client_print(id, print_console, "[Tűzfal] %s Ki lett rúgva SteamID váltás miatt!", name);
server_cmd("kick ^"%s^" ^"[Tűzfal] Kirúgva SteamID váltás miatt!^"", name)
log_amx("[Tűzfal] %s Kirúgva SteamID váltás miatt!", name)
ColorChat(0, RED, "[Tűzfal] ^4%s ^3Kirúgva ^4SteamID ^3váltás ^1miatt!", name);
}
}
return PLUGIN_HANDLED
}
stock print_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")
replace_all(msg, 190, "á", "á")
replace_all(msg, 190, "é", "Ă©")
replace_all(msg, 190, "í", "Ă")
replace_all(msg, 190, "ó", "Ăł")
replace_all(msg, 190, "ö", "ö")
replace_all(msg, 190, "ő", "Ĺ‘")
replace_all(msg, 190, "ú", "Ăş")
replace_all(msg, 190, "ü", "ĂĽ")
replace_all(msg, 190, "ű", "ű")
replace_all(msg, 190, "Á", "Ă")
replace_all(msg, 190, "É", "É")
replace_all(msg, 190, "Í", "ĂŤ")
replace_all(msg, 190, "Ó", "Ă“")
replace_all(msg, 190, "Ö", "Ă–")
replace_all(msg, 190, "Ő", "Ĺ")
replace_all(msg, 190, "Ú", "Ăš")
replace_all(msg, 190, "Ü", "Ăś")
replace_all(msg, 190, "Ű", "Ĺ°")
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i])
write_string(msg)
message_end()
}
}
}
return PLUGIN_HANDLED
}