Jump to content

Is there a way to make a custom action happen for a player when press the Force Attack key the player configured for themself?


Recommended Posts

hello, I want to make something happen for players when they press the force attack key (CONTROL_FORCE_ATTACK) they configured for them self.

does anyone know a way i can do this because i'm at a loss and i cant find anything about it

 

thanks for reading and any help

Link to comment
Share on other sites

anyone know the way?

before some update which broke ("fixed") some glitches I was able to use something like this with keyhandler

if TheInput:IsControlPressed(CONTROL_FORCE_ATTACK) then
        if TheWorld.ismastersim then
            BufferedAction(ThePlayer, ThePlayer, ACTIONS.NEWATK):Do()
        else
            SendRPCToServer(RPC.DoWidgetButtonAction, ACTIONS.NEWATK.code, ThePlayer, ACTIONS.NEWATK.mod_name)
        end
    end

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...