Scripts / [SOLVED] Player Drop Weapon

Author
Message
DragL
3
Years of Service
User Offline
Joined: 15th Jun 2020
Location:
Posted: 28th Dec 2020 15:11
hello! I have been looking for this for a while now, but is it possible, that when the player presses a certain key on their keyboard, they will drop the weapon that they are currently holding on the floor?
thanks!

The author of this post has marked a post as an answer.

Go to answer
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 28th Dec 2020 17:37
sort of, because the held weapon is actually different to the weapons you can pick up (the held weapons are a HUD element while the pick up weapons are normal entities) it requires you to place the matching pickup weapon for all weapons on any maps that needs it... and i'm not sure there is actually a good command to remove a specific weapon
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 28th Dec 2020 19:06
This post has been marked by the post author as the answer.
There's an old thread on this topic.

https://forum.game-guru.com/thread/221138#msg2621126
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 28th Dec 2020 22:23
yh that's swapping your gun with another (different to how GG handles it because you will actually leave the held weapon behind) but it won't let you just drop your weapon on the ground (though that's not actually the hard part, the hard part is working out how to remove said weapon from your hands as GG doesn't have a "remove held weapon" command - only hide all weapons or remove all weapons, so afaik you would have to store all the weapons being held, remove them all and then add them all back except the one you just dropped... not fun given that GG's weapon system is confusing mess
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
DragL
3
Years of Service
User Offline
Joined: 15th Jun 2020
Location:
Posted: 29th Dec 2020 10:34
thanks all! everything works now
PM

Login to post a reply

Server time is: 2024-04-20 04:48:49
Your offset time is: 2024-04-20 04:48:49