Jump to content

supertraders


Recommended Posts

I have created two new traders on my server....

1 - superher requires 15,000 positive humanity to access the menu... this is working

2 - superban requires 40,000 negative humanity to access the menu.... trader is there and working but anyone can access it regardless of humanity.

 

fn_selfActions.sqf : 

// All Traders
    if (_isMan && {!(isPlayer _cursorTarget)} && {_typeOfCursorTarget in serverTraders} && {!_isPZombie}) then {
        if (s_player_parts_crtl < 0) then {
            _humanity = player getVariable ["humanity",0];
            _traderMenu = call compile format["menu_%1;",_typeOfCursorTarget];        
            _low_high = localize "STR_EPOCH_ACTIONS_HUMANITY_LOW";
            _required="";
            _humanity_logic = false;
            
             if ((_traderMenu select 2) == "superher") then {
                _humanity_logic = (_humanity < 15000);
                _required="more than 15000 of Humanity";
            };
            if ((_traderMenu select 2) == "superban") then {
				_low_high = localize "STR_EPOCH_ACTIONS_HUMANITY_HIGH";
                _humanity_logic = (_humanity < -40000);
                _required="more than -40000 of Humanity";                
            };                            
            if ((_traderMenu select 2) == "friendly") then {
                _humanity_logic = (_humanity < -5000);
                _required="more than -5000 of Humanity";
            };
            if ((_traderMenu select 2) == "hostile") then {
                _low_high = localize "STR_EPOCH_ACTIONS_HUMANITY_HIGH";
                _humanity_logic = (_humanity > -5000);
                _required="humanity to high";
            };
            if ((_traderMenu select 2) == "hero") then {
                _humanity_logic = (_humanity < 5000);
                _required="humanity to low";
            };

 

any ideas on why the humanity is not affecting the "superban" trader and allowing everyone to access it...? 

 

Link to comment
Share on other sites

7 hours ago, [email protected] said:

I have created two new traders on my server....

1 - superher requires 15,000 positive humanity to access the menu... this is working

2 - superban requires 40,000 negative humanity to access the menu.... trader is there and working but anyone can access it regardless of humanity.

 

fn_selfActions.sqf : 


// All Traders
    if (_isMan && {!(isPlayer _cursorTarget)} && {_typeOfCursorTarget in serverTraders} && {!_isPZombie}) then {
        if (s_player_parts_crtl < 0) then {
            _humanity = player getVariable ["humanity",0];
            _traderMenu = call compile format["menu_%1;",_typeOfCursorTarget];        
            _low_high = localize "STR_EPOCH_ACTIONS_HUMANITY_LOW";
            _required="";
            _humanity_logic = false;
            
             if ((_traderMenu select 2) == "superher") then {
                _humanity_logic = (_humanity < 15000);
                _required="more than 15000 of Humanity";
            };
            if ((_traderMenu select 2) == "superban") then {
				_low_high = localize "STR_EPOCH_ACTIONS_HUMANITY_HIGH";
                _humanity_logic = (_humanity < -40000);
                _required="more than -40000 of Humanity";                
            };                            
            if ((_traderMenu select 2) == "friendly") then {
                _humanity_logic = (_humanity < -5000);
                _required="more than -5000 of Humanity";
            };
            if ((_traderMenu select 2) == "hostile") then {
                _low_high = localize "STR_EPOCH_ACTIONS_HUMANITY_HIGH";
                _humanity_logic = (_humanity > -5000);
                _required="humanity to high";
            };
            if ((_traderMenu select 2) == "hero") then {
                _humanity_logic = (_humanity < 5000);
                _required="humanity to low";
            };

 

any ideas on why the humanity is not affecting the "superban" trader and allowing everyone to access it...? 

 

if ((_traderMenu select 2) == "superban") then {
                _low_high = localize "STR_EPOCH_ACTIONS_HUMANITY_HIGH";
                _humanity_logic = (_humanity > -40000);
                _required="more than -40000 of Humanity";                
            };   

 

change what is in red....  the >

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...