SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 19/07/2009, 07:46 PM   #1
Lukass445
Little Clucker
 
Join Date: Apr 2009
Posts: 15
Reputation: 0
Default Rcon password

(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
Lukass445 is offline   Reply With Quote
Old 19/07/2009, 07:51 PM   #2
lavamike
Huge Clucker
 
lavamike's Avatar
 
Join Date: Mar 2008
Posts: 407
Reputation: 2
Default Re: Rcon password

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));
lavamike is offline   Reply With Quote
Old 19/07/2009, 07:51 PM   #3
cj101
High-roller
 
cj101's Avatar
 
Join Date: Jan 2008
Location: The Tardis
Posts: 1,805
Reputation: 135
Default Re: Rcon password

Edit: ^^ - He Got it :P
__________________
My Websites: TheTechDogs (Offline)
My Favorite Stuff: Swagbucks
Click the Link Below to enter to win the stuff you see!
cj101 is offline   Reply With Quote
Old 19/07/2009, 07:54 PM   #4
Weirdosport
High-roller
 
Join Date: Jul 2008
Posts: 1,310
Reputation: 0
Default Re: Rcon password

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
Weirdosport is offline   Reply With Quote
Old 19/07/2009, 08:01 PM   #5
lavamike
Huge Clucker
 
lavamike's Avatar
 
Join Date: Mar 2008
Posts: 407
Reputation: 2
Default Re: Rcon password

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.
lavamike is offline   Reply With Quote
Old 20/07/2009, 04:58 PM   #6
Lukass445
Little Clucker
 
Join Date: Apr 2009
Posts: 15
Reputation: 0
Default Re: Rcon password

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 )
Lukass445 is offline   Reply With Quote
Old 20/07/2009, 05:22 PM   #7
Mike Garber
Banned
 
Join Date: Feb 2008
Location: Sweden
Posts: 1,594
Reputation: 6
Default Re: Rcon password

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.
Mike Garber is offline   Reply With Quote
Old 20/07/2009, 05:39 PM   #8
Lukass445
Little Clucker
 
Join Date: Apr 2009
Posts: 15
Reputation: 0
Default Re: Rcon password

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..
Lukass445 is offline   Reply With Quote
Old 20/07/2009, 07:37 PM   #9
XPlatform
Big Clucker
 
Join Date: May 2008
Posts: 124
Reputation: 0
Default Re: Rcon password

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...
XPlatform is offline   Reply With Quote
Old 20/07/2009, 07:42 PM   #10
Sergei
High-roller
 
Sergei's Avatar
 
Join Date: Mar 2008
Location: Slovenia
Posts: 2,665
Reputation: 115
Default Re: Rcon password

Here you have full solution without any strange commands and plugins: http://forum.sa-mp.com/index.php?topic=84683.0
__________________
MySQL plugin R7 by BlueG
Documentation located on SA:MP wiki
Sergei is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rcon invalid password help please blackcrissbodo2009 Română/Romanian 5 06/06/2010 06:48 PM
RCON password Jo1Nt Help Archive 1 03/02/2010 08:43 PM
RCON password gedux123775 Help Archive 2 04/12/2009 05:05 PM
Why Can Everyone Use Rcon Without A Password (Solved) BP13 Server Support 6 12/06/2009 08:18 PM
Rcon Password Error darkgamer333 Server Support 1 15/11/2008 12:36 PM


All times are GMT. The time now is 12:28 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.