Hello,
I need to make sure that only the owner of Entity (when he spawn it in F4 menu) could use Physgun on it
I use this:
[CODE]function ownd(ply)
local tr = utilx.GetPlayerTrace( ply, ply:GetCursorAimVector() )
local trace = util.TraceLine( tr )
trace.Entity:SetOwner(ply)
end[/CODE]
Doesn't work. Help me please.
This should probably be done in the gamemode. You can create your own version of this and set the owner of the entity created here: [url]https://github.com/FPtje/DarkRP/tree/a20464ac789824b26df1aad2c9c3834d6f702b30/entities/entities/spawned_shipment[/url]
[QUOTE=code_gs;50919726]This should probably be done in the gamemode. You can create your own version of this and set the owner of the entity created here: [url]https://github.com/FPtje/DarkRP/tree/a20464ac789824b26df1aad2c9c3834d6f702b30/entities/entities/spawned_shipment[/url][/QUOTE]
Thank u for the help!
It's util not utilx
Sorry, you need to Log In to post a reply to this thread.