Rcon Login via SendRconCommand -
Infamous - 19.02.2011
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;
}
Re: Rcon Login via SendRconCommand - rjjj - 19.02.2011
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
Re: Rcon Login via SendRconCommand -
selten98 - 19.02.2011
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))
Re: Rcon Login via SendRconCommand -
Infamous - 19.02.2011
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.
Re: Rcon Login via SendRconCommand -
selten98 - 19.02.2011
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
AW: Rcon Login via SendRconCommand -
Nero_3D - 19.02.2011
You cant login with SendRconCommand
Re: Rcon Login via SendRconCommand -
Infamous - 20.02.2011
That would explain alot. Thanks for confirming Nero.
Re: Rcon Login via SendRconCommand -
selten98 - 20.02.2011
u can. My admins (names in the code) did actually rcon login....
Re: Rcon Login via SendRconCommand -
alpha500delta - 20.02.2011
Why cant you just type /rcon login [pass]
Its not that hard, and its less abusive
Re: Rcon Login via SendRconCommand -
justsomeguy - 20.02.2011
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;
}