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.

World prop issue

Discussion in 'DarkRP Modding Questions & Help' started by Ryanlo22, Oct 11, 2013.

  1. Ryanlo22

    Ryanlo22 New Member

    I have a couple of entities that when spawned are world props. I want people to phys gun it since its a TV and a projection camera. But if I allow it, people can physgun my permanent text screens and my lawboards. Both are saved within the map. Is there a way to disallow physgun use for those entities specifically? Even though the textscreen is saved on the map via context menu?
     
  2. Scottie

    Scottie ~ Ent:King Dev ~ Contributor

    There is a blacklist/whitelist for entities in the FPP, found in Q-menu.
     
  3. Ryanlo22

    Ryanlo22 New Member

    I have tried that, it just ignored it completely. I have tried blacklisting both items and it wouldn't work.
     
  4. Scottie

    Scottie ~ Ent:King Dev ~ Contributor

    Have you tried it yourself or with players? Because if you're superadmin you're going to be able to move shit either way. Make sure you didn't tick the 'blacklist is whitelist' opt-in.
     
  5. Ryanlo22

    Ryanlo22 New Member

    I can set it persistent, but it just resets every restart/crash. Is there a code, that can save persistent settings? I have also tried with players as well.
     
  6. Scottie

    Scottie ~ Ent:King Dev ~ Contributor

    Entity:SetPersistent(boolean persist) from Gwiki
     
  7. Ryanlo22

    Ryanlo22 New Member

    how would I specify the entity or is it all persistent entities and where would I place that? Would it be on the same line as the code for the save lawboards?
     
  8. Scottie

    Scottie ~ Ent:King Dev ~ Contributor

    It has to be in the entity its init.lua (i was assuming you meant custom add-ons tv/projector). As 'self'.
     
  9. Ryanlo22

    Ryanlo22 New Member

    No, I want the lawboards to be persistent. It was the only way I could have it to where no one (not even me) to move law boards... Once set persistant it was not able to be physgunned, so is there a way to do the Entity:SetPersistent(boolean persist) for lawboards? I have rougly 5 of them on my server... If I CAN is it per lawboard, or just one code for all of them?
     
  10. Scottie

    Scottie ~ Ent:King Dev ~ Contributor

    Make an autospawn script in autorun that spawns them in at whatever pos/angle you need.
     
  11. Ryanlo22

    Ryanlo22 New Member

    I have done that already, but when it spawns in the server it still becomes a world prop that can be physguned
     
  12. function ENT:physgunPickup(ply)
    if ply:GetNWString("usergroup") == "whateveeryouwant" then
    return true
    else
    return false
    end
    end

    function ENT:CanTool(ply, trace, mode)
    if ply:GetNWString("usergroup") == "whateveeryouwant" then
    return true
    else
    return false
    end
    end

    You could try adding that to the lawboard entities code, just make a usergroup that nobody can be and set the variables to that
    hope this helps!
     
  13. Suspeccct

    Suspeccct Member

    How do you do this with vehicles if the vehicles don't use 1 lua file like the scoreboard?
     
  14. LavaLemon

    LavaLemon Member

    Yes i also want to know about this ,i have 3d car dealer and players keep phygun cars when stolen
     

Share This Page