SQL help

Hello everyone I just started my very own dark rp server it is going very well, but me being me I want to have sql in it so I can have two server [us1] and [us2] I want them
To be diffrent maps but everything else to be the same. I heard you can do that in sql. Is that true and if so how. The servers are ran off my dedicated server pc at my house.

[editline]6th March 2017[/editline]

If anyone can help that would be very much appriceated

First of all you have to set up a mysql server there are tons of videos out there to help you that.

Then all you have to do is go to find _MySQL.lua file in the darkrp gamemode and enter you details.

Do NOT edit the gamemode files.
Use this addon instead.

editing lua/darkrp_config/mysql.lua and filling it with your MySQL database details.

Wait I’m confused. The video I’m watching is but the coading beast. Seccond of all can you link two servers together? But how would I do that. If you guys have any useful links ex YouTube please tell.

You can “link” two servers together by having them sharing databases, therefore if you gain money in one server, you gain it on the other server as well and so on.
To acomplish this you have to share databases between the servers, and the only way to do this now is through a MySQL Database. As i said in my last post, you should download the DarkRP modification addon, and go to lua/darprp_config/mysql.lua and configure that file to your needs.
If you dont know how to make any of this nor how to make a MySQL database i would recommend you looking for written guides on Google, because normally they are detailed and explain the process really well, but if you do end up wanting a tutorial video, you may search for:
“How to setup a MySQL table” and “DarkRP setting MySQL”

The video I was watching was not in-deth so I decided to stop what I was doing. Do you think you can send me a link to a good fourm or something that tells me from begging to end on how to link two servers and make it so if you get money on one you will get money on the other. Thanks

[editline]6th March 2017[/editline]

I will give $3 paypal if they help me set it up 100% that means sql for dark rp and making it so if you join one of my servers your money from the other one is updated two.

Also geferon i have the addon

[editline]6th March 2017[/editline]

I will give $3 paypal if they help me set it up 100% that means sql for dark rp and making it so if you join one of my servers your money from the other one is updated two.

Also geferon i have the addon

The sentiment is nice, that you are offering money, however when you factor in the various charges linked to transfering that money, you quickly realize that it isn’t worth it.

A paypal charge in changing currency will gimp the amount you are sending, and the charge for sending the money itself will also reduce the amount furthermore.

In any case, you shouldn’t have much trouble in getting your system working if you simply have the 2 servers connect to the same database. Your problems will start if the servers somehow go out of sync however. There is an ongoing discusssion about this in the “Furture of DarkRP” thread by Falco.

I hate how all you guys are so against editing core files but editing the file does the exact same thing lol.

I see that you don’t understand the purpose of the darkrpmodification addon.

If something were to get updated in the core files, maybe a configuration name was changed, for example. That file would no longer work, and it would error.

You use the darkrpmodification addon to prevent errors from happening when the gamemode is updated; its common practice.

The reason we are against it is because DarkRP is explicitly design in such a way that if ever you did need to edit a core file, you could do it without needing to touch the core files. This is because for every update from Falco, downloaded to a local copy of DarkRP, the chance of the file that includes your modifications being changed increases. This would mean that your work is overwritten. That’s not so bad if your modifications span only 1 file, but if they span numerous files, then an update would break your installation because your additional code is now not functional.

This again isn’t too much of a problem, but given that most times that a DarkRP error crops up, the first thing people do is post here, it then becomes our problem. The first thing we would normally do is ask for the trace of the error so we can determine where the error lies. If the error comes from a core file, then it means we can’t apply any of our normal logic, because we then have no way of knowing what i causing the error.

TLDR: Don’t edit the core files, basically.

Doesn’t matter if you edit them and know what you’re doing

Back to what I was saying does anyone how do do this if so please help me It will be very appricated also I use the dark rp modifacton addon .

[editline]6th March 2017[/editline]

But do u know how? To do the my sql?

Ok, first of all since you are running this locally you will need a sql client. I recommend Wampserver for that. There’s tons of tutorials on the internet that will help you with setting up a mysql.

Unfortunately I can’t help you with setting up the database for a DarkRP server since I’ve never done it but I can help you with setting up the SQL server, just add me on steam.