Scripts / Disable weapon switch

Author
Message
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 1st Oct 2019 22:59 Edited at: 1st Oct 2019 23:08
Iam try to figure out how to disable the swaping between the weapons, i mean not a weapon limit, just disable the mouse scroll and numbers to change the weapons u have in the invetory.
I just found this one from smallg

According to hes description, it prevent the swaping between the 3 and 9 slot, it was made for the weapon limit script from this thread
https://forum.game-guru.com/thread/221054
and have to be assigned to a always active model.
But it doesnt do anything.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 1st Oct 2019 23:34
All game controls are handled by the script gameplayercontrol.lua, it is a very daunting script but the bit you want to look at is at lines 457 to 490.
Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 2nd Oct 2019 00:06 Edited at: 2nd Oct 2019 00:59
Thnx, yes but by that way i disable the switch constantly, i meant something that i can implement to a weapon script.
I need it 4 your static weapon script.
As u remember, while using a static gun with the script there was still the possibility 2 swaping between the weapons and i wanna disable that.The problem is when u use the static weapon and switch it to another weapon, the player is still frozen and cant move even if he holds allready another weapon and if u pressing e to release the static one, u get unfrozen but the static weapon itself remains in the slot.
One way to fix that would be to disable the switching.
The second way, i guess the easier one, would be if the static gun would be released automaticly when u scroll with the wheel or change the weapon by number buttons just as by pressing E for release,so pressing e to take the static gun, and press E, scroll wheel and 1,2,3,4 etc. for release it.

Attachments

Login to view attachments
PM

Login to post a reply

Server time is: 2024-04-20 11:13:19
Your offset time is: 2024-04-20 11:13:19