From 66408ded24c81df771d9f3eb55bb7dda4294dbc5 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Sun, 1 May 2016 17:08:48 -0400 Subject: [PATCH] Prevent trader menu action showing on players Fixes bug where player wearing a skin in serverTraders would show trader menu action on him. --- SQF/dayz_code/actions/AdvancedTrading/init.sqf | 2 +- SQF/dayz_code/compile/fn_selfActions.sqf | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/actions/AdvancedTrading/init.sqf b/SQF/dayz_code/actions/AdvancedTrading/init.sqf index 324043892..8d2bd724f 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/init.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/init.sqf @@ -3,7 +3,7 @@ disableSerialization; Z_traderData = (_this select 3); // gets the trader data ( e.g menu_Functionary1 ) if( isNil "Z_traderData" || count (Z_traderData) == 0)exitWith{ - cutText [format["There went something wrong selecting the trader."], "PLAIN DOWN"]; + "Something went wrong selecting the trader." call dayz_rollingMessages; }; if(DZE_ActionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 2609691a5..e373d3a54 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -5,7 +5,7 @@ scriptName "Functions\misc\fn_selfActions.sqf"; - [] call fnc_usec_selfActions; ************************************************************/ if (DZE_ActionInProgress) exitWith {}; -private ["_canPickLight","_text","_dir","_canDoThis","_w2m","_bb","_waterHoles","_unlock","_lock","_totalKeys","_temp_keys","_temp_keys_names","_hasKey","_oldOwner","_hasAttached","_isAnimal","_isZombie","_isHarvested","_isMan","_isFuel","_hasRawMeat","_hastinitem","_player_deleteBuild","_player_lockUnlock_crtl","_displayName","_hasIgnators","_menu","_menu1","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached","_combi","_findNearestGen","_humanity_logic","_low_high","_cancel","_buy","_buyV","_humanity","_traderMenu","_warn","_typeOfCursorTarget","_isVehicle","_isBicycle","_isDestructable","_isGenerator","_ownerID","_isVehicletype","_hasBarrel","_hasFuel20","_hasFuel5","_hasEmptyFuelCan","_itemsPlayer","_hasToolbox","_hasbottleitem","_isAlive","_isPlant","_istypeTent","_upgradeItems","_isCampSite","_isDisallowRefuel","_isDog","_isModular","_isModularDoor","_isHouse","_isGate","_isFence","_isLockableGate","_isUnlocked","_isOpen","_isClosed","_ownerArray","_ownerBuildLock","_ownerPID","_speed","_dog","_vehicle","_inVehicle","_cursorTarget","_primaryWeapon","_currentWeapon","_magazinesPlayer","_onLadder","_canDo","_nearLight","_vehicleOwnerID","_hasHotwireKit","_isPZombie","_dogHandle","_allowedDistance"]; +private ["_canPickLight","_text","_dir","_canDoThis","_w2m","_bb","_waterHoles","_unlock","_lock","_totalKeys","_temp_keys","_temp_keys_names","_hasKey","_oldOwner","_hasAttached","_isAnimal","_isZombie","_isHarvested","_isMan","_isFuel","_hasRawMeat","_hastinitem","_player_deleteBuild","_player_lockUnlock_crtl","_displayName","_hasIgnators","_menu","_menu1","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached","_combi","_findNearestGen","_humanity_logic","_low_high","_cancel","_buy","_buyV","_humanity","_traderMenu","_warn","_typeOfCursorTarget","_isVehicle","_isBicycle","_isDestructable","_isGenerator","_ownerID","_isVehicletype","_hasBarrel","_hasFuel20","_hasFuel5","_hasEmptyFuelCan","_itemsPlayer","_hasToolbox","_hasbottleitem","_isAlive","_isPlant","_istypeTent","_upgradeItems","_isCampSite","_isDisallowRefuel","_isDog","_isModular","_isModularDoor","_isHouse","_isGate","_isFence","_isLockableGate","_isUnlocked","_isOpen","_isClosed","_ownerArray","_ownerBuildLock","_ownerPID","_speed","_dog","_vehicle","_inVehicle","_cursorTarget","_primaryWeapon","_currentWeapon","_magazinesPlayer","_onLadder","_canDo","_nearLight","_vehicleOwnerID","_hasHotwireKit","_isPZombie","_dogHandle","_allowedDistance","_isPlayer"]; _vehicle = vehicle player; _inVehicle = (_vehicle != player); @@ -255,6 +255,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur _isModularDoor = _typeOfCursorTarget in ["Land_DZE_WoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_GarageWoodDoor","CinderWallDoor_DZ","CinderWallDoorSmall_DZ"]; _player_deleteBuild = false; _player_lockUnlock_crtl = false; + _isPlayer = isPlayer _cursorTarget; //fuel tanks if (_hasEmptyFuelCan) then { @@ -921,7 +922,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur */ // All Traders - if (_isMan && {_typeOfCursorTarget in serverTraders} && {!_isPZombie}) then { + if (_isMan && {!_isPlayer} && {_typeOfCursorTarget in serverTraders} && {!_isPZombie}) then { if (s_player_parts_crtl < 0) then { _humanity = player getVariable ["humanity",0]; _traderMenu = call compile format["menu_%1;",_typeOfCursorTarget];