SA-MP Forums Archive
HELLPPP!! Player Not Banned!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HELLPPP!! Player Not Banned!! (/showthread.php?tid=482606)



HELLPPP!! Player Not Banned!! - AnonymouseSAMP - 21.12.2013

I Have This Code to logged in rcon i use settimer on rcon login
pawn Код:
public Hacker(playerid)
new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
 if(strcmp(pname, "Lol", true) == 0)
    {
        return 1;
    }
    else
    {
        SendClientMessage(playerid,COLOR_BLUE,"You Are Not Allowed To Login RCON!!!!!!!!!!!!!!!!!!");
        Ban(playerid);
    }
    return 1;
}
But the server didnt ban the player who not allowed to logged in rcon!


Re: HELLPPP!! Player Not Banned!! - Hansrutger - 21.12.2013

So what you've written is: if the playername is "Lol" then do nothing, but if everything else then ban? Dunno' mate what you actually want to do. :/


Re: HELLPPP!! Player Not Banned!! - Excelize - 22.12.2013

Yeah, this command is just really messed up, and pretty dumb..


Re: HELLPPP!! Player Not Banned!! - newbie scripter - 22.12.2013

u missed a "{" is the begining of the public..


Re: HELLPPP!! Player Not Banned!! - iThePunisher - 22.12.2013

hey bro use this ,is simple you can find it at samp wiki.....
this will ban parament the players who try to open rcon password...


pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success) //if he type wrong password
    {
        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))
            {
                SendClientMessage(i, 0xFFFFFFFF, "You have been parament banned"); //type what message you want
                Ban(i); //this will ban him parament
            }
        }
    }
    return 1;
}