Hey all,
somehow my DFrame opens 3 times or more when i try to call it through an entity.
im using this code:
[lua]
function ENT:Use( activator, caller )
if ( activator:IsPlayer() ) then
// Give the collecting player some free health
umsg.Start("_OpenDFrame", caller)
umsg.Entity(self)
umsg.End()
end
end
[/lua]
when i try to call the DFrame with its concommand it works just fine.
does anyone has some suggestions?
Thanks in advance.
[b][url=http://wiki.garrysmod.com/?title=Entity.SetUseType]Entity.SetUseType [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
You'd want SIMPLE_USE for what you're doing.
Thank you, ralle105!
[b]Resolved, plz close![/b]
Sorry, you need to Log In to post a reply to this thread.