• How do I disable properties on DarkRP
    3 replies, posted
I have added a workshop addon to my DarkRP server called [PROTOTYPE] but the problem is I cannot consume npcs because they arent my property. How can I disable that the world owns the npcs?
This should help you out : [CODE] function SetMine( ply ) if ply:GetEyeTrace().Entity:IsValid() and ply:IsAdmin() then ply:GetEyeTrace().Entity:SetOwner( ply ) ply:ChatPrint("This entity is now yours!") end end concommand.Add( "setasmine", SetMine ) [/CODE] [I]Look at your NPC and type in console "setasmine"[/I] [I]Save this in lua/autorun/server/blabla.lua[/I]
[QUOTE=_FR_Starfox64;41854146]This should help you out : [CODE] function SetMine( ply ) if ply:GetEyeTrace().Entity:IsValid() and ply:IsAdmin() then ply:GetEyeTrace().Entity:SetOwner( ply ) ply:ChatPrint("This entity is now yours!") end end concommand.Add( "setasmine", SetMine ) [/CODE] [I]Look at your NPC and type in console "setasmine"[/I] [I]Save this in lua/autorun/server/blabla.lua[/I][/QUOTE] Sorry to say but it did not work. [editline]16th August 2013[/editline] [QUOTE=_FR_Starfox64;41854146]This should help you out : [CODE] function SetMine( ply ) if ply:GetEyeTrace().Entity:IsValid() and ply:IsAdmin() then ply:GetEyeTrace().Entity:SetOwner( ply ) ply:ChatPrint("This entity is now yours!") end end concommand.Add( "setasmine", SetMine ) [/CODE] [I]Look at your NPC and type in console "setasmine"[/I] [I]Save this in lua/autorun/server/blabla.lua[/I][/QUOTE] I actually meant npcs not enteties.
They are still considered "entities" for the game, if this dosen't work then I don't know.
Sorry, you need to Log In to post a reply to this thread.