Addiing Custom for Dark Role Play 2.3.7

I’ve been editing the “gamemode/shared.lua” to add more jobs, and change/remove others. When i start my server, i have no weapons, no job, and the F4 menu is blank. This is my code so far:


 Defaul Jobs: 
TEAM_CITIZEN = AddExtraTeam("Citizen", Color(20, 150, 20, 255), "models/player/group01/male_01.mdl", [[The Citizen is the most basic level of society you can hold
besides being a hobo. 
You have no specific role in city life.]], {}, "citizen", 0, 45, 0, false, false)

TEAM_POLICE = AddExtraTeam("Civil Protection", Color(25, 25, 170, 255), "models/player/police.mdl", [[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]], {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker", "item_ammo_pistol"}, "cp", 4, 65, 0, true, true)

TEAM_GANG = AddExtraTeam("Gangster", Color(75, 75, 75, 255), "models/player/group03/male_01.mdl", [[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. 
Most of the time you steal bikes.]], {}, "gangster", 3, 45, 0, false, false)

TEAM_MOB = AddExtraTeam("Mob boss", Color(25, 25, 25, 255), "models/player/gman_high.mdl", [[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.]], {"lockpick", "unarrest_stick"}, "mobboss", 1, 60, 0, false, false)

TEAM_GUN = AddExtraTeam("Gun Dealer", Color(255, 140, 0, 255), "models/player/monk.mdl", [[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]], {}, "gundealer", 2, 45, 0, false, false)

TEAM_MEDIC = AddExtraTeam("Medic", Color(47, 79, 79, 255), "models/player/kleiner.mdl", [[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.]], {"med_kit"}, "medic", 3, 45, 0, false, false)

TEAM_COOK = AddExtraTeam("Cook", Color(238, 99, 99, 255), "models/player/mossman.mdl", [[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]], {}, "cook", 2, 45, 0, 0, false)

TEAM_CHIEF = AddExtraTeam("Civil Protection Chief", Color(20, 20, 255, 255), "models/player/combine_soldier_prisonguard.mdl", [[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]], {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "item_ammo_pistol"}, "chief", 1, 75, 0, false, true, TEAM_POLICE)

TEAM_MAYOR = AddExtraTeam("Mayor", Color(150, 20, 20, 255), "models/player/breen.mdl", [[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]], {"item_ammo_pistol"}, "mayor", 1, 90, 0, true, false/*, {TEAM_CHIEF, TEAM_POLICE}*/)
/*



 Custom jobs (I got a couple of these from a pack on Garrysmod.org then edited a couple and made some of my own) 

TEAM_HOBO = AddExtraTeam("Hobo", Color(80, 45, 0, 255), "models/player/corpse1.mdl", [[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]], {"weapon_bugbait"}, "hobo", 5, 0, 0, false)
//No extra weapons           say /hobo to become hobo  Maximum hobo's = 5		his salary = 0 because hobo's don't earn money.          0 = everyone can become hobo ,      false = you don't have to vote to become hobo
// MAKE SURE THAT THERE IS NO / IN THE TEAM NAME OR IN THE TEAM COMMAND:
// TEAM_/DUDE IS WROOOOOONG !!!!!!
// HAVING "/dude" IN THE COMMAND FIELD IS WROOOOOOOONG!!!!
//ADD TEAMS UNDER THIS LINE:

TEAM_SWAT = AddExtraTeam("S.W.A.T", Color(0,204,255,255), "models/player/combine_soldier.mdl", [[S.W.A.T is some who come in,
 when the police FUCKING FAILS.]], {"weapon_real_cs_p228", "weapon_real_cs_mac10", "item_ammo_pistol"}, "swat", 2, 70, 0, false, true, TEAM_POLICE)

TEAM_GUARD = AddExtraTeam("Security Guard", Color(0,255,0,255), "models/player/male_05.mdl", [[Guards get hired to protect other people.]], 
{"weapon_real_cs_glock18"}, "guard", 2, 45, 0, false, true)

TEAM_HITMAN = AddExtraTeam("Hitman", Color(153,51,51,255), "models/player/barney.mdl", [[Hitmen's are people that kills for money.
 But they cant do it for free or just kill them self.]], {"weapon_real_cs_glock18"}, "hitman", 2, 75, 0, false, true)

TEAM_DRUG = AddExtraTeam("Drug Dealer", Color(255,102,0,255), "models/player/male_07.mdl", [[Drug Dealers sell drugs.
 But dont get arrested by the cops!]], {}, "drugdealer", 2, 35, 0, false, false)

TEAM_SS = AddExtraTeam("Secret Service", Color(102,102,51,255), "models/player/t_leet.mdl", [[Secret Service are some people,
 that protect the mayor!]], {"weapon_real_cs_m4a1", "weapon_real_cs_five-seven", "weapon_real_cs_knife"}, "secretservice", 2, 70, 0, true, true)

TEAM_TERRORIST = AddExtraTeam("Terrorist", Color(204,153,153,255), "models/player/t_guerilla.mdl", [[Terrorist are people that have access
 to the the mighty Jihad bomb!]], {}, "terrorist", 2, 30, 0, false, false)

TEAM_MILITARY = AddExtraTeam("Military", Color(102,255,0,255), "models/player/combine_soldier.mdl", [[You are a member of the Marines!]], 
{"weapon_real_cs_usp", "weapon_real_cs_m4a1", "item_ammo_pistol", "item_ammo_rifle"}, "marine", 4, 65, 0, true, true)

TEAM_ADMIN = AddExtraTeam("Admin", Color(255,0,204,255), "models/player/combine_super_soldier.mdl", [[Description:

I guess that i would say this is an admin class? <3krash
]], {"weapon_bugbait", "weapon_haxgun", "weapon_real_cs_admin_weapon", "weapon_real_cs_m4a1", "item_ammo_rifle", "item_ammo_rifle", "item_ammo_rifle", "item_ammo_rifle", "item_ammo_rifle",}, "admin", , 5000, 1, false, false)

TEAM_FAGGOT = AddExtraTeam("Faggots", Color(255,102,0,255), "models/player/corpes2.mdl", [[A CLASS FOR FAGGOTS.]], 
{"weapon_bugbait"}, "faggot", 10, 2, 0, false, false) 

(TEAM_FAGGOT was only a test :D)

EDIT: I realized i failed the title…

I get this as well, I think the makers or updaters did something to DarkRP where you can’t edit it.

Not at all, it generally means you’ve made a syntax error while editing your files and the code stops being run at the first error, so that’s why all of the gamemode is disabled. It can be something as little as forgetting a parenthesis or a typo in a variable name. Rest assured there is no such thing as edition protection in lua files. :slight_smile:

Usually when such an error occurs the gamemode will give you errors, try testing your gamemode in local(singleplayer or create multiplayer)to get both client and server errors as they occur.

You can also reload your gamemode ingame using gamemode_reload and gamemode_reload_cl. If there is an error it will be in your console.

To reduce the number of syntax errors I suggest you code using Notepad++ with the lua syntax plugin.

edit : Also, R.I.P. 6 days without a DarkRp question. :wink:

K, then find a problem I have with it here.

Default Job:
TEAM_CITIZEN = AddExtraTeam(“Citizen”, Color(20, 150, 20, 255), “models/player/group01/male_01.mdl”, [[The Citizen is the most basic level of society you can hold
besides being a hobo.
You have no specific role in city life.]], {}, “citizen”, 0, 45, 0, false, false)

Custom Job:( Don’t ask why I have it as Citizen-2)
TEAM_CITIZEN = AddExtraTeam(“Citizen-2”, Color(20, 150, 20, 255), “models/player/group01/male_02.mdl”, [[A citizen, you do nothing
really but live a normal life.]], {}, “citizen2”, 15, 25, 0, false, false)

TEAM_whore = AddExtraTeam(“whore”, Color(255, 45, 0, 215), “models/alyx.mdl”, [[stripper bars
]], {}, “whore”, 3, 70, 0, false)

Replace the team with w/e u wnt i quickly wrote that.