Hello, So i wanted to make a trader work for a UID instead of Hummanity. So here is what I did.
So i made this file called VIPlevel.sqf
if ((getPlayerUID player) in [ "0", "0", "0" ]) then { _playerObj setVariable["vip1_list",1,true]; }; if ((getPlayerUID player) in [ "#", "##", "###" ]) then { _playerObj setVariable["vip2_list",1,true]; }; if ((getPlayerUID player) in [ "0", "0", "0" ]) then { _playerObj setVariable["vip3_list",1,true]; };
Then at the top of the fn_selfActions.sqf I did this:
#include "Viplevels.sqf" diag_log ("Fn_selfActions Started"); scriptName "Functions\misc\fn_selfActions.sqf";
And then at the trader part this
// All Traders if (_isMan and !_isPZombie and _traderType in serverTraders) then { if (s_player_parts_crtl < 0) then { // get humanity _humanity = player getVariable ["humanity",0]; _traderMenu = call compile format["menu_%1;",_traderType]; // get player vip _vip1 = player getVariable ["vip1_list",0]; _vip2 = player getVariable ["vip2_list",0]; _vip3 = player getVariable ["vip3_list",0]; // diag_log ("TRADER = " + str(_traderMenu)); _low_high = "low"; _humanity_logic = false; if((_traderMenu select 2) == "friendly") then { _humanity_logic = (_humanity < -5000); }; if((_traderMenu select 2) == "hostile") then { _low_high = "high"; _humanity_logic = (_humanity > -5000); }; if((_traderMenu select 2) == "hero") then { _humanity_logic = (_humanity < 5000); }; if((_traderMenu select 2) == "vip0") then { _humanity_logic = (_humanity < -5000000); }; if((_traderMenu select 2) == "vip1") then { _humanity_logic = _vip1; }; if((_traderMenu select 2) == "vip2") then { _humanity_logic = _vip2; }; if((_traderMenu select 2) == "vip3") then { _humanity_logic = _vip3; }; if(_humanity_logic) then { _cancel = player addAction [format[localize "STR_EPOCH_ACTIONS_HUMANITY",_low_high], "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; s_player_parts set [count s_player_parts,_cancel]; } else {
Anybody know who to get this to work. As soon as i head to one of these trades the fn_selfActions.sqf stops working.