rcon help
#2

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
	if(!success)
{
	printf("FAILED RCON LOGIN BY IP: %s USING PASSWORD: %s",ip, password);
	new pip[16];
	for(new i=0; i<MAX_PLAYERS; i++)
{
	GetPlayerIp(i, pip, sizeof(pip));
	if(!strcmp(ip, pip, true))
{
	SendClientMessage(i, 0xFFFFFFFF, "you have been Banned for server, REASON: failed rcon login");
	new adminname[MAX_PLAYER_NAME], string[120 + MAX_PLAYER_NAME];
	GetPlayerName(i, adminname, sizeof(adminname));
	BanEx(i, "Failed Rcon Login");
	format(string, sizeof(string), "%s has been Banned for server, REASON: failed rcon login", adminname);
	SendClientMessageToAll(0xAAAAAAAA, string);
	}
}
}
	else
{
	new pip[16];
	for(new i=0; i<MAX_PLAYERS; i++)
{
	GetPlayerIp(i, pip, sizeof(pip));
	if(!strcmp(ip, pip, true))
{
	new adminname2[MAX_PLAYER_NAME], string2[120 + MAX_PLAYER_NAME];
	GetPlayerName(i, adminname2, sizeof(adminname2));
	format(string2, sizeof(string2), "%s has Logged in as a Rcon Administrator.", adminname2);
	SendClientMessageToAll(0xAAAAAAAA, string2);
}
	return 1;
}
}
	return 1;
}
extract from my gamemode
Reply


Messages In This Thread
rcon help - by Chiao - 06.10.2013, 19:11
Re: rcon help - by ic3cr3am - 06.10.2013, 20:05
Re: rcon help - by Chiao - 07.10.2013, 14:14
Re: rcon help - by Konstantinos - 07.10.2013, 14:44

Forum Jump:


Users browsing this thread: 2 Guest(s)