SA-MP Forums Archive
CMD to get Rcon - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: CMD to get Rcon (/showthread.php?tid=245923)



CMD to get Rcon - ricardo178 - 02.04.2011

hi man, i dont remember what is the params for the cmd /getrcon

This cmd could get the rcon and show it to the player... It's cooz coz i use hard rcon pass's and want this cmd there...
Can someone tell me?

Thanks!


Re: CMD to get Rcon - Mike Garber - 02.04.2011

What's the point of a "hard" Rcon pass if you're gonna make a command to get it?
Just look in the server.cfg..


Re: CMD to get Rcon - coole210 - 02.04.2011

I believe you can set the RCON password inside the script, just let it generate a new pass with the random() function and save it into a variable, then show it to the player to have a little more safe RCON passes.


Re: CMD to get Rcon - ricardo178 - 02.04.2011

Not this guys.... I know my pass and how to set it!
I want a command, so ingame i type: /getrcon and it tell me the rcon password of server(it check it) this is a way to prevent hacks too!


Re: CMD to get Rcon - Mike Garber - 02.04.2011

It is insecure to do so, and how in the hell does it prevent hacks?


Re: CMD to get Rcon - coole210 - 02.04.2011

Код:
//Inside of cmd
SendClientMessage(playerid,0xFFFFFFFF,"RCON Pass: '1234'");
//end
Edit the red.


Re: CMD to get Rcon - Noss* - 02.04.2011

Just a simple command then?
Код:
	if (strcmp("/getrcon", cmdtext, true, 10) == 0)
	{
		SendClientMessage(playerid, 0xFFFFFFFF, "Type The Rcon Password Here");
		return 1;
	}



Re: CMD to get Rcon - ricardo178 - 02.04.2011

Noooooooooo..... The command should check the Rcon alone, if i change it in cfg, it will check it!
Don't tell me this don't exist coz i has got it, but losted the code lol....

This command, will check rcon password from server files!


Re: CMD to get Rcon - SchurmanCQC - 02.04.2011

You want to be able to display the online RCON admins?


Re: CMD to get Rcon - Amit_B - 02.04.2011

People, I thought that he asked a answer... please don't reply if you don't know how to help!

ricardo178:
You're able to easily get the value of variables (everything on /rcon varlist) using GetServerVarAsString (at all you can get int or variables too with another functions but it's not relevant right now).
Example:
pawn Код:
if(!strcmp(cmdtext,"/getrcon",true))
{
    new str[64];
    GetServerVarAsString("rcon_password",str,sizeof(str));
    format(str,sizeof(str),"RCON Password: \"%s\"",str);
    SendClientMessage(playerid,0xffffffaa,str);
    return 1;
}