HELLPPP!! Player Not Banned!!
#1

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!
Reply
#2

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. :/
Reply
#3

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

u missed a "{" is the begining of the public..
Reply
#5

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;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)