Jump to content

[5.0] SCROLL WHEEL RUBBER BULLETS (Like Asylum & Olympus)


Recommended Posts

  • 1 month later...
  • 10 months later...

Hey was just wondering if anyone knows how to have the rubber bullet addAction for only certain weapons I have tried doing this in the west case inside setupActions.sqf:

 

 
 
 
Spoiler

if(currentWeapon player == "arifle_MXM_Black_F") then {
            life_actions = life_actions + [player addAction["<t color='#51FF00'>Load Rubber Bullets</t>",{player setVariable ['nonLethals',true,true];},"",0,false,false,"",'(!(player getVariable ["nonLethals",false])']];
            life_actions = life_actions + [player addAction["<t color='#FF0000'>Load Lethal Bullets</t>",{player setVariable ['nonLethals',false,true];},"",0,false,false,"",'((player getVariable ["nonLethals",false])']];
        };

 

Any help would be greatly appreciated.

Thanks!

Link to post
Share on other sites

Don't put the weapon check in the setupActions. Put the check in the addAction conditions or the script.

Ex. without check
life_actions = life_actions + [player addAction["<t color='#51FF00'>Load Rubber Bullets</t>",{player setVariable ['nonLethals',true,true];},"",0,false,false,"",'(!(player getVariable ["nonLethals",false])']];

Ex. with check
life_actions = life_actions + [player addAction["<t color='#51FF00'>Load Rubber Bullets</t>",{player setVariable ['nonLethals',true,true];},"",0,false,false,"",'((currentWeapon player isEqualTo "ar_MXM_Black_F") && !(player getVariable ["nonLethals",false])']];

  • Thanks 1
Link to post
Share on other sites
18 hours ago, Fawks said:

Don't put the weapon check in the setupActions. Put the check in the addAction conditions or the script.

Ex. without check
life_actions = life_actions + [player addAction["<t color='#51FF00'>Load Rubber Bullets</t>",{player setVariable ['nonLethals',true,true];},"",0,false,false,"",'(!(player getVariable ["nonLethals",false])']];

Ex. with check
life_actions = life_actions + [player addAction["<t color='#51FF00'>Load Rubber Bullets</t>",{player setVariable ['nonLethals',true,true];},"",0,false,false,"",'((currentWeapon player isEqualTo "ar_MXM_Black_F") && !(player getVariable ["nonLethals",false])']];

Ah I see, thank you!

Link to post
Share on other sites
  • 1 month later...

I get this error and is this normal rank 1 cop have Lethal?

 

 8:31:20 Error in expression <player getVariable ["nonLethals",false])>
 8:31:20   Error position: <>
 8:31:20   Error Missing )
 8:31:20 Error in expression <player getVariable ["nonLethals",false])>
 8:31:20   Error position: <>
 8:31:20   Error Missing )
 8:31:20 Error in expression <player getVariable ["nonLethals",false])>
 8:31:20   Error position: <>
 8:31:20   Error Missing )
 8:31:20 Error in expression <player getVariable ["nonLethals",false])>
 8:31:20   Error position: <>
 8:31:20   Error Missing )

Link to post
Share on other sites
On 6/16/2019 at 12:05 AM, john_65wadwada654 said:

I get this error and is this normal rank 1 cop have Lethal?

For the error, this tutorial has an error, remove the extra "(":

image.thumb.png.9288dcf4864cee4d17b37652d20414b8.png

 

As for the lethals, don't give them a gun that supports lethals then if you don't want that. There are tasers in by default!

  • Like 1
Link to post
Share on other sites
On 6/18/2019 at 6:22 PM, imthatguyhere said:

For the error, this tutorial has an error, remove the extra "(":

image.thumb.png.9288dcf4864cee4d17b37652d20414b8.png

 

As for the lethals, don't give them a gun that supports lethals then if you don't want that. There are tasers in by default!

so i chang it like this

life_actions = life_actions + [player addAction["<t color='#FF0000'>Load Lethal Bullets</t>",{player setVariable ['nonLethals',false,true];},"",0,false,false,"",'(player getVariable ["nonLethals",false]']]; but geting this erore

this is erore

Spoiler

 6:17:11 "[Life Client] Setting up user actions"
 6:17:11 Error in expression <player getVariable ["nonLethals",false])>
 6:17:11   Error position: <>
 6:17:11   Error Missing )
 6:17:11 Error in expression <(player getVariable ["nonLethals",false]>
 6:17:11   Error position: <>
 6:17:11   Error Missing )
 6:17:11 Error in expression <(player getVariable ["nonLethals",false]>
 6:17:11   Error position: <>
 6:17:11   Error Missing )

 

 

 

Link to post
Share on other sites
11 hours ago, john_65wadwada654 said:

so i chang it like this

life_actions = life_actions + [player addAction["<t color='#FF0000'>Load Lethal Bullets</t>",{player setVariable ['nonLethals',false,true];},"",0,false,false,"",'(player getVariable ["nonLethals",false]']];

giphy.gif?cid=790b76115d0cde58773072335580b58e&rid=giphy.gif

I said an extra "(" to remove, not to remove a full set of round brackets...

Edited by imthatguyhere
  • Haha 1
Link to post
Share on other sites
11 hours ago, imthatguyhere said:

giphy.gif?cid=790b76115d0cde58773072335580b58e&rid=giphy.gif

I said an extra "(" to remove, not to remove a full set of round brackets...

 

like this ?

life_actions = life_actions + [player addAction["<t color='#FF0000'>Load Lethal Bullets</t>",{player setVariable ['nonLethals',false,true];},"",0,false,false,"",'(player getVariable ["nonLethals",false])']]; ??

Link to post
Share on other sites
21 hours ago, john_65wadwada654 said:

 

like this ?

life_actions = life_actions + [player addAction["<t color='#FF0000'>Load Lethal Bullets</t>",{player setVariable ['nonLethals',false,true];},"",0,false,false,"",'(player getVariable ["nonLethals",false])']]; ??

Yes

Link to post
Share on other sites
  • 1 month later...

This is my stun script, but I don't know how to add it to the button. I tried it.

player addAction [ “<t color ='#51FF00'> 打开红光指示器 </ t>” ,{ player setVariable [ 'ZBKClient_dmg_Agony' ,true ,true ];},“” ,0 ,false ,false ,“” ,“(!(玩家getVariable [”ZBKClient_dmg_Agony“,false])' ]; 
player addAction [ ”<t color ='#FF0000'> 卸下红光指示器 </ t>“ ,{ player setVariable [  'ZBKClient_dmg_Agony' ,false ,true ];},“” ,0 ,false ,false ,“” ,'((player getVariable [“ZBKClient_dmg_Agony”,false])' ];
But it can't be executed. Thank you very much for asking for help.
My version is 5.0 Altis life

ZBKClient_evh_damageHandle.sqf

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

My problem now is that I have a tazed script in my task, but I don't know how to add it to the mouse wheel button and ask for help. I'm using another life server similar to Altis life 5.0

Use Altis Life 5.0, whatever you are running is a mess, talk to the creator if you want help or run the actual framework.

 

1 hour ago, lululala said:

I think he's a stunning script.

No, the random characters instead of "player" or whatnot there. That will error if it's in the file like that.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.