• DarkRP Custom Jobs glitch
    11 replies, posted
First of all I know that I coded the custom jobs right but for some reason after respawning from a death as a a job with an entity in the entity menu all weapons are stripped, and the entities from the entity f4 menu are not there. To fix it I have to quit, or switch to another job and then switch back. I've been trying to find a solution to this, and i'm about to give up so i'm asking for help. Please if you know what is wrong help meh.
[QUOTE=CASAVANT;42352806]First of all I know that I coded the custom jobs right but for some reason after respawning from a death as a a job with an entity in the entity menu all weapons are stripped, and the entities from the entity f4 menu are not there. To fix it I have to quit, or switch to another job and then switch back. I've been trying to find a solution to this, and i'm about to give up so i'm asking for help. Please if you know what is wrong help meh.[/QUOTE] Could you post the code? It sounds to me like you have it set so they get the weapons on initial spawn or when they change jobs.
[QUOTE=Fortune11709;42354010]Could you post the code? It sounds to me like you have it set so they get the weapons on initial spawn or when they change jobs.[/QUOTE] Correct, we can't help without the code.
[CODE]/*-------------------------------------------------------- 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/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, candemote = false, mayorCanSetSalary = true }) TEAM_POLICE = AddExtraTeam("Civil Protection", { color = Color(25, 25, 170, 255), model = {"models/player/police.mdl", "models/player/police_fem.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 his/her arrest. The Battering Ram can also unfreeze frozen props(if enabled). Type /wanted <name> to alert the public to the presence of a criminal. OR go to tab and warrant someone by clicking the warrant button]], weapons = {"arrest_stick", "unarrest_stick", "bb_p228_alt", "stunstick", "door_ram", "weaponchecker"}, command = "cp", max = 4, salary = 65, admin = 0, vote = true, hasLicense = true, help = { "Please don't abuse your job", "When you arrest someone they are auto transported to jail.", "They are auto let out of jail after some time", "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.", "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect", "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect", "Type /jailpos to set the jail position" } }) 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/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 = "gangster", max = 3, salary = 45, admin = 0, vote = false, hasLicense = false, mayorCanSetSalary = false }) TEAM_MOB = AddExtraTeam("Mob boss", { color = Color(25, 25, 25, 255), model = "models/player/gman_high.mdl", description = [[The Mob 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 Mob boss posesses the ability to unarrest you.]], weapons = {"lockpick", "unarrest_stick"}, command = "mobboss", max = 1, salary = 60, admin = 0, vote = false, hasLicense = false, mayorCanSetSalary = false, help = { "As the Mob boss, you decide what you want the other Gangsters to do.", "You get an Unarrest Stick which you can use to break people out of jail.", "/agenda <Message> Sets the Gangsters' agenda. Use // to go to the next line." } }) 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 illegal firearms 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, mayorCanSetSalary = true }) TEAM_MEDIC = AddExtraTeam("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 = 3, salary = 45, admin = 0, vote = false, hasLicense = false, medic = true, mayorCanSetSalary = true }) 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 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 the door of a criminal, with a warrant for his/her arrest. Type /wanted <name> to alert the public to the presence of a criminal. Type /jailpos to set the Jail Position]], weapons = {"arrest_stick", "unarrest_stick", "bb_deagle_alt", "stunstick", "door_ram", "weaponchecker"}, command = "chief", max = 1, salary = 75, admin = 0, vote = false, hasLicense = true, chief = true, NeedToChangeFrom = TEAM_POLICE, help = { "Please don't abuse your job", "When you arrest someone they are auto transported to jail.", "They are auto let out of jail after some time", "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.", "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect", "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect", "Type /jailpos to set the jail position" } }) TEAM_MAYOR = AddExtraTeam("Mayor", { color = Color(150, 20, 20, 255), model = "models/player/breen.mdl", description = [[The Mayor of the city creates laws to govern the city. 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, mayor = true, help = { "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.", "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect.", "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect.", "Type /lockdown to initiate a lockdown", "Type /unlockdown to end a lockdown", "Type /placelaws to place a screen containing the laws.", "Type /addlaw and /removelaw to edit the laws." } }) TEAM_HOBO = AddExtraTeam("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 ho
[QUOTE=CASAVANT;42362276][CODE]/*-------------------------------------------------------- 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/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, candemote = false, mayorCanSetSalary = true }) TEAM_POLICE = AddExtraTeam("Civil Protection", { color = Color(25, 25, 170, 255), model = {"models/player/police.mdl", "models/player/police_fem.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 his/her arrest. The Battering Ram can also unfreeze frozen props(if enabled). Type /wanted <name> to alert the public to the presence of a criminal. OR go to tab and warrant someone by clicking the warrant button]], weapons = {"arrest_stick", "unarrest_stick", "bb_p228_alt", "stunstick", "door_ram", "weaponchecker"}, command = "cp", max = 4, salary = 65, admin = 0, vote = true, hasLicense = true, help = { "Please don't abuse your job", "When you arrest someone they are auto transported to jail.", "They are auto let out of jail after some time", "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.", "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect", "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect", "Type /jailpos to set the jail position" } }) 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/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 = "gangster", max = 3, salary = 45, admin = 0, vote = false, hasLicense = false, mayorCanSetSalary = false }) TEAM_MOB = AddExtraTeam("Mob boss", { color = Color(25, 25, 25, 255), model = "models/player/gman_high.mdl", description = [[The Mob 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 Mob boss posesses the ability to unarrest you.]], weapons = {"lockpick", "unarrest_stick"}, command = "mobboss", max = 1, salary = 60, admin = 0, vote = false, hasLicense = false, mayorCanSetSalary = false, help = { "As the Mob boss, you decide what you want the other Gangsters to do.", "You get an Unarrest Stick which you can use to break people out of jail.", "/agenda <Message> Sets the Gangsters' agenda. Use // to go to the next line." } }) 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 illegal firearms 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, mayorCanSetSalary = true }) TEAM_MEDIC = AddExtraTeam("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 = 3, salary = 45, admin = 0, vote = false, hasLicense = false, medic = true, mayorCanSetSalary = true }) 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 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 the door of a criminal, with a warrant for his/her arrest. Type /wanted <name> to alert the public to the presence of a criminal. Type /jailpos to set the Jail Position]], weapons = {"arrest_stick", "unarrest_stick", "bb_deagle_alt", "stunstick", "door_ram", "weaponchecker"}, command = "chief", max = 1, salary = 75, admin = 0, vote = false, hasLicense = true, chief = true, NeedToChangeFrom = TEAM_POLICE, help = { "Please don't abuse your job", "When you arrest someone they are auto transported to jail.", "They are auto let out of jail after some time", "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.", "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect", "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect", "Type /jailpos to set the jail position" } }) TEAM_MAYOR = AddExtraTeam("Mayor", { color = Color(150, 20, 20, 255), model = "models/player/breen.mdl", description = [[The Mayor of the city creates laws to govern the city. 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, mayor = true, help = { "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.", "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect.", "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect.", "Type /lockdown to initiate a lockdown", "Type /unlockdown to end a lockdown", "Type /placelaws to place a screen containing the laws.", "Type /addlaw and /removelaw to edit the laws." } }) TEAM_HOBO = AddExtraTeam("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
[QUOTE=Fortune11709;42363447]Could you narrow this down to the actual job that is having a problem? It would be a pain to look through all that.[/QUOTE] Well it does it to all of the jobs, the entities disappear and weapons are stripped, but I guess it mainly happens here:[CODE]TEAM_BMD= AddExtraTeam("Black Market Dealer", { color = Color(50, 50, 50, 255), model = "models/player/leet.mdl", description = [[You are selling illegal stuff to the public, watch out for cops!]], weapons = {""}, command = "blackmarket", max = 2, salary = 65, admin = 0, vote = true, hasLicense = false })[/CODE] [editline]30th September 2013[/editline] Im thinking it's a whole other file that is causing the problem. Cuz it also happens to the Default gundealer which isn't customly made. [editline]30th September 2013[/editline] Im also starting to think maybe ULX is causing this. But still, not sure...
[QUOTE=CASAVANT;42363592]Well it does it to all of the jobs, the entities disappear and weapons are stripped, but I guess it mainly happens here:[CODE]TEAM_BMD= AddExtraTeam("Black Market Dealer", { color = Color(50, 50, 50, 255), model = "models/player/leet.mdl", description = [[You are selling illegal stuff to the public, watch out for cops!]], weapons = {""}, command = "blackmarket", max = 2, salary = 65, admin = 0, vote = true, hasLicense = false })[/CODE] [editline]30th September 2013[/editline] Im thinking it's a whole other file that is causing the problem. Cuz it also happens to the Default gundealer which isn't customly made. [editline]30th September 2013[/editline] Im also starting to think maybe ULX is causing this. But still, not sure...[/QUOTE] Well if it is happening to everything it is probably a different file to this, these are all coded fine. I am not sure where the DarkRP stuff is because I have never tried making DarkRP stuff but you may have some out-of-date lua files. You might need to re-install it if that is the case.
Nvm I just realized we use NFO servers, so the DarkRP files are always updated. So back to the problem. Could it be a ULX related problem causing it to do this?
[QUOTE=CASAVANT;42364122]Nvm I just realized we use NFO servers, so the DarkRP files are always updated. So back to the problem. Could it be a ULX related problem causing it to do this?[/QUOTE] Always updated.... So its using darkrp 2.5? Are you using any custom content? If so... well there is your problem. (Darkrp 2.5 just so happened to break shit.)
2.5 isn't out yet.. not the on the main github... He isn't using 2.5 unless he manually put it on. Also, the jobs list he shows is shared.lua not jobs.lua
Something tells me this isn't the first core file he editted.
I see, [lua]TEAM_BMD= AddExtraTeam("Black Market Dealer",[/lua] should be [lua]TEAM_BMD = AddExtraTeam("Black Market Dealer", {[/lua]
Sorry, you need to Log In to post a reply to this thread.