DarkRP trouble (Unassigned players, no money bug etc.)
27 replies, posted
Ever since the latest Gmod update, DarkRP on my server seems to be slightly messed up. Let me try to explain. It works absolutely perfectly for most people, but for around 10% of the server (seems to be a random selection), they spawn as "Unassigned" (their job name) players - grey statues that hover around the place. If you are selected to be "Unassigned", you will have no money in your wallet, you will not be able to use any commands, but you can operate normally - spawning props, shooting, phsygunning all works fine. I've reinstalled DarkRP several times but no luck. Obviously my first thought would be that the DarkRP database is somehow affected, but I have no experience with it, or indeed even know how to access it. Help would be much appreciated, and I can supply any more info that you might need!
Sorry if this is in the wrong section, I looked around and thought that this would be the best place.
Screenshot of an "Unassigned" player:
[IMG]http://dl.dropbox.com/u/17323013/gm_construct0010.jpg[/IMG]
Re-install your server, the fastest and almost best thing to do.
Something is wrong with your jobs. Check the shared.lua files for errors. It is most likely that, which is causing it.
You must have made some changes in it; go through the changes.
[QUOTE=Busymonkey;28158068]Something is wrong with your jobs. Check the shared.lua files for errors. It is most likely that, which is causing it.
You must have made some changes in it; go through the changes.[/QUOTE]
That was my first thought too. It can't be that, though, because I run a second server also, and both of them use the exact same addentities.lua and shared.lua files. The second server's gamemode works perfectly - no problems whatsoever. But this one doesn't, even though I've searched both lua files several times to look for errors. :(
Thanks for the ideas though! Do you know how I can save the DarkRP "data" (wallet file, so I can save people's cash), if I want to do a complete reinstall (which is definitely a last resort!)?
The money is saved in the sv.db file.
[QUOTE=.Kaleb;28174079]The money is saved in the sv.db file.[/QUOTE]
If I re-install the server, I can just keep this file and replace it? That's all there is to it?
Yea, all darkrp shit you want saved is located inside sv.db.
[QUOTE=Caesar;28210578]If I re-install the server, I can just keep this file and replace it? That's all there is to it?[/QUOTE]
Don't reinstall the server. It's probably just a typo.
[QUOTE=LukeWilliams;28279841]Don't reinstall the server. It's probably just a typo.[/QUOTE]
That's what I thought too, but I've never touched anything other than the shared.lua and addentities.lua files in DarkRP, and those two files are copied from my other server's DarkRP gamemode folder, which works absolutely perfectly. I don't understand what has happened to it. :(
Try copying it again, and see if you came to press any button when you saved it or something.
If you reinstall your server your database wont be backed up as long as you are using sqlite unless done manually.
Reinstalling your wont server wont even fix it, you need to fix the code and its not the shared.lua, the player is remaining on the spectator team and not getting set citizen by default.
[QUOTE=Persious;28286157]Try copying it again, and see if you came to press any button when you saved it or something.[/QUOTE]
Copied them over again without even opening them up, and it still is bugged. I don't understand what could possibly cause it, as I don't recall opening any other file in DarkRP other than those two.
zzaacckk if it's not shared.lua, what would you say it is? (I'm not trying to be smart as it might appear over the internet, I genuinely want to know). I'm sort of desperate at this point.
DarkRP is not setting the players team from spectator/connecting to the citizen team.
I would add this code to init.lua
[lua]
hook.Add("PlayerInitialSpawn","SetCitizen",function(ply)
if not ply:Team() == TEAM_CITIZEN then ply:SetTeam(TEAM_CITIZEN) end
end)
[/lua]
See if that works :)
Cheers mate, that'll fix the team problem but those who spawn as Unassigned also cannot use commands or have any money stored in their wallets. They also cannot pick up money either.
Thanks for the code, at least it'll fix a bit of the problem :)
[QUOTE=Caesar;28299958]Cheers mate, that'll fix the team problem but those who spawn as Unassigned also cannot use commands or have any money stored in their wallets. They also cannot pick up money either.
Thanks for the code, at least it'll fix a bit of the problem :)[/QUOTE]
Forcing someone's team won't solve a database issue..
[QUOTE=Banana Lord.;28311662]Forcing someone's team won't solve a database issue..[/QUOTE]
When did this become a database issue?
[QUOTE=zzaacckk;28312838]When did this become a database issue?[/QUOTE]
When their money won't load/save, and they can't pick up any.
[editline]27th February 2011[/editline]
@OP is your server using MySQL?
Its not a database issue.
Its a issue of them being unconnected and their information not loading.
[QUOTE=zzaacckk;28321855]Its not a database issue.
Its a issue of them being unconnected and their information not loading.[/QUOTE]
You really have no idea what you're talking about, do you? Their information isn't being loaded because it [b]CAN'T[/b] be loaded. Usually because with MySQL, the server disconnects, or it "goes away".
The default team has no interaction with the mysql database, so if they arent a citizen then there must be another error also causing their team not to be a citizen.
[QUOTE=zzaacckk;28330459]The default team has no interaction with the mysql database, so if they arent a citizen then there must be another error also causing their team not to be a citizen.[/QUOTE]
Obviously you have never experienced this error
No, there's no mySQL being used. I'm just using the normal DarkRP database at the moment. This problem is still here, but now there's also a new one, and I think they are both connected. Some people who join the server, will see the scoreboard as "Base Gamemode", they will not be able to read anything that anyone says in the chatbox, and they will not be able to open the Q menu. This is one of the errors they get: [code]Couldn't include file 'darkrp\gamemode\cl_init.lua' (File not found) () [cpp] There was a problem opening the gamemode file 'darkrp/gamemode/cl_init.lua'[/code]. They get many errors like this, too:[code]Warning: Unhandled usermessage 'anim_sayhi' Warning: Unhandled usermessage 'FPP_Owner' Warning: Unhandled usermessage 'anim_sayhi' Warning: Unhandled usermessage 'anim_sayhi' Warning: Unhandled usermessage 'DarkRP_PlayerVar' Warning: Unhandled usermessage 'anim_sayhi' Warning: Unhandled usermessage 'anim_sayhi' Warning: Unhandled usermessage 'DarkRP_Chat' Warning: Unhandled usermessage 'anim_sayhi' Warning: Unhandled usermessage 'DarkRP_PlayerVar[/code] I do [b]not[/b] use FastDL on this particular server at the moment, but it looks almost as if the cache didn't send. Also, the cl_init.lua file does exist, I checked. Sorry for the slow reply, I couldn't get on FP over the last few days.
*bump
I recently came on my server this morning and I had this same issue. I can't even really seem to find
out what it is.
[QUOTE=Majoralol;41846598]*bump
I recently came on my server this morning and I had this same issue. I can't even really seem to find
out what it is.[/QUOTE]
Any Lua errors? Check the server console.
*bump*
Guys i am having the same problem with the lua errors below, it seems it doesnt recognize the default job, i dont know what i have done wrong. The only thing i tampered with was adding an f4 menu via the init.lua and cl_init.lua in the gamemode folder + f4 menu darkrp module
[ERROR] addons/dark rp/lua/darkrp_customthings/jobs.lua:933: attempt to index global 'AMEMODE' (a nil value)
1. unknown - addons/dark rp/lua/darkrp_customthings/jobs.lua:933
2. include - [C]:-1
3. loadCustomDarkRPItems - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:111
4. fn - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:119
5. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
This is my jobs.lua:
[QUOTE]/*---------------------------------------------------------------------------
DarkRP custom jobs
---------------------------------------------------------------------------
This file contains your custom jobs.
This file should also contain jobs from DarkRP that you edited.
Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua
Once you've done that, copy and paste the job to this file and edit it.
The default jobs can be found here:
[url]https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua[/url]
For examples and explanation please visit this wiki page:
[url]http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields[/url]
--
Add jobs under the following line:
---------------------------------------------------------------------------*/--
TEAM_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(20, 150, 20, 255),
model = {
"models/player/Group01/Female_01.mdl",
"models/player/Group01/Female_02.mdl",
"models/player/Group01/Female_03.mdl",
"models/player/Group01/Female_04.mdl",
"models/player/Group01/Female_06.mdl",
"models/player/group01/male_01.mdl",
"models/player/Group01/Male_02.mdl",
"models/player/Group01/male_03.mdl",
"models/player/Group01/Male_04.mdl",
"models/player/Group01/Male_05.mdl",
"models/player/Group01/Male_06.mdl",
"models/player/Group01/Male_07.mdl",
"models/player/Group01/Male_08.mdl",
"models/player/Group01/Male_09.mdl"},
description = [[The Citizen is the most basic level of society you can hold besides being a hobo. You have no specific role in city life.]],
weapons = {},
command = "citizen",
max = 0,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})
TEAM_MEDIC = DarkRP.createJob("Medic", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[With your medical knowledge you work to restore players to full health.
Without a medic, people cannot be healed.
Left click with the Medical Kit to heal other players.
Right click with the Medical Kit to heal yourself.]],
weapons = {"med_kit"},
command = "medic",
max = 6,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
medic = true
})
TEAM_PROF = DarkRP.createJob("Professor", {
color = Color(47, 79, 79, 255),
model = "models/player/magnusson.mdl",
description = [[You are a professor, you sell books to further increase levels.]],
weapons = {""},
command = "professor",
max = 6,
salary = 2000,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_HOBO = DarkRP.createJob("Hobo", {
color = Color(80, 45, 0, 255),
model = "models/player/corpse1.mdl",
description = [[The lowest member of society. Everybody laughs at you.
You have no home.
Beg for your food and money
Sing for everyone who passes to get money
Make your own wooden home somewhere in a corner or outside someone else's door]],
weapons = {"weapon_bugbait", "flipoff"},
command = "hobo",
max = 10,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
hobo = true
})
TEAM_TAXI = DarkRP.createJob("Taxi Driver", {
color = Color(255, 50, 200, 255),
model = {
"models/player/Group03/Female_01.mdl",
"models/player/Group03/Female_02.mdl",
"models/player/Group03/Female_03.mdl",
"models/player/Group03/Female_04.mdl",
"models/player/Group03/Female_06.mdl",
"models/player/group03/male_01.mdl",
"models/player/Group03/Male_02.mdl",
"models/player/Group03/male_03.mdl",
"models/player/Group03/Male_04.mdl",
"models/player/Group03/Male_05.mdl",
"models/player/Group03/Male_06.mdl",
"models/player/Group03/Male_07.mdl",
"models/player/Group03/Male_08.mdl",
"models/player/Group03/Male_09.mdl"},
description = [[Your job is to take people around for money]],
weapons = {""},
command = "taxi",
max = 2,
salary = 60,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_SYND = DarkRP.createJob("Syndicate Gangster", {
color = Color(75, 75, 75, 255),
model = {
"models/player/Group03/Female_01.mdl",
"models/player/Group03/Female_02.mdl",
"models/player/Group03/Female_03.mdl",
"models/player/Group03/Female_04.mdl",
"models/player/Group03/Female_06.mdl",
"models/player/group03/male_01.mdl",
"models/player/Group03/Male_02.mdl",
"models/player/Group03/male_03.mdl",
"models/player/Group03/Male_04.mdl",
"models/player/Group03/Male_05.mdl",
"models/player/Group03/Male_06.mdl",
"models/player/Group03/Male_07.mdl",
"models/player/Group03/Male_08.mdl",
"models/player/Group03/Male_09.mdl"},
description = [[The lowest person of crime.
A gangster generally works for the Mobboss who runs the crime family.
The Mob boss sets your agenda and you follow it or you might be punished.]],
weapons = {},
command = "sgangster",
max = 15,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_SYND1 = DarkRP.createJob("Syndicate Mob Boss", {
color = Color(25, 25, 25, 255),
model = "models/player/suits/male_09_open_waistcoat.mdl",
description = [[The Syndicate Boss is the boss of the criminals in the city.
With his power he coordinates the gangsters and forms an efficient crime organization.
He has the ability to break into houses by using a lockpick.
The Syndicate boss posesses the ability to unarrest you.]],
weapons = {"lockpick", "unarrest_stick"},
command = "smobboss",
max = 1,
salary = GAMEMODE.Config.normalsalary * 1.34,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MAFIA = DarkRP.createJob("Mafia Gangster", {
color = Color(255, 0, 0, 0),
model = {
"models/humans/mafia/male_02.mdl",
"models/humans/mafia/male_04.mdl",
"models/humans/mafia/male_06.mdl",
"models/humans/mafia/male_07.mdl",
"models/humans/mafia/male_08.mdl",
"models/humans/mafia/male_09.mdl",},
description = [[The lowest person of crime.
A gangster generally works for the Mobboss who runs the crime family.
The Mob boss sets your agenda and you follow it or you might be punished.]],
weapons = {},
command = "mgangster",
max = 15,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MAFIA1 = DarkRP.createJob("Mafia Boss", {
color = Color(25, 25, 25, 255),
model = "models/vito.mdl",
description = [[The Syndicate Boss is the boss of the criminals in the city.
With his power he coordinates the gangsters and forms an efficient crime organization.
He has the ability to break into houses by using a lockpick.
The Syndicate boss posesses the ability to unarrest you.]],
weapons = {"lockpick", "unarrest_stick"},
command = "mmobboss",
max = 1,
salary = GAMEMODE.Config.normalsalary * 1.34,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_CHIEF = DarkRP.createJob("Civil Protection Chief", {
color = Color(20, 20, 255, 255),
model = "models/player/combine_soldier_prisonguard.mdl",
description = [[The Chief is the leader of the Civil Protection unit.
Coordinate the police force to enforce law in the city.
Hit a player with arrest baton to put them in jail.
Bash a player with a stunstick and they may learn to obey the law.
The Battering Ram can break down t
This thread is almost four years old, good job. Anyway, what you did wrong is that you have
AMEMODE in this line
[code]
AMEMODE:AddGroupChat(TEAM_MAFIA1, TEAM_MAFIA)[/code]
But you should have
[code]
GAMEMODE:AddGroupChat(TEAM_MAFIA1, TEAM_MAFIA)[/code]
I found the error before i read this post but i <3 you for even responding man. Sorry for the bump though...
Facepunch should add a confirmation alert if the last post is > 4 months or something
Sorry, you need to Log In to post a reply to this thread.