OnRconLoginAttempt won't work in 0.3d
#6

Quote:
Originally Posted by [BG]Gamer
Посмотреть сообщение
Hey guys i'm stuck with my code because OnRconLoginAttempt is not working in 0.3d . It used to work on 0.3c!
Here is the code for my OnRconLoginAttempt:
Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(!success)
{
new pname[MAX_PLAYER_NAME];
new string[128];
new stradm[128];
new pip[16];
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true))
            {
		GetPlayerName(i, pname, sizeof(pname));
		format(stradm, sizeof(stradm), "Player \"%s\" [IP: %s] failed RCON login by using password [%s]. ",GetName(i),ip, password);
		SendClientMessageToAdmins(0xFF0000AA,stradm,5);
		format(string, sizeof(string), "[KICK] %s has failed the RCON password.", pname);
                SendClientMessageToAll(COLOR_RED,string);
                PlayerDisconect(i);
		Kick(i); 
			}
        }
    }
    return 1;
}
So if you have any idea how to make this work again it will be great . Thank you!
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(!success)
{
new pname[MAX_PLAYER_NAME];
new string[128];
new stradm[128];
new pip[16];
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true))
            {
        GetPlayerName(i, pname, sizeof(pname));
        format(stradm, sizeof(stradm), "Player \"%s\" [IP: %s] failed RCON login by using password [%s]. ",pname(i),ip, password);
        SendClientMessageToAdmins(0xFF0000AA,stradm,5);
        format(string, sizeof(string), "[KICK] %s has failed the RCON password.", pname(i));
        SendClientMessageToAll(COLOR_RED,string);
        Kick(i);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
OnRconLoginAttempt won't work in 0.3d - by [BG]Gamer - 24.12.2011, 23:31
Re: OnRconLoginAttempt won't work in 0.3d - by spedico - 24.12.2011, 23:35
Re: OnRconLoginAttempt won't work in 0.3d - by [BG]Gamer - 24.12.2011, 23:38
Re: OnRconLoginAttempt won't work in 0.3d - by spedico - 24.12.2011, 23:55
Re: OnRconLoginAttempt won't work in 0.3d - by [BG]Gamer - 25.12.2011, 09:03
Re: OnRconLoginAttempt won't work in 0.3d - by Thresholdold - 25.12.2011, 09:19
Re: OnRconLoginAttempt won't work in 0.3d - by [BG]Gamer - 25.12.2011, 09:26
Re: OnRconLoginAttempt won't work in 0.3d - by Thresholdold - 25.12.2011, 09:28
Re: OnRconLoginAttempt won't work in 0.3d - by [BG]Gamer - 25.12.2011, 10:12
Re: OnRconLoginAttempt won't work in 0.3d - by Thresholdold - 25.12.2011, 10:15

Forum Jump:


Users browsing this thread: 3 Guest(s)