• Freeze but still use keys
    11 replies, posted
Hi :) is it possible to Freeze the player, but he can still use all keys, BUT not attack with the current weapon, so the weapon of the player is freezed, so when i press left click, he is not attacking. i am currently using the FL Enum FL_ATCONTROLS
In reality there would be no point to freeze someone and let them use their keys cause most admins usually freeze people in the air or in a sit away from doors, makes no sense.
i freeze the player and use the keys to control the menu that is open but when i select "heal building", the player attacks the building and makes damage on it [video]https://youtu.be/_g8GSf8HLcI[/video] here a video :D
Check if the player is frozen in a StartCommand hook. If so, remove IN_ATTACK and IN_ATTACK2 from their registered keys down.
so FL_ATCONTROLS + remove IN_ATTACK and IN_ATTACK2 but how can i use left and right click when i remove in_attack and in_attack2? Left Click - Select current selction in menu Right Click - Quit Menu
If the menus are clientside and use the input library to determine a mouse state and not KeyDown, then it should still work.
its with keys not with mouse i use Keys A D left click right click
The mouse button are considered "keys"
when i fully freeze the player input is not working :(
You'll probably have to make a custom "freeze" method to remove movement related functionality yourself while still allowing for input.
yes, but the only problem is that i cant deactivated primary attack and secondary attack
You could do something hacky like constantly setting SetNextPrimaryFire/SetNextSecondaryFire to a higher value if they're frozen.
Sorry, you need to Log In to post a reply to this thread.