Rcon Login via SendRconCommand
#1

Is this even possible?

I have made an attempt which fails quite nicely. lol

pawn Код:
public OnPlayerConnect(playerid)
{
    new name[8];
    GetPlayerName(playerid, name, 8);
    if(strcmp(name, "Infamous", true))
    {
        SendRconCommand("login password");
    }
    return 1;
}
Reply
#2

Yeah, it is possible

i did a code that do this, here:

pawn Код:
public OnPlayerRequestClass(playerid)//Or OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    if(strcmp(name,"Infamous",true)==0)
    {
        SendRconCommand("login password");//Change "password" for your Rcon Password :)
    }
    return 1;
}
I hope that i have helped
Reply
#3

so if i would connect with ur nick 0.0 i would automaticaly rcon login infamous?

(make it on login :P less abusive)

and shouldnt it be
pawn Код:
(!strcmp(name,"Infamous",true))
Reply
#4

Quote:
Originally Posted by rjjj
Посмотреть сообщение
Yeah, it is possible

i did a code that do this, here:

pawn Код:
public OnPlayerRequestClass(playerid)//Or OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    if(strcmp(name,"Infamous",true)==0)
    {
        SendRconCommand("login password");//Change "password" for your Rcon Password :)
    }
    return 1;
}
I hope that i have helped
Thanks for your help mate.

Quote:
Originally Posted by selten98
Посмотреть сообщение
so if i would connect with ur nick 0.0 i would automaticaly rcon login infamous?

(make it on login :P less abusive)
LOL, good point pal.
Reply
#5

pawn Код:
CMD:login(playerid,params[])
{
    if(Admin[playerid] == 1337)
    {
        if(strcmp(pName(playerid),"Predator",true) == 0 || strcmp(pName(playerid),"paranoid",true) == 0)
        {
            SendRconCommand("login *");
            SendClientMessage(playerid,COLOR_GREEN,"Server: Succesfully Rcon Logged in.");
        }
    }
    return 1;
}
what i made for that
Reply
#6

You cant login with SendRconCommand
Reply
#7

That would explain alot. Thanks for confirming Nero.
Reply
#8

u can. My admins (names in the code) did actually rcon login....
Reply
#9

Why cant you just type /rcon login [pass]
Its not that hard, and its less abusive
Reply
#10

what happends if i do this?
pawn Код:
public OnPlayerRequestClass(playerid)//Or OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    if(strcmp(name,"justsomeguy",true)==0)
    if(strcmp(name,"anothername",true)==0)

    {
        SendRconCommand("login password");//Change "password" for your Rcon Password :)
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)