• Limiting wallet size in Darkrp (3/4 Done)
    3 replies, posted
My server is ever so expanding and its time to put a limit on how much a player can carry because some of my more seasoned players have upwards of 200k (Over kill) for how the pricing of the server is setup. I found a thread concerning adding a limit to wallet size from what I can tell it seems the code would work. I placed it on my testing server and it seemed to work great. I had it set at 50000 and everything worked. I was a bit hasty and then pushed the change through on my public server. It worked (to a point) I found that new players who joined became "Unassigned" instead of citizen which for short is what it sounds like. So for a few hours I set players who joined to citizen manually which did work. But I then found how that they cant pick jobs which you need to vote for. They could be set to that job by an admin but they cant vote. So they can become gangster,thief,medic etc.. But if the job requires a vote it would not work. It would print in chat the command used Example : /votecp and all players would see it (was not OCC) this is also true for owning doors like /toggleown. From what I can gather it seems like a database problem. Because it only affects new players. Players who are already played on the server in the past were unaffected. Below is the thread I used to base my code off. [url]http://facepunch.com/showthread.php?t=1195438[/url] Here is my pastebin of my player.lua found at garrysmod/gamemodes/darkrp/gamemode/server/player.lua [url]http://pastebin.com/ZRALms8s[/url] Note: You will find the code discussed in [url]http://facepunch.com/showthread.php?t=1195438[/url] at line 377 Any suggestions on how I would go about fixing this problem. I currently have my testing server online with this happening if you wish to join it the IP is 70.42.74.34:27015 Password: hackers [highlight](User was banned for this post ("missed darkrp thread" - garry))[/highlight]
You'd have to download your [I]sv.db[/I] file and open it in a SQL browser, then go through everybody's wallets that are higher than 50,000 and set them to 49,999. It will be a bit tedious, but there is nothing else you can really do. On second thought though, you could make a small script on GM:PlayerInitialSpawn() that checks if there wallet is higher than 50,000 and set it accordingly. Both would work fine.
I just did as you said I looked into the database and found that in darkrp_player there was two accounts on my server which was my girlfriend and me. I had my other admin join today and it didnt write him into the database. He was brand new to the testing server he never joined before so its still causing the same problems listed above. No one wallet size is set higher then 2k.
[QUOTE=clutchtort;40109571]some of my more seasoned players have upwards of 200k (Over kill) for how the pricing of the server is setup. [/QUOTE] You should try fixing the amount of money your players are earning, or fix the prices. Punishing players who are "more seasoned" sounds like a great way to make them leave.
Sorry, you need to Log In to post a reply to this thread.