1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

[Solved] Money on death issue

Discussion in 'DarkRP Modding Questions & Help' started by ☠DiscreetRavager☠, Jan 7, 2017.

  1. I'm not a very well experienced .lua coder, I'm attempting to learn now, but I can get around DarkRP coding pretty easily as long as I don't go too far into messing with code.

    My problem is pretty strange, as there is no "Error" for it to copy and paste and I haven't seen anything else like it online as I have searched many places for an answer.

    I help work on a server for simple shit, I fix bugs and I add simplicity stuff.

    So here's the problem; The owner wanted money to drop on death since we added ATM's, so he told me to get it done. So like anyone else, I went into "/garrysmod/addons/darkrpmodification/lua/darkrp_config" and opened up settings.lua.
    I changed "false" to "true" on line 75 "GM.Config.dropmoneyondeath", and restarted to server to see if that part alone worked. Well, it did. Whenever someone died, it dropped a percentage of their cash. Then, the owner wanted it to drop only 5k. So, I continued in the settings.lua and changed the value "0" to "5000" on line 186 "GM.Config.deathfee" and restarted to server. Here's where things got kind of weird.
    Whenever someone died, they dropped the same percentage and also dropped 5k.
    This confused me, so I was going to search more into the problem, but before I did I was going to undo anything I just did. I changed "GM.Config.dropmoneyondeath" back to "false" and then changed the value on "GM.Config.deathfee" to 0 again.
    I restarted the server, tested to make sure it worked, and well, it didn't. People still continue to drop a percentage of the cash they have on hand, and I don't know if it was the same percentage the whole time or not, but I did the math, and it is 60%.

    I've looked many places, however I, and no one else on the server can figure out where this 60% of cash dropping on death is coming from.

    If there is any additional information I need to provide, please let me know. First time using DarkRP forums for help.

    [The settings.lua is directly from the server]

    [EDIT] It was nothing to do with DarkRP files itself dropping 60% on death, the ATM's we added had it pre-coded to drop 60%. All I had to do was disable that, and we were good to go. However, I just made it 5% to still have more of a threat of losing cash.
     

    Attached Files:

    Last edited: Jan 9, 2017

Share This Page