Jump to content
An_A3_Dev

Adding/removing actions

Recommended Posts

If I use hideOnUse in this addAction

 

player addAction
[
    "title",    // title
    {
        something; // script
    },
    nil,        // arguments
    1.5,        // priority
    true,        // showWindow
    true,        // hideOnUse
    "",            // shortcut
    "true",     // condition
    50,            // radius
    false,        // unconscious
    "",            // selection
    ""            // memoryPoint
];

 

how do I unhide the addAction?

Im using this to holster your weapon but I want the action to only show up when you have a weapon in your hand and for it to be removed when you have no weapon.

Share this post


Link to post
Share on other sites
1 hour ago, An_A3_Dev said:

Im using this to holster your weapon but I want the action to only show up when you have a weapon in your hand and for it to be removed when you have no weapon.

 

put that weapon check in the condition, so that it's true only when there's a weapon to holster

Share this post


Link to post
Share on other sites
3 hours ago, gc8 said:

 

put that weapon check in the condition, so that it's true only when there's a weapon to holster

I don't know what im doing wrong but what would I put in the condition. I keep trying to find an example on the wiki but I can't find anything. Would you happen to have an example or be able to direct me to an example?

Share this post


Link to post
Share on other sites

you can use "currentweapon player" to check if there's any weapon selected. so this script would look something like this:

 

player addAction
[
    "title",    // title
    {
        something; // script
    },
    nil,        // arguments
    1.5,        // priority
    true,        // showWindow
    true,        // hideOnUse
    "",            // shortcut
    "currentweapon player != '' ",     // condition
    50,            // radius
    false,        // unconscious
    "",            // selection
    ""            // memoryPoint
];

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×