SHARED.LUA HELP!!! VIA darkrp

i need some major help please (lol) everytime i edite my shared.lua file no matter what i do to it my darkrp game mode fucks up and im doing it correctly. after were it says add under these lines to make a new class no matter what i do from that point on fucks everything up it also fucks up when i changed the player model of the hobo. please someone help why am i having this shared.lua problem!

I am just gonna throw this out there, because I used to have this same type of problem back in the day that I first started lua coding.

Are you zipping the files up in anyway and then uploading them to your server and then unzipping them? If so, don’t, for some reason it fucks up the whole system I have no idea why.

Hope this helps, otherwise post the code and I’ll see if I can help you with it.

nah man its all right on my desktop no zip.well i take the shared.lua out of the zip folder but thats it… an thats just to edite it from that point on its on my desktop an then i just copy it into my darkrp gamemodes also please takea look tell me if you see something wrong wiht my code

--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------
/
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”}, “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.]], {}, “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”}, “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]], {}, “mayor”, 1, 85, 0, true, false/, {TEAM_CHIEF, TEAM_POLICE}/)
/*

HOW TO MAKE AN EXTRA CLASS!!!

You can make extra classes here. Set everything up here and the rest will be done for you! no more editing 100 files without knowing what you’re doing!!!
Ok here’s how:

To make an extra class do this:
AddExtraTeam( “<NAME OF THE CLASS>”, Color(<red>, <Green>, <blue>, 255), “<Player model>” , [[<the description(it can have enters)>]], { “<first extra weapon>”,"<second extra weapon>", etc…}, “<chat command to become it(WITHOUT THE /!)>”, <maximum amount of this team> <the salary he gets>, 0/1/2 = public /admin only / superadmin only, <1/0/true/false Do you have to vote to become it>, true/false DOES THIS TEAM HAVE A GUN LICENSE?, TEAM: Which team you need to be to become this team)

The real example is here: it’s the Hobo: */

–VAR without /!!! The name the color(what you see in tab) the player model The description
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(“SWAT”, Color(20, 150, 20, 255), “models/player/urban.mdl”, [[HELP!]], {lockpick}, “swat”, 0, 45, 0, false)

holy shit use lua tags PLEASE! xD

EDIT: did it for you, next time do it yourself :stuck_out_tongue:

[LUA]
--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------
/
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”}, “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.]], {}, “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”}, “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]], {}, “mayor”, 1, 85, 0, true, false/, {TEAM_CHIEF, TEAM_POLICE}/)
/*

HOW TO MAKE AN EXTRA CLASS!!!

You can make extra classes here. Set everything up here and the rest will be done for you! no more editing 100 files without knowing what you’re doing!!!
Ok here’s how:

To make an extra class do this:
AddExtraTeam( “<NAME OF THE CLASS>”, Color(<red>, <Green>, <blue>, 255), “<Player model>” , [[<the description(it can have enters)>]], { “<first extra weapon>”,"<second extra weapon>", etc…}, “<chat command to become it(WITHOUT THE /!)>”, <maximum amount of this team> <the salary he gets>, 0/1/2 = public /admin only / superadmin only, <1/0/true/false Do you have to vote to become it>, true/false DOES THIS TEAM HAVE A GUN LICENSE?, TEAM: Which team you need to be to become this team)

The real example is here: it’s the Hobo: */

–VAR without /!!! The name the color(what you see in tab) the player model The description
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(“SWAT”, Color(20, 150, 20, 255), “models/player/group01/urban”, [[HELP!]], {lockpick}, “swat”, 0, 45, 0, false)[/LUA]

Problem: Your swat model is fucked up, you forgot the .mdl on the end.

sorry new here didnt kno i can do that so do you see the problem?

check the bottom of my post.

yep i see, i didnt mean that b4 with the mld i make sure its in there but there but the problem still happens to me lets says i just have the // under //ADD TEAMS UNDER THIS LINE:
my problem still happens so it makes me think maybe its not the shared.lua an its something else ;/

EDIT: or lets say i change the hobo player model it still gos fucked up its like anything i do to the shared.lua it just blows up in my face

post the error and I can help you a lot further.

thats the thing like there isnt an error. when i join the darkrp game my salary is gone my TAB tags are yellow an my jobs are not there

EDIT: yep there is no errors an the funny thing is i can /swat to change to it :confused: i just dont understand

75.102.43.162:27015 server ip is you wanna check it out yourself

EDIT: also it works in singleplayer :confused:

EDIT: could there be something wrong with my init.lua an cl_init?

You missed quotes around lockpick and there should be .mdl at the end of the model path(just makes you error model not your problem here)
Fixed version:
[lua]TEAM_SWAT = AddExtraTeam(“SWAT”, Color(20, 150, 20, 255), “models/player/group01/urban.mdl”, [[HELP!]], {“lockpick”}, “swat”, 0, 45, 0, false)[/lua]