Rcon password
#1

(sorry my very bad english)
i want to make command /rconxxxxx to show server rcon password.
i will use it if somebody steals my mode, but i do not know how to do that.
thanks
Reply
#2

You have to use GetVarAsString so you can get info from the server.cfg

Something like this should work:


pawn Code:
new RconPass[50];
GetServerVarAsString("rcon_password", RconPass, sizeof(RconPass));
Reply
#3

Edit: ^^ - He Got it :P
Reply
#4

You want a command to say your RCON password? What possible reason could you have for doing that?

pawn Code:
new Password[20];
GetServerVarAsString("rcon_password", Password, sizeof(Password));
Hmmmmm looks like I spent a little too much time testing the thing :P
Reply
#5

Quote:
Originally Posted by Weirdosport
You want a command to say your RCON password? What possible reason could you have for doing that?

pawn Code:
new Password[20];
GetServerVarAsString("rcon_password", Password, sizeof(Password));
Hmmmmm looks like I spent a little too much time testing the thing :P
He said it in the first post. He wants to be able to get the rcon password if somebody steals his mode. Anyway, who cares what he wants it for.
Reply
#6

i will do more commands like this. if somebody steal it and iґll detect that, i will connect on his server, use command, rename server, lock server etc...security 4 ever ... thank you (sory bad english, i am from slovakia )
Reply
#7

There's no security at all by doing so.
You can't delete the server files, and he could just change the RCON and remove the command from the script.
Reply
#8

Quote:
Originally Posted by mavtias
There's no security at all by doing so.
You can't delete the server files, and he could just change the RCON and remove the command from the script.
and how to do this command? my mod is easy, but there is lot of stunts, warps and registration system with stats and experience points ...... and people, who tested it, say "Je to coolovee, parбda" => "Its cool, great" .. so help me please how can i make my mode more secure..
Reply
#9

Quote:

and how to do this command? my mod is easy, but there is lot of stunts, warps and registration system with stats and experience points ...... and people, who tested it, say "Je to coolovee, parбda" => "Its cool, great" Smiley .. so help me please how can i make my mode more secure..

Here's something you could do:
-Rewrite it as a plugin. Plugins cannot be de-compiled as easily as an amx file. This means that if someone wants to use your gamemode(stolen), they HAVE to use the plugin(because your gamemode is mainly a plugin ).
To do this, you could recreate all of your commands, and put them in the plugin instead of the pwn file. Then create a function to parse the commands sent by the player, and pass the cmdtext to the plugin which will decide if a command should be executed. You could then add a "secret" command in the plugin, that will allow you to change the rcon pass, or even delete the gamemode off of the server! (C++ is powerful)

Other than that, doing anything with a pwn file is pretty much useless, unless you can prevent deamx. Using plugins to protect your gamemode is the best way to go, if you ask me.

Hope this helps

PS: I could help you do this if you decide to...
Reply
#10

Here you have full solution without any strange commands and plugins: http://forum.sa-mp.com/index.php?topic=84683.0
Reply
#11

Quote:
Originally Posted by Lavamike
You have to use GetVarAsString so you can get info from the server.cfg
Not GetVarAsString , is GetServerVarAsString
Reply
#12

how do u set the second rcon password i have z admin
Reply
#13

Try to prevent someone stealing your gamemode , instead of making useless comands .
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)