11-08-2012, 03:36 AM
I have tried setting up a darkrp server using srcds. I am good with computers but i don't know much about coding but I followed some tutorials and set up some custom jobs in the shared.lua file like a Rapist and Car dealer. I wanted the rapist to have the Rape SWEP found in the workshop and I wanted the car dealer to have the ability to sell go karts (Sligwolf's GoKart). I have extracted the addons main files from the workshop file(.gma) and put them in the srcds\garrysmod\addons directory.
When I launch the server it says there was a problem loading the custom vehicle and you cannot chose car dealer from the jobs menu and the rapist is not equipped with the rape swep.
Here is my shared.lua:
/*--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------*/
TEAM_CITIZEN = AddExtraTeam("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/Female_07.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 = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_POLICE = AddExtraTeam("Civil Protection", {
color = Color(25, 25, 170, 255),
model = "models/player/police.mdl",
description = [[The protector of every citizen that lives in the city .
You have the power to arrest criminals and protect innocents.
Hit them with your arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to disobey
the law.
The Battering Ram can break down the door of a criminal with a warrant
for his/her arrest.
The Battering Ram can also unfreeze frozen props(if enabled).
Type /wanted <name> to alert the public to this criminal
OR go to tab and warrant someone by clicking the warrant button]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker"},
command = "cp",
max = 4,
salary = 65,
admin = 0,
vote = true,
hasLicense = true
})
TEAM_GANG = AddExtraTeam("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/Female_07.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 Mobboss sets your agenda and you follow it or you might be punished.]],
weapons = {},
command = "gangster",
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MOB = AddExtraTeam("Mob boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
description = [[The Mobboss is the boss of the criminals in the city.
With his power he coordinates the gangsters and forms an efficent crime
organization.
He has the ability to break into houses by using a lockpick.
The Mobboss also can unarrest you.]],
weapons = {"lockpick", "unarrest_stick"},
command = "mobboss",
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_GUN = AddExtraTeam("Gun Dealer", {
color = Color(255, 140, 0, 255),
model = "models/player/monk.mdl",
description = [[A gun dealer is the only person who can sell guns to other
people.
However, make sure you aren't caught selling guns that are illegal to
the public.
/Buyshipment <name> to Buy a weapon shipment
/Buygunlab to Buy a gunlab that spawns P228 pistols]],
weapons = {},
command = "gundealer",
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MEDIC = AddExtraTeam("Medic", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[With your medical knowledge,
you heal players to proper
health.
Without a medic, people can not 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 = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_COOK = AddExtraTeam("Cook", {
color = Color(238, 99, 99, 255),
model = "models/player/mossman.mdl",
description = [[As a cook, it is your responsibility to feed the other members
of your city.
You can spawn a microwave and sell the food you make:
/Buymicrowave]],
weapons = {},
command = "cook",
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_CHIEF = AddExtraTeam("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 forces to bring law to the city
Hit them with arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to
disobey the law.
The Battering Ram can break down the door of a criminal with a
warrant for his/her arrest.
Type /wanted <name> to alert the public to this criminal
Type /jailpos to set the Jail Position]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker"},
command = "chief",
max = 1,
salary = 75,
admin = 0,
vote = false,
hasLicense = true,
NeedToChangeFrom = TEAM_POLICE
})
TEAM_MAYOR = AddExtraTeam("Mayor", {
color = Color(150, 20, 20, 255),
model = "models/player/breen.mdl",
description = [[The Mayor of the city creates laws to serve the greater good
of the people.
If you are the mayor you may create and accept warrants.
Type /wanted <name> to warrant a player
Type /jailpos to set the Jail Position
Type /lockdown initiate a lockdown of the city.
Everyone must be inside during a lockdown.
The cops patrol the area
/unlockdown to end a lockdown]],
weapons = {},
command = "mayor",
max = 1,
salary = 85,
admin = 0,
vote = true,
hasLicense = false
})
TEAM_HOBO = AddExtraTeam("Hobo", {
color = Color(80, 45, 0, 255),
model = "models/player/corpse1.mdl",
description = [[The lowest member of society. All people see you laugh.
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
})
//ADD CUSTOM TEAMS UNDER THIS LINE:
TEAM_RAPIST = AddExtraTeam("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/Female_07.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 = [[You are disguised as an ordinary citizen, but underneath you are a true suprise sexer!]],
weapons = {Rape_SWEP},
command = "Citizen",
max = 0,
salary = 250,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_CARDEALER = AddExtraTeam("Car Dealer", {
color = Color(255, 140, 0, 255),
model = {"models/player/hostage_02.mdl"},
description = [[A car dealer is the only person who can sell cars.]],
weapons = {},
command = "cardealer",
max = 10,
salary = 400,
admin = true,
vote = false,
hasLicense = false
})
TEAM_HITMAN = AddExtraTeam("Hitman", {
color = Color(153,0,255,255),
model = {"models/player/leet.mdl"},
description = [[A Hitman, kills targeted people for money.DONT ABUSE OR RANDOM DM!!!!]],
weapons = {"keypad_cracker", "lockpick", "ls_sniper", "weapon_p2282"},
command = "hitman",
max = 2,
Salary = 50,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_HANDICAPPED = AddExtraTeam("Handicapped", {
color = Color(170,150,30,255),
model = {"models/player/group01/male_01.mdl"},
description = [[You are a Handicapped man You need help to the most simple things like, go to the bathroom]],
weapons = {},
command = "handicapped",
max = 10,
salary = 1,
admin = 0,
vote = false,
hasLicense = false
})
/*
--------------------------------------------------------
HOW TO MAKE A DOOR GROUP
--------------------------------------------------------
AddDoorGroup("NAME OF THE GROUP HERE, you see this when looking at a door", Team1, Team2, team3, team4, etc.)
WARNING: THE DOOR GROUPS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!
The default door groups, can also be used as examples:
*/
AddDoorGroup("Cops and Mayor only", TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR)
AddDoorGroup("Gundealer only", TEAM_GUN)
AddCustomVehicle("Sligwolfs_gokart", "models/kart06.mdl", 1000, {TEAM_CARDEALER})
/*
--------------------------------------------------------
HOW TO MAKE AN AGENDA
--------------------------------------------------------
AddAgenda(Title of the agenda, Manager (who edits it), Listeners (the ones who just see and follow the agenda))
WARNING: THE AGENDAS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!
The default agenda's, can also be used as examples:
*/
AddAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG})
AddAgenda("Police agenda", TEAM_MAYOR, {TEAM_CHIEF, TEAM_POLICE})
Please could someone correct my coding errors and help with the addons problem.
When I launch the server it says there was a problem loading the custom vehicle and you cannot chose car dealer from the jobs menu and the rapist is not equipped with the rape swep.
Here is my shared.lua:
/*--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------*/
TEAM_CITIZEN = AddExtraTeam("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/Female_07.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 = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_POLICE = AddExtraTeam("Civil Protection", {
color = Color(25, 25, 170, 255),
model = "models/player/police.mdl",
description = [[The protector of every citizen that lives in the city .
You have the power to arrest criminals and protect innocents.
Hit them with your arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to disobey
the law.
The Battering Ram can break down the door of a criminal with a warrant
for his/her arrest.
The Battering Ram can also unfreeze frozen props(if enabled).
Type /wanted <name> to alert the public to this criminal
OR go to tab and warrant someone by clicking the warrant button]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker"},
command = "cp",
max = 4,
salary = 65,
admin = 0,
vote = true,
hasLicense = true
})
TEAM_GANG = AddExtraTeam("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/Female_07.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 Mobboss sets your agenda and you follow it or you might be punished.]],
weapons = {},
command = "gangster",
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MOB = AddExtraTeam("Mob boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
description = [[The Mobboss is the boss of the criminals in the city.
With his power he coordinates the gangsters and forms an efficent crime
organization.
He has the ability to break into houses by using a lockpick.
The Mobboss also can unarrest you.]],
weapons = {"lockpick", "unarrest_stick"},
command = "mobboss",
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_GUN = AddExtraTeam("Gun Dealer", {
color = Color(255, 140, 0, 255),
model = "models/player/monk.mdl",
description = [[A gun dealer is the only person who can sell guns to other
people.
However, make sure you aren't caught selling guns that are illegal to
the public.
/Buyshipment <name> to Buy a weapon shipment
/Buygunlab to Buy a gunlab that spawns P228 pistols]],
weapons = {},
command = "gundealer",
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MEDIC = AddExtraTeam("Medic", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[With your medical knowledge,
you heal players to proper
health.
Without a medic, people can not 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 = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_COOK = AddExtraTeam("Cook", {
color = Color(238, 99, 99, 255),
model = "models/player/mossman.mdl",
description = [[As a cook, it is your responsibility to feed the other members
of your city.
You can spawn a microwave and sell the food you make:
/Buymicrowave]],
weapons = {},
command = "cook",
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_CHIEF = AddExtraTeam("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 forces to bring law to the city
Hit them with arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to
disobey the law.
The Battering Ram can break down the door of a criminal with a
warrant for his/her arrest.
Type /wanted <name> to alert the public to this criminal
Type /jailpos to set the Jail Position]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker"},
command = "chief",
max = 1,
salary = 75,
admin = 0,
vote = false,
hasLicense = true,
NeedToChangeFrom = TEAM_POLICE
})
TEAM_MAYOR = AddExtraTeam("Mayor", {
color = Color(150, 20, 20, 255),
model = "models/player/breen.mdl",
description = [[The Mayor of the city creates laws to serve the greater good
of the people.
If you are the mayor you may create and accept warrants.
Type /wanted <name> to warrant a player
Type /jailpos to set the Jail Position
Type /lockdown initiate a lockdown of the city.
Everyone must be inside during a lockdown.
The cops patrol the area
/unlockdown to end a lockdown]],
weapons = {},
command = "mayor",
max = 1,
salary = 85,
admin = 0,
vote = true,
hasLicense = false
})
TEAM_HOBO = AddExtraTeam("Hobo", {
color = Color(80, 45, 0, 255),
model = "models/player/corpse1.mdl",
description = [[The lowest member of society. All people see you laugh.
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
})
//ADD CUSTOM TEAMS UNDER THIS LINE:
TEAM_RAPIST = AddExtraTeam("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/Female_07.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 = [[You are disguised as an ordinary citizen, but underneath you are a true suprise sexer!]],
weapons = {Rape_SWEP},
command = "Citizen",
max = 0,
salary = 250,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_CARDEALER = AddExtraTeam("Car Dealer", {
color = Color(255, 140, 0, 255),
model = {"models/player/hostage_02.mdl"},
description = [[A car dealer is the only person who can sell cars.]],
weapons = {},
command = "cardealer",
max = 10,
salary = 400,
admin = true,
vote = false,
hasLicense = false
})
TEAM_HITMAN = AddExtraTeam("Hitman", {
color = Color(153,0,255,255),
model = {"models/player/leet.mdl"},
description = [[A Hitman, kills targeted people for money.DONT ABUSE OR RANDOM DM!!!!]],
weapons = {"keypad_cracker", "lockpick", "ls_sniper", "weapon_p2282"},
command = "hitman",
max = 2,
Salary = 50,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_HANDICAPPED = AddExtraTeam("Handicapped", {
color = Color(170,150,30,255),
model = {"models/player/group01/male_01.mdl"},
description = [[You are a Handicapped man You need help to the most simple things like, go to the bathroom]],
weapons = {},
command = "handicapped",
max = 10,
salary = 1,
admin = 0,
vote = false,
hasLicense = false
})
/*
--------------------------------------------------------
HOW TO MAKE A DOOR GROUP
--------------------------------------------------------
AddDoorGroup("NAME OF THE GROUP HERE, you see this when looking at a door", Team1, Team2, team3, team4, etc.)
WARNING: THE DOOR GROUPS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!
The default door groups, can also be used as examples:
*/
AddDoorGroup("Cops and Mayor only", TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR)
AddDoorGroup("Gundealer only", TEAM_GUN)
AddCustomVehicle("Sligwolfs_gokart", "models/kart06.mdl", 1000, {TEAM_CARDEALER})
/*
--------------------------------------------------------
HOW TO MAKE AN AGENDA
--------------------------------------------------------
AddAgenda(Title of the agenda, Manager (who edits it), Listeners (the ones who just see and follow the agenda))
WARNING: THE AGENDAS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!
The default agenda's, can also be used as examples:
*/
AddAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG})
AddAgenda("Police agenda", TEAM_MAYOR, {TEAM_CHIEF, TEAM_POLICE})
Please could someone correct my coding errors and help with the addons problem.