Hi Welcome to my version of RCON. This one operates on the same port as the server ( 8192, 8193, etc ).
Installation of Plugin Put rcon04rel32/64.dll on 'plugins' folder. Add rcon04rel32 (or 64) to server.cfg
Add a new line rcon_password ChangeMe
Quotegamemode Default
port 8192
plugins rcon04rel32 xmlconf04rel32 sqlite04rel32 squirrel04rel32
rcon_password ChangeMe
...
Connecting to serverYou can
- Connect with a remote console (i have made one, see downloads)
- Join game and become admin by typing /rcon login password
CommandsCommand | Description |
/rcon cmdlist | Shows a list with commands. |
/rcon echo text | Prints text on server console. |
/rcon hostname newhostname | Changes the hostname of the server. |
/rcon gamemodetext text | Sets the gamemode text of the server |
/rcon password newpassword | Sets the server password. Use this command without second parameter to remove the password |
/rcon rcon_password password | Changes the rcon_password until shutdown. |
/rcon players | Fetches a list of players with their IDs. |
/rcon kick id/name | Kicks a player |
/rcon ban id/name | Bans a player |
/rcon banip ip | Bans an IP Address |
/rcon unbanip ip | Unbans an IP Address |
/rcon say text | Shows a message in game to every players. |
/rcon gravity | Changes the gravity. eg. /rcon gravity 0.008 |
/rcon weather | Changes the weather |
/rcon exit | Shut downs the server |
/rcon plgncmd | Sends a plugin command. |
/rcon exec | Compiles a string and call it ( for squirrel ). eg. /rcon exec return GetPlayers() |
*/rcon loadfs | Loads a filterscript |
*/rcon unloadfs | Unloads a filterscript |
*/rcon reloadfs | Reloads a filterscript |
*Requires my other plugin filterscript04rel32 (or 64)
Connecting through remote consoleYou can use the remote console rcon_client.exe provided in downloads. Here, i am connecting to the server at localhost. 1234 is my rcon password. You can use two options - i or c. i means interactive and c means execute command and exit. Here i is used. The following is a preview of command line of windows.
QuoteC:\Users\...\client>rcon_client -h 127.0.0.1 -P 8192 -p 1234 -i
>cmdlist
echo, hostname, gamemodetext, kick, ban, say,players, banip, unbanip, gravity, weather, rcon_password, password, exit, plgncmd, exec, loadfs, unloadfs, realoadfs
Callbacks or plugin commands- onRconLoginFailed( ipaddress )
If a player failed to login through in-game or a user failed to login through remote-console, the function is called.
ipaddress - | The ip address of the user/player who failed to login |
If the squirrel V.M is not available, a plugin command with 0x2A1A3D01 as identifier and ip address as message is send.
- onRconCommand( command, ip )
This function is called when a player logged in as admin or a remote user has typed a command which is not in the cmdlist.
command - | The command which was typed. You must parse this and separate tokens if needed. |
ip - | The ip address of the user/player who typed the command |
If a string is returned by this function, it is send back to the client or player who typed the rcon command.
If the squirrel virtual machine is not available, a plugin command 0x2A1A3D02 is send with command and ip formatted as "%s %s".
Script Functions- SendRconCommand( command )
An rcon command can be send with the above function and passing command as parameter. If squirrel gamemode is not available, again this can be achieved by sending a plugin command 0x2A1A3D09 with command as message.
Downloads(https://i.imgur.com/k8fogmZ.png) (https://www.mediafire.com/file/2g6z094i7n81txz/rcon-plugin-with-client.7z/file)
Mirror 2 (https://sourceforge.net/projects/rcon-vcmp/files/rcon-plugin-with-client.7z/download)
Any player can become admin:
(https://i.imgur.com/WD91V8Y.png)
I made a Android app for RCON:
(https://imgur.com/9iAbvjG.jpg) (https://imgur.com/SuwZnyn.jpg)
Use cmdlist to show all commands.
Download Link: vcmp-rcon.apk (https://www.mediafire.com/file/rwa9jko14owlkl2/vcmp-rcon.apk/file) (mediafire)
Source Code of apk: github (https://github.com/habi498/vcmp_rcon)
This gives me feel of using samp rcon ngl! Keep it up man! ;D ;D
Version 1.2 (21.Sep 2023)
QuoteAdded support for Windows XP.
Added Security. Through server.cfg, rcon_max_attempts can be defined and after reaching this limit, the user's IP will be banned and queries from this IP will be dropped. By default it is 5.
plgncmd accepts hexcodes. Earlier the command identifier of plugin commands was accepted only as decimal numbers, now you can prefix 0x and pass hexadecimal numbers also.
plgncmd works without 'message' part. i.e. it can be omitted and will be treated as "". i.e. earlier plgncmd 123456 x was necessary. x being the message part. Now plgncmd 123456 will send the plugin command with an empty string.
Now 'exec' is shown on 'cmdlist' only if squirrel server. Otherwise, it is not shown.
Rcon client update: Now host (-h) will default to 127.0.0.1, and port (-P) will default to 8192. Thus, to connect to the local server (server running on the same machine), rcon -p xxx where xxx is the password will be enough. (-p) is the (password) switch.
The new server.cfg:plugins squirrel04rel32 rcon04rel32
sqgamemode scripts/main.nut
rcon_password 1234
rcon_max_attempts 7
Screenshot(s) ( from XP )
(https://i.imgur.com/oWUReQv.jpg)
'Loaded Rcon v1.2 by habi' can be seen at middle of server console.
(dependency walker)
(https://i.imgur.com/lBEHqUX.png)
(from a 32-bit linux system):
(https://i.imgur.com/HFL6iaU.png)
(On Ubuntu):
ldd plugins/rcon04rel64.so(https://i.imgur.com/NM5egDN.png)
(When login failed):
(https://i.imgur.com/zFpDNOD.png)
(IP banned after rcon_max_attempts):
(https://i.imgur.com/XkyrReA.png)
Note that rcon_password need not be number like
34566, but can be any string like
40@Ej2_YAGk+ aswell.
links update in first post:
Quote from: habi on Apr 18, 2023, 11:06 AMDownloads
(https://i.imgur.com/k8fogmZ.png) (https://www.mediafire.com/file/2g6z094i7n81txz/rcon-plugin-with-client.7z/file)
Mirror (https://sourceforge.net/projects/rcon-vcmp/files/rcon-plugin-with-client.7z/download)