Jump to content
Sign in to follow this  
tanaka52

AddAction only to cargo?

Recommended Posts

I'm adding a stand alone paradrop addaction with an eject.sqf script. In my init I'm using

{if (_x isKindOf "AIR") then {_x addAction ["<t color='#FF0000'>PARADROP</t>","f\paradrop\eject.sqf",[1],0,false,true,""," driver  _target == _this"]}} foreach vehicles;

to add the action to all air vehicles. However, I only want the cargo(passengers) to have the action available. If I change "driver" to "cargo" it doesn't work at all.

Share this post


Link to post
Share on other sites

Fixed:

you may be able to check using getcargoindex a new command added in version 1.26

returns zero when a unit is the cargo

replace this

" cargo _target == _this"

with

"_target getcargoindex player == 0"

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
Sign in to follow this  

×