• Making a keypressed on a player?
    5 replies, posted
I've tried several things but they have all failed I don't think I'm doing this right. I don't want you to spoon feed this to me please just give me some pointers in the right direction or possible ways to edit the hitmenu to be used for this. Thanks for any help! [B]What I need it to do:[/B] I want to be able to click a button on a player for example "E" then I need it to execute a command or Function. [B]Example:[/B] The DarkRP Hit System is a great example of what I'm trying to do here. [IMG]http://i.imgur.com/2E3Yw8b.png[/IMG]
Then check how darkrp does it.
hook.Add( "PlayerUse", "ShouldWorkRight?", function( ply, ent ) print(ent) end ) [editline]3rd June 2017[/editline] Tell me if it doesn't work!
[QUOTE=KoffeSwed;52309405]hook.Add( "PlayerUse", "ShouldWorkRight?", function( ply, ent ) print(ent) end ) [editline]3rd June 2017[/editline] Tell me if it doesn't work![/QUOTE] Yeah that is if I wanted to use it on an entity to get that to work I think I would have to spawn an entity on the player and that would be annoying would there be any other way of doing this on the player.
A player IS an entity. [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/IsPlayer]Entity:IsPlayer[/url] [editline]3rd June 2017[/editline] Pretty much everything is an entity
[QUOTE=MPan1;52309648]A player IS an entity. [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/IsPlayer]Entity:IsPlayer[/url] [editline]3rd June 2017[/editline] Pretty much everything is an entity[/QUOTE] Okay thanks I'll mess with this a bit if I need anymore help I'll ask.
Sorry, you need to Log In to post a reply to this thread.