I have idle NPC's in which open a derma panel when you press E on them, although it opens for all users? Here's the code:
[CODE]function ENT:AcceptInput( name, activator, caller )
if name == "Use" and caller :IsPlayer() then
umsg.Start( "scrapshop", ply )
umsg.End()
Entity( 1 ):EmitSound( "vo/eli_lab/eli_lookaround.wav" )
end
end[/CODE]
I'd like it to only open for the user that originally pressed E.
Any help is appreciated
What is 'ply'? You never defined it
Yeah you should be using caller.. And heres a tip use [URL="https://wiki.garrysmod.com/page/Net_Library_Usage"]net[/URL] instead of umsg
[QUOTE=MPan1;50976900]What is 'ply'? You never defined it[/QUOTE]
Great point, I changed it to 'caller'. Hopefully that fixed it. Just need someone to test it with me now. Thanks a lot :v:
[editline]31st August 2016[/editline]
Works perfectly now, thanks guys.
Sorry, you need to Log In to post a reply to this thread.