1. Post #1

    December 2015
    66 Posts
    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
    Reply With Quote Edit / Delete Windows 10 Chrome Germany Show Events

  2. Post #2
    Lunaversity's Avatar
    October 2014
    715 Posts
    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.
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events

  3. Post #3

    December 2015
    66 Posts
    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 :D
    Reply With Quote Edit / Delete Windows 10 Chrome Germany Show Events

  4. Post #4
    -snip-
    code_gs's Avatar
    March 2013
    16,486 Posts
    Check if the player is frozen in a StartCommand hook. If so, remove IN_ATTACK and IN_ATTACK2 from their registered keys down.
    Reply With Quote Edit / Delete Android Chrome United States Show Events

  5. Post #5

    December 2015
    66 Posts
    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
    Reply With Quote Edit / Delete Windows 10 Chrome Germany Show Events

  6. Post #6
    -snip-
    code_gs's Avatar
    March 2013
    16,486 Posts
    If the menus are clientside and use the input library to determine a mouse state and not KeyDown, then it should still work.
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events

  7. Post #7

    December 2015
    66 Posts
    its with keys not with mouse

    i use Keys
    A
    D
    left click
    right click
    Reply With Quote Edit / Delete Windows 10 Chrome Germany Show Events

  8. Post #8
    -snip-
    code_gs's Avatar
    March 2013
    16,486 Posts
    The mouse button are considered "keys"
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events

  9. Post #9

    December 2015
    66 Posts
    when i fully freeze the player input is not working :(
    Reply With Quote Edit / Delete Windows 10 Chrome Germany Show Events

  10. Post #10
    -snip-
    code_gs's Avatar
    March 2013
    16,486 Posts
    You'll probably have to make a custom "freeze" method to remove movement related functionality yourself while still allowing for input.
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events

  11. Post #11

    December 2015
    66 Posts
    yes, but the only problem is that i cant deactivated primary attack and secondary attack
    Reply With Quote Edit / Delete Windows 10 Chrome Germany Show Events

  12. Post #12
    -snip-
    code_gs's Avatar
    March 2013
    16,486 Posts
    You could do something hacky like constantly setting SetNextPrimaryFire/SetNextSecondaryFire to a higher value if they're frozen.
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events