Jump to content
Sign in to follow this  
Tejkr

Context menu assign item script

Recommended Posts

Hi, I'm working on a script that will make a context menu option, for example "Assign gear" and it will add let's say belt, assign gun and glasses for example. Then it will change to "Unassign gear" and it will remove that stuff. Changing the stuff shouldn't be hard, but I don't know how to add that context menu option. And it needs to change the gear, then show up the new option repeatedly. I appreciate any help, but references as well! Thank!

Edited by Tejkr

Share this post


Link to post
Share on other sites

Sorry for double post, but I made a progress, it doesn't work well anyway.

waitUntil { !isNull player }; 
_activatingPlayer = _this select 1;
_actionId = _this select 2;
player addVest "Hntr_belt";  
player addHeadGear "hnt_orngcap";
player addWeapon "Hntr_Sdarm";
player removeAction _this select 2;
player addaction ["Gear Off", "\Security Intervention Forces\Data\scripts\agentgearoff.sqf"];

Unit has added action called "Gear Up" and it will assing him the vest, cap and sidearm. But then I want the action to disappear and new one to appear (called "Gear Off" for example). When I click it, it would remove the added stuff and then remove the action and add "Gear Up" again. I can't anything like this on Internet, but I guess I'm doing something wrong with "removeaction", don't know exactly what.

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  

×