20.07.2010, 12:38
Quote:
Renaming default rcon commands - allowing you to basically rewrite them with PAWN:
Recently I had a pm of someone who wanted to modify default rcon commands. I don't remember it was discussed before, at least on this forum, so i've decided to write a quick tutorial about how to do it, as many people probably ignore how to do. This example is for Windows, and i have no idea if this is working for linux. All you need is an hexadecimal editor. I personally use Notepad++ and the Hex editor plugin.
And now you can do things like that: pawn Code:
There are other tweaks that you can do while you have your samp-server.exe open in your hex editor. I will show you two simple tweaks that can be easily applied with the Search and Replace function (search for hexadecimal values, NOT strings). Note that it was tested on 0.3r4 server, but that work since 0.1b so... Follow the guide! Disabling server_log.txt: This can be useful if you have your own logging system, or if you just want to disable it so it doesn't grow and waste space. The way i will show you now is the only way i've found that is safe.. but still, it's hacky as it replace the name of the file by a forbidden file name (previous methods were not as hacky, but also blocked samp.ban and crashinfo.txt so that's why i said mine is safer..) Search and Replace: Code:
00 73 65 72 76 65 72 5f 6c 6f 67 2e 74 78 74 00 Code:
00 6e 75 6c 2e 74 78 74 00 00 00 00 00 00 00 00 Disabling the scriptfiles restriction: This will allow PAWN's file functions to access files from outside the scriptfiles folder, as it is now allowed apparently, so be sure to update your scripts if you want to keep your files in scriptfiles, by adding "scriptfiles\\" in front of files names in fopen etc. So..for example with this tweak you can fread server.cfg, as well as other useful things.. Search and Replace: Code:
00 73 63 72 69 70 74 66 69 6c 65 73 5c 00 Code:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 ![]() |