Twiznak 57 Posted November 26, 2018 Hi. I am stumped. I want to add color text and an icon Spoiler <t color='#FF0000'>Arsenal</t><img size='2' image='\a3\ui_f\data\GUI\Cfg\Hints\Annoucning_ca'/> to an arsenal action scripted onto a vehicle with a vehicle respawn module. that modules expression field Spoiler if (isServer) then { params [["_newVeh", objNull,[objNull]], ["_oldVeh", objNull,[objNull]]]; 0 = [ "AmmoboxInit", [ _newVeh, true, {(_this distance _target) < 10} ] ] remoteExec ["BIS_fnc_arsenal",[0,-2] select isDedicated,_newVeh]; }; I have added color text and icons to every other action but I can't figure out where to put it here because its not an addAction. Please help out here. Share this post Link to post Share on other sites
Larrow 2822 Posted November 26, 2018 Something like... if (isServer) then { params [["_newVeh", objNull,[objNull]], ["_oldVeh", objNull,[objNull]]]; //Arsenal automatically handles adding clients action [ "AmmoboxInit", [ _newVeh, true, {(_this distance _target) < 10} ] ] call BIS_fnc_arsenal; //Spawn code on clients to change action text [ _newVeh, { //Wait for the arsenal to add client action waitUntil { !isNil { _this getVariable "bis_fnc_arsenal_action"; } }; //Get Arsenal action ID _actionID = _this getVariable "bis_fnc_arsenal_action"; //Update action text _this setUserActionText[ _actionID, "<t color='#FF0000'>Arsenal</t><img size='2' image='\a3\ui_f\data\GUI\Cfg\Hints\Annoucning_ca'/>" ]; } ] remoteExec ["BIS_fnc_spawn",[0,-2] select isDedicated,_newVeh]; }; untested. 1 1 Share this post Link to post Share on other sites
Twiznak 57 Posted November 26, 2018 Hi Larrow, I just tested this and i got the same error I have been getting Spoiler 21:18:22 Error in expression <, ["_oldVeh", objNull,[objNull]]]; //Arsenal automatically handles adding c> 21:18:22 Error position: <//Arsenal automatically handles adding c> 21:18:22 Error Invalid number in expression 21:18:22 Error in expression <, ["_oldVeh", objNull,[objNull]]]; //Arsenal automatically handles adding c> 21:18:22 Error position: <//Arsenal automatically handles adding c> 21:18:22 Error Invalid number in expression What are we doing wrong here? 1 Share this post Link to post Share on other sites
Larrow 2822 Posted November 26, 2018 Remove the comments from the code when adding it to the expression field. 1 Share this post Link to post Share on other sites
HazJ 1289 Posted November 26, 2018 13 minutes ago, Twiznak said: What are we doing wrong here? 1 Share this post Link to post Share on other sites
Twiznak 57 Posted November 26, 2018 8 minutes ago, Larrow said: Remove the comments from the code when adding it to the expression field. My avatar says it all. Sometimes I ask myself "Why are you soo Dumb?" and I don't have a good answer LOL Thank you Larrow. This solves my problem. It works on both local hosted and dedicated servers. Thank you for helping me. 1 1 1 Share this post Link to post Share on other sites
Twiznak 57 Posted November 26, 2018 Just now, HazJ said: I know, I know. I earned every bit of that. 1 Share this post Link to post Share on other sites
davidoss 552 Posted December 1, 2018 On 26.11.2018 at 6:10 AM, Larrow said: Something like... if (isServer) then { params [["_newVeh", objNull,[objNull]], ["_oldVeh", objNull,[objNull]]]; //Arsenal automatically handles adding clients action [ "AmmoboxInit", [ _newVeh, true, {(_this distance _target) < 10} ] ] call BIS_fnc_arsenal; //Spawn code on clients to change action text [ _newVeh, { //Wait for the arsenal to add client action waitUntil { !isNil { _this getVariable "bis_fnc_arsenal_action"; } }; //Get Arsenal action ID _actionID = _this getVariable "bis_fnc_arsenal_action"; //Update action text _this setUserActionText[ _actionID, "<t color='#FF0000'>Arsenal</t><img size='2' image='\a3\ui_f\data\GUI\Cfg\Hints\Annoucning_ca'/>" ]; } ] remoteExec ["BIS_fnc_spawn",[0,-2] select isDedicated,_newVeh]; }; untested. HI Larrow is there a way to do similar thing with object interactions? (addaction command not used) Share this post Link to post Share on other sites