1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

Custom Entity Limit

Discussion in 'DarkRP Modding Questions & Help' started by flamecow, Sep 22, 2013.

  1. flamecow

    flamecow New Member

    So, I've been programming some custom entities for a DarkRP server lately and have just recently ran into this problem. After one of the custom entities is removed, it still still count as existing; so you can't purchase any more. Is there any solution to this issue?

    And yes, every entity has owning_ent as a networked entity.
     
  2. [XG:RP] John :3

    [XG:RP] John :3 New Member

    I have this error too..
     
  3. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    set ent.SID = ply.SID on the entity.
     
  4. [XG:RP] John :3

    [XG:RP] John :3 New Member

    Where do i have to place it
     
  5. [XG:RP] John :3

    [XG:RP] John :3 New Member

    Ok i've tried to add the self.SID = self:Getowning_ent() under
    Code (Text):

    function ENT:Initialize()
        self:SetModel("models/props_lab/reciever01a.mdl")
        self:PhysicsInit(SOLID_VPHYSICS)
        self:SetMoveType(MOVETYPE_VPHYSICS)
        self:SetSolid(SOLID_VPHYSICS)
        self:SetColor(Color(255,216,0,255))
        local phys = self:GetPhysicsObject()
        if phys:IsValid() then phys:Wake() end
        self.sparking = false
        self.damage = 100
        self.IsMoneyPrinter = true
        timer.Simple(1.0, function() PrintMore(self) end)
        self:SetNWInt("PrintA",0)
        self.SID = self:Getowning_ent()
    end
     
    But doesnt work still.
     
  6. Bo98

    Bo98 Moderator Staff Member Contributor

    Code (Text):
        self.SID = self:Getowning_ent().SID
     
  7. [XG:RP] John :3

    [XG:RP] John :3 New Member

    Do i have to restart server when i have done that ?

    Still doenst work tried to restart server too..
     
    Last edited by a moderator: Sep 23, 2013
  8. [XG:RP] John :3

    [XG:RP] John :3 New Member

    BUMP i really need help with this
     
  9. flamecow

    flamecow New Member

    Doesn't seem to have worked for me.
     
  10. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    Do money printers and other default entities remove on disconnect?
    Did you add the entity to be bought? DarkRP only removes entities that players can buy through the F4 menu. If players get the entity in another way it's not DarkRP's responsibility to remove it.
     
  11. [XG:RP] John :3

    [XG:RP] John :3 New Member

    They buy it through F4, and i edited DarkRP settings not to remove the ents.
     
  12. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    Does the problem happen to default entities too?
     
  13. [XG:RP] John :3

    [XG:RP] John :3 New Member

    No idea.
     
  14. Scottie

    Scottie ~ Ent:King Dev ~ Contributor

    Then try it, would speed up the process probably.
     
  15. [XG:RP] John :3

    [XG:RP] John :3 New Member

    actually i can't the printers wont explode when i stun stick em. Well kind of big bug i hope it will get fixed
     
  16. flamecow

    flamecow New Member

    The server that was having the problems had a conflicting addon. Problem solved.
     
    (FPtje) Atheos likes this.

Share This Page