discord widget


Version 6.0 beta 1 released!

The banner for Update 6.0 beta 1


So, we're finally on the MySQL update now!

As most older players already know, we've been working on creating a MySQL-update for R-FS. This explains why the name of this update is 'database based', or 'databased' for short.

Click the read more button to see the full (very long) article and the change log!

A player called 'Mark' on the forums suggested webstats for R-FS all the way back in 2011. My reaction was that I thought this would never happen, because detailed webstats require the information about players, properties and achievements have to be stored inside a database.

R-FS was running on dini, which is an include for Pawno that makes easy ini saving and loading possible. The major problem with this, besides the fact that it's a very slow and outdated method (from 2006), is that there's no way to receive data from text files when they're hosted somewhere else than on the same web server. Every way to do this with text files would cause a great security risk for the server.

The only effective way to make webstats possible is to remake most of the server from scratch. I didn't want to do this at first, because the R-FS gamemode is almost 30.000 lines big, but then Miracoli told me there was another way. He said that it was possible to make a few MySQL functions and use them in a similar way to how dini works. By doing this, only a few things had to be changed in the gamemode to make it work. This sounded great, but I didn't know anything about MySQL back then. Miracoli told me he could make an include for me so that I could update the server.

In the meantime I've created a basic webstats page and plugins for Joomla. These were all functioning perfectly.

The idea was that everything would be completed in R-FS version v5.6, which was planned to be released in July of 2012. Things didn't turn out as planned and I was experiencing way too many problems with the update. The server was crashing for the strangest reason and everything was very unstable. It then took me another 2 months to remove the MySQL changes from the gamemode in order to get a working copy of R-FS again. I've put all the functions Miracoli made and the implementations I've done and set them aside for the time being. The update was released without MySQL. R-FS v5.6 was also the first update of 2012, released on the 12th of September 2012.

A few updates have been released ever since, but none of them included anything related to MySQL, except for one small table that allowed the website to see basic things about the server. This includes the server name and amount of currently playing players. The webstats module remained offline for the time being.

In April of this year I started thinking about MySQL again. I really disliked the fact that I left it uncompleted in 2012. I took Miracoli's include and created a MySQL-version of the recently released update (Version 5.8). This of course had the same server crashing issue as when I did the same thing a year earlier. I decided to try to find out why there were so many issues, and after about a month I was able to get most of the things working. However, there was another big problem. Miracoli's dini-based MySQL include works in a way where it saves one variable per query. This combined with the R-FS gamemode caused so much lag that certain simple actions, like joining the server, took almost half a minute. The freezing was so insane that I quickly began to realise that this idea wouldn't work at all

I didn't want to cancel the update again though, because all of the effort that has gone into it, but I did realise that the plugin no longer crashing allowed me to start working on a full-MySQL based version of R-FS. I began by asking a lot of questions to people like Miracoli and some random people I knew. I soon discovered that there was no way I could push a MySQL update without actually knowing the more advanced things about the MySQL programming language. Things were slowly progressing, but with the ability to ask Miracoli a few questions from time to time, I was slowly approaching having a somewhat-responsive MySQL-based gamemode.

After re-creating some of the functions, I soon found out that there were even better ways of doing certain things. I replaced things again, again, again and again. Everything was taking a long time and a lot of work. I simply didn't have the spare time to do all of this, but there was no stopping in me. I was getting stressed by the fact that there was still so much work left. Every now and then I experienced errors in the plugins that also took a long time to get passed. So instead of just scripting at home, I decided to build a virtual machine in VMware as local test server and use it to be able to script, test and edit things at school. The reason I couldn't use a properly-hosted test server was because school has many ports blocked in their firewall.

For quite some weeks I've been taking my laptop to school and using every single minute I could to script for R-FS or to learn the MySQL language. I can imagine many people looking strangely at me for this non-stop behaviour, but hey, I didn't care. There was an update that needed finishing! I even secretly scripted some things during lessons and I barely studied for any tests anymore. Luckily it didn't effect my school scores.

About 2 weeks ago my school vacation started. During this period I completed the final touches of the MySQL related changes. I remade some player commands and changed a few things I've made earlier to make things more effective. My plan was to now take general bugs and suggestions in consideration. I also wanted to add quite a lot of maps to this update.

Unfortunately the amount of bug-fixes and suggestions remained very limited, due to the fact that Volt Host went down a few days ago. They annouced that their datacenter in the UK cancelled their contract. So I had no choice but to release the MySQL update as soon as I got the replacement server running. The older gamemode was hard-coded to run on the server that now no-longer exists. I took the opportunity of the down time to create and host a local test server for some last-minute testing. I swapped out the IP used in my DNS with my home-IP and added a notification in the server saying that it's a test server and that stats won't be saved. Some people helped me by testing things and I fixed some very important bugs, like connect time hours and minutes swapping around.

Yesterday Volt Host opened a new datacenter in Amsterdam. I used my refunded account-credits to order a new server there. It took me an entire day to set everything up and to import the users and properties from the old to the new server. This was done by a transfermodule that I've created during development.

There's still one issue with the update, but I can't do anything besides fixing it when it occurs. Let's say that the following accounts used to exist on the old server:

  • bacon
  • Bacon
  • BaCoN

They're all the exact same name, but with different capitalisations. This was possible, because Linux allows duplicate names to exist in the same folder, as long as they have different capitals. But in MySQL everything is not case-sensitive. This means that only one of them can exist. My local server runs on Windows, so it can't have these accounts in the same folder. The way I bypassed this is by telling 7-zip to overwrite and keep the newst files only. After this, I ran the transfer and imported this database to the new main server. This means that if for example 'Bacon' is the correct account, but 'bacon' is a spam account created by an impressionator one week before 'Bacon' came back from his holiday, that his account has been overwritten with 'bacon', because this is the newest one.

If you can't login to your account and you know that your password is correct, or you're completely sure that you've lost your stats, please tell me as soon as possible. I will remove the account from the database and import the correct one from my backup. This backup is completely up-to-date, because it was made after the UK-server went down. There is also a message about this visible in-game when joining.

The server will go out of beta once everything has been running fine for a couple of months. I will then perform a new properties-cleanup. This means that inactive people lose their properties and get a refund of it's value. This is automated and I can select how many days considers someone as inactive.

The internal IP-address changed again, but you should've have any issues when you're using the link on the left of this site. If the server appears down for you, remove everything R-FS related from your SA:MP server list and click the 'Server IP' button on the left of the homepage.

Full change log:

  • Updated the server to use MySQL.
    • Player accounts, server config, businesses and houses are now saved in a database instead of in seperate text files.
    • Removed many unused player variables.
    • This makes the entire server a lot faster and gets rid of most freezes or lag spikes.
    • This update also made the webstats module on the R-FS website functional!
  • Fixed a bug that caused the server to be unable to recognise whether a player is or isn't logged in.
  • Many general scripting improvements related to performance. Especially with achievements and properties.
  • I've implemented a transfer module that converted the current version of R-FS to the new version.
    • The idea behind this is that no stats or user settings will be lost.
    • Two small exceptions are the name-case issue and house passwords. You have to set a new house password if you want one.
  • Blocked the use of "{", "}" and "|" in houses and business names due to color embedding and the internal code.
  • You can no longer buy houses and businesses before registering an account.
  • Fixed a bug that would cause you to be able to receive business payments without logging in first.
  • Fixed some wrong colours in /tmenu. This happened because of the colour IDs changing in SA:MP 0.3x.
  • Fixed a few minor typos.
  • Fixed a bug that would cause players to spawn near the old Lobby after completing a mission or race.
  • Fixed a SA:MP bug that would cause players who got kicked or banned to not see the reason.
  • Fixed fight styles not loading correctly most of the time.
  • Tweaked the drug effect duration. If you use 5 grams the effect is the same. 20 grams is a bit shorter and 30 grams or more lasts longer than before depending on the amount.
  • Removed the per-checkpoint reward of the combine harvester mission. The end reward remained the same.
  • Removed the donator islands of some inactive/perma-banned players.
  • Fixed the 'Baby Don't Hurt Me' achievement not always completing.
  • Fixed a bug that would make everyone unable to start missions right after a server restart.
  • Limited the amount of registered accounts to a maximum of 5 per IP. Please note that the multi-accounting rule remained the same. This is only to prevent people from spamming the database.
  • Fixed being able to attempt to rob a bank as often as you like until you've finally succeeded.
  • Removed all vending, food and drinking machines from the game to avoid it from messing up with the anti-cheat.
  • Removed n4z1's map at his request. People were abusing it by cleaning the barrels and then doing the race. :(
  • Fixed a bug that would cause reaction tests to not expire 1/3 of the time.
  • Added a new way to sell properties of inactive players. I can now manually specify after how many days people lose their properties.
    • Money in the house storage and 75% of the value of the property will be refunded. This is the same behaviour as with manually selling it.
  • House cars now have a license plate showing the corresponding house ID.
  • House passwords no longer show up in the chat as soon as somebody enters your house. For this to work I had to remove the current house passwords from everybody's houses. You have to set a new one if you want it.
  • Updated the server music.
  • Hosting moved from the UK to The Netherlands. This should make the website and server work together faster, because they're now both in the same country.
  • Made a new path for Cookiemonster.

Enjoy the update!