rcon kick
#1

i use this script for rcon but its work if player is Admin_Admin he can login on rcon but evry else player on server get kick i dont want evryplayer be kicked

i try lot of way to fix it but cant
so someone know how to do this?


Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success) 
    {
        for(new i=0; i<MAX_PLAYERS; i++)
        {
        	new Playername[24];
    		GetPlayerName(i, Playername, sizeof(Playername));
 			if(strcmp(Playername,"Admin_Admin",true))
	    	{
                Kick(i);
            }
        }
    }
Reply
#2

re-download the server,remove any type of admin you use,and connect in server,type rcon login password,than type /kick or /ban
Reply
#3

there get auto banned ... better there get ban ...

Код HTML:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success) //If the password was incorrect
    {
        printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
        new pip[16];
        for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
            {
				SendClientMessageToAll(0xFFFFFFFF," Banned EVADING, reason: RconLoginAttempt");                             
				PlayerPlaySound(i, 1141, 0.0, 0.0, 0.0);
			        Ban(i); //They are now banned.
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)