Freeze but still use keys

Hi :slight_smile:
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


here a video :smiley:

Check if the player is frozen in a StartCommand hook. If so, remove IN_ATTACK and IN_ATTACK2 from their registered keys down.


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
left click
right click

The mouse button are considered “keys”

when i fully freeze the player input is not working :frowning:

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.