Код за потвърждение: Избери целия код
#include <amxmodx>
#define PLUGIN "Redirect Server New"
#define VERSION "1.2"
#define AUTHOR "Wilian M."
#define A2S_INFO_SOURCE_IDX_VERSION 2
#define A2S_INFO_SOURCE_IDX_APPID 7
#define A2S_INFO_GOLD_IDX_VERSION 9
new xCount[33], xCvarTimeRedirect, xCvarIp, xCvarPort
new xIpCvar[64]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
xCvarIp = register_cvar("rs_ip_new", "5.252.100.242")
xCvarPort = register_cvar("rs_port_new", "27025")
xCvarTimeRedirect = register_cvar("rs_time_redirect", "10")
}
public client_disconnect(id)
{
xCount[id] = false
}
public client_putinserver(id)
{
set_task(3.0, "xCountNewIp", id+887744)
xCount[id] = get_pcvar_num(xCvarTimeRedirect)
}
public xCountNewIp(id)
{
id -= 887744
if(!is_user_connected(id))
remove_task(id+887744)
get_pcvar_string(xCvarIp, xIpCvar, charsmax(xIpCvar))
if(xCount[id] < 0)
{
client_cmd(id, "wait;wait;wait;wait;wait;^"connect^" %s:%d", xIpCvar, get_pcvar_num(xCvarPort))
}
else
{
set_hudmessage(255, 0, 0, -1.0, -1.0, 2, 0.03, 1.0, 0.01, 0.02, 1)
show_hudmessage(id, "> ..::[Lipjani] Dust2 Only [+18]::.n <^n^n- Ndryshimi IP.^n- IP Reja: %s:%d^n- Redirektoheni per: %d sekonda.", xIpCvar, get_pcvar_num(xCvarPort), xCount[id])
xCount[id]--
set_task(1.0, "xCountNewIp", id+887744)
}
}