1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Models that are on the server and client appear as an error in the F4 menu

Discussion in 'DarkRP Modding Questions & Help' started by Rhapsody, Jan 28, 2015.

  1. Rhapsody

    Rhapsody New Member

    I'm working on my DarkRP server, and I'm running into an issue. On my Police job, the first five models show as errors on the F4 menu, but appear just fine if you spawn the ragdoll or become the model and view yourself in a camera. I'm using the NYPD 1940's Model Pack from the workshop for these models, and the code for this particular job is below;

    Code (Text):

    TEAM_POLICE = DarkRP.createJob("Police", {
      color = Color(25, 25, 170, 255),
      model = {
         "models/humans/nypd1940/male_01.mdl",
         "models/humans/nypd1940/male_02.mdl",
         "models/humans/nypd1940/male_03.mdl",
         "models/humans/nypd1940/male_04.mdl",
         "models/humans/nypd1940/male_05.mdl",
         "models/humans/nypd1940/male_06.mdl",
         "models/humans/nypd1940/male_07.mdl",
         "models/humans/nypd1940/male_08.mdl",
         "models/humans/nypd1940/male_09.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).
      Type /wanted <name> to alert the public to the presence of a criminal.]],
      weapons = {"rphands", "arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker"},
      command = "cp",
      max = 4,
      salary = GAMEMODE.Config.normalsalary * 1.45,
      admin = 0,
      vote = true,
      hasLicense = true,
      ammo = {
      ["pistol"] = 60,
      }
     
  2. Cake

    Cake Active Member

    If they are an error two things are possibly happening.

    1. The server is telling the client an incorrect path to the model.
    2. The client does not have the model/the model is not being loaded correctly.
     
  3. Rhapsody

    Rhapsody New Member

    Is there anything I can do about this? As I said, the models show up just fine in the client in the spawnmenu, I can even see the icons.
     
  4. Cake

    Cake Active Member

    Try and right click a model that shows up as an error and press "copy to clipboard" then paste that into your jobs file.
     
  5. Rhapsody

    Rhapsody New Member

    You mean right clicking the model in the spawnmenu and copying it? That's what I did. Anyhow, I just validated my game files and I'm going to check if it's an error now.

    EDIT: They do still show as errors, but only on the F4 menu, just like before.
     
  6. Cake

    Cake Active Member

    Can you spawn the models via the spawn menu?
     
  7. Rhapsody

    Rhapsody New Member

    Yes, I can spawn all nine models, including the five that are erroring on the F4 menu. They all show up with no problem. To reiterate, if I choose the error model when I pick the Police job and view myself in a camera, the model also shows up just fine. Is it possible that this is just an error on my side and I should get someone else to check?
     
  8. Cake

    Cake Active Member

    That might help. Because it sounds like there should not be a problem.... Meaning either gmod or DarkRP is acting weird. I have never seen this before so I cant say.
     
  9. Rhapsody

    Rhapsody New Member

    I got someone to test it, and they saw everything as an error. Understandable, because I forgot to AddWorkshop all of the custom models. I did that and we downloaded them. The main thing we've learned here is that downloading them like that didn't get rid of those five errors for me and it didn't get rid of any of the errors in the F4 menu for the person helping me test, but the person helping me test could see the actual world models just fine, once I chose one of those classes. That is, only after downloading the content (obviously).

    In other words, the issue still exists and it's not just for me, and for some reason only five of the models are errors in the F4 menu for me, while all of the custom models are an error in the F4 menu for another person.
     
  10. Rhapsody

    Rhapsody New Member

  11. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    Try right clicking each icon and clicking "Re-Render" in the Q menu. Here's what I think happened:
    1. You put the workshop on the server
    2. You joined
    3. You didn't download the models
    4. Icons were rendered, but the models were missing
    5. You added the model pack to the download list
    6. You rejoined, downloading the models
    7. You opened the F4 menu finding that the old icons were used.

    That's why I suggest re-rendering the icons.
     
  12. Rhapsody

    Rhapsody New Member

    I was already subscribed the the actual addon pack prior to this, but it's a good theory. Unfortunately, that didn't fix it.
     
  13. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    Exit gmod and remove the garrysmod\materials\spawnicons folder.
     
    Rhapsody and Cake like this.
  14. Rhapsody

    Rhapsody New Member

    Looks like that was it, thanks!
     
    (FPtje) Atheos likes this.
  15. [HGN] Rainbow

    [HGN] Rainbow New Member

    I'm having this issue constantly with most of my custom jobs..

    There is no spawn icons folder.

    Code (Text):


    TEAM_PIMP = DarkRP.createJob("Pimp", {
        color = Color(0, 0, 0, 255),
        model = "models/player_moxxi.mdl",
        description = [[You are the P.I.M.P!, Control your hoe's sell them to clients for sex and take 50% of their earnings!
            If they misbehave, give them a slap!.
            Do not get caught pimping in public, it is illegal.]],
        weapons = {"weapon_bugbait", "",},
        command = "Pimp",
        max = 2,
        admin = 0,
        salary = 50,
        vote = false,
        hasLicense = false,
        category = "Criminals",
        })
        TEAM_WWhite = DarkRP.createJob("Walter White", {
        color = Color(0, 0, 0, 255),
        model = "models/walter_white/walter_white.mdl",
        description = [[You are the meth cooker, cook that meth and give it to the meth dealer.]],
        weapons = {"", "",}, --
        command = "wwhite",
        max = 3,
        salary = 50,
        admin = 0,
        vote = false,
        hasLicense = false,
        category = "Criminals",
        })
        TEAM_CHIEF = DarkRP.createJob("Swat Chief", {
        color = Color(25, 25, 170, 255),
        model = "models/player/kerry/swat_ls.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).
            Type /wanted <name> to alert the public to the presence of a criminal.]],
        weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "handcuffs"},
        command = "SwatC",
        max = 1,
        salary = 100,
        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"
        },
        category = "Police",
        })
            TEAM_SWAT = DarkRP.createJob("Swat", {
        color = Color(25, 25, 170, 255),
        model = "models/player/kerry/swat_ls.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).
            Type /wanted <name> to alert the public to the presence of a criminal.]],
        weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "handcuffs"},
        command = "Swat",
        max = 5,
        salary = 100,
        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"
        },
        category = "Police",
        })
            TEAM_POLICE = DarkRP.createJob("Police Officer", {
        color = Color(25, 25, 170, 255),
        model = "models/player/uk_police/uk_police_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).
            Type /wanted <name> to alert the public to the presence of a criminal.]],
        weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "handcuffs"},
        command = "Police",
        max = 5,
        salary = 100,
        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"
        },
        category = "Police",
        })
            TEAM_POLICEC = DarkRP.createJob("Police Chief", {
        color = Color(25, 25, 170, 255),
        model = "models/player/uk_police/uk_police_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).
            Type /wanted <name> to alert the public to the presence of a criminal.]],
        weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "handcuffs"},
        command = "PoliceC",
        max = 1,
        salary = 100,
        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"
        },
        category = "Police",
        })
            TEAM_DONALDT = DarkRP.createJob("Donald Trump", {
        color = Color(25, 25, 170, 255),
        model = "models/Player/Donald_Trump.mdl",
        description = [[You are the presideint of the Unitied States, you enforce all law and want to make this place great again.
            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).
            Type /wanted <name> to alert the public to the presence of a criminal.]],
        weapons = {"arrest_stick", "unarrest_stick", "stunstick", "weaponchecker"},
        command = "Donald",
        max = 1,
        salary = 150,
        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"
        },
        category = "Police",
        mayor = true,
        })

     
    All the path's are correct and the models are in my garrysmod/models

    There is no spawnicons menu in the materials folder or anywhere and I've re-rendered icons too but the models are still not showing in the F4 menu... Just like OP players can join the job and the playermodel works fine when they view themselves with a camera.. but in the F4 menu they show up as errors.

    Also, yes I have the resources.lua and the
    Code (Text):
     resource.AddWorkshop( "idhere")
    -- all work just fine... but this damned F4 menu...I need help.


    --EDIT--

    I've just looked at the spawnmenu and there's no icon there...
    If I click "edit icon" then render a new icon it just disappears after..
     
    Last edited: Aug 17, 2017

Share This Page