• dropweapon with z
    9 replies, posted
how to do dropweapon to z because keypress does not detect it so i want it to drop current weapon when i press z
For most people 'Z' is to undo there props so try thinking of other keys like # or somthing.
You can change it in your options.
i want people who join the server and pickup weapons to be able to drop them by default on z
You'd have to completely alter the gamemode to do that.
[QUOTE=code_gs;43136339]You'd have to completely alter the gamemode to do that.[/QUOTE] do you know how i can set bindings from the server side?
It isn't about binds, it is about lua. You cannot, by default, even drop weapons in gmod. You will have to code it so when they press "undo" it creates an entity for the current weapon they are holding and removes it from their inventory.
[QUOTE=checkmate;43137020]do you know how i can set bindings from the server side?[/QUOTE] You are not supposed to do that. Use this hook: [url]http://wiki.garrysmod.com/page/GM/PlayerBindPress[/url] to block default action and execute your drop concommand from it. ( It's clientside )
[QUOTE=Fortune11709;43137051]It isn't about binds, it is about lua. You cannot, by default, even drop weapons in gmod. You will have to code it so when they press "undo" it creates an entity for the current weapon they are holding and removes it from their inventory.[/QUOTE] I have done the entity creation i just need to know how to activate it when they press a key like z [editline]10th December 2013[/editline] [QUOTE=Robotboy655;43137063]You are not supposed to do that. Use this hook: [url]http://wiki.garrysmod.com/page/GM/PlayerBindPress[/url] to block default action and execute your drop concommand from it. ( It's clientside )[/QUOTE] [url]http://i.imgur.com/2H0OaU1.jpg[/url] bind press doesn't get called because suit zoom is not default how can we make sure it is default
[QUOTE=checkmate;43137094] [url]http://i.imgur.com/2H0OaU1.jpg[/url] bind press doesn't get called because suit zoom is not default how can we make sure it is default[/QUOTE] Look for "undo" bind and return true to suppress default action.
Sorry, you need to Log In to post a reply to this thread.