My DarkRP jobs Wont work

Post Reply
Randy Butternubs
New to forums
New to forums
Posts: 7
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Fri Feb 12, 2016 8:06 am

My DarkRP jobs Wont work

Post by Randy Butternubs »

so I added a new job and I put into the darkrpmod under jobs.lua

The Hobo Works Not the police tho


TEAM_HOBO = DarkRP.createJob("Hobo", {
color = Color(80, 45, 0, 255),
model = "models/player/nypd/male_02.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"},
command = "hobo",
max = 5,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
hobo = true,
category = "Citizens",
})

TEAM_POPO = DarkRP.createJob("Police Officer", {
color = Color(0, 0, 0, 255),
model = "models/player/nypd/male_02.mdl",
description = [[The protector of every citizen that lives in the city.
You have the power to arrest criminals and protect innocents.
Hit a player with your 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 the door of a criminal, with a warrant for their arrest.
The Battering Ram can also unfreeze frozen props (if enabled) ]],
weapons = {"fas2_m1911, "arrest_stick", "stunstick", "door_ram", "weaponchecker", "handcuffs"},
command = "POPO",
max = 8,
salary = 65,
admin = 0,
vote = false,
hasLicense = true,
category = "Citizens",
})

I also disabled Hobo before I edited him but when I add another job under that one it dosn't show?
Randy Butternubs
New to forums
New to forums
Posts: 7
Joined: Fri Feb 12, 2016 8:06 am

Re: My DarkRP jobs Wont work

Post by Randy Butternubs »

Randy Butternubs wrote:so I added a new job and I put into the darkrpmod under jobs.lua

The Hobo Works Not the police tho


TEAM_HOBO = DarkRP.createJob("Hobo", {
color = Color(80, 45, 0, 255),
model = "models/player/nypd/male_02.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"},
command = "hobo",
max = 5,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
hobo = true,
category = "Citizens",
})

TEAM_POPO = DarkRP.createJob("Police Officer", {
color = Color(0, 0, 0, 255),
model = "models/player/nypd/male_02.mdl",
description = [[The protector of every citizen that lives in the city.
You have the power to arrest criminals and protect innocents.
Hit a player with your 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 the door of a criminal, with a warrant for their arrest.
The Battering Ram can also unfreeze frozen props (if enabled) ]],
weapons = {"fas2_m1911, "arrest_stick", "stunstick", "door_ram", "weaponchecker", "handcuffs"},
command = "POPO",
max = 8,
salary = 65,
admin = 0,
vote = false,
hasLicense = true,
category = "Citizens",
})

I also disabled Hobo before I edited him but when I add another job under that one it dosn't show?
NOW ITS SAYING
[ERROR] attempt to compare string with nil
1. f - [C]:-1
2. b - gamemodes/darkrp/gamemode/libraries/fn.lua:141
3. weaponString - gamemodes/darkrp/gamemode/libraries/fn.lua:84
4. DoClick - gamemodes/darkrp/gamemode/modules/f4menu/cl_jobstab.lua:291
5. unknown - lua/vgui/dlabel.lua:218
Oneleg
Staff
Staff
Posts: 225
Joined: Sat Apr 05, 2014 10:48 pm

Re: My DarkRP jobs Wont work

Post by Oneleg »

Did you disable the default Police Officer job in the disabled defaults config in the modification addon? As there appears to be no errors in your job code at first glance, however the job name may be conflicting with the default Police Officer job that comes packaged with DarkRP.
Post Reply