mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-20 07:02:56 +03:00
tie purchased vehicles or vaults access via ...
playeruid
This commit is contained in:
17
dayz_code/actions/buy_or_sell.sqf
Normal file
17
dayz_code/actions/buy_or_sell.sqf
Normal file
@@ -0,0 +1,17 @@
|
||||
private["_trader_id","_category","_buy","_sell","_cancel"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
|
||||
_trader_id = (_this select 3) select 0;
|
||||
_category = (_this select 3) select 1;
|
||||
|
||||
_buy = player addAction ["Buy "+_category, "\z\addons\dayz_code\actions\buy_db.sqf",[_trader_id], 99, true, false, "",""];
|
||||
s_player_parts set [count s_player_parts,_buy];
|
||||
|
||||
_sell = player addAction ["Sell "+_category, "\z\addons\dayz_code\actions\sell_db.sqf",[_trader_id], 98, true, false, "",""];
|
||||
s_player_parts set [count s_player_parts,_sell];
|
||||
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 0, true, false, "",""];
|
||||
s_player_parts set [count s_player_parts,_cancel];
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
@@ -39,10 +39,10 @@ if (_qty >= _qty_in) then {
|
||||
player reveal _veh;
|
||||
_location = getPosATL _veh;
|
||||
|
||||
_veh setVariable ["characterID",dayz_characterID,true];
|
||||
_veh setVariable ["characterID",dayz_playerUID,true];
|
||||
|
||||
// server_publishVeh [_veh,[_dir,_objPosition],_vehicle,true,dayz_characterID]
|
||||
dayzPublishVeh = [_veh,[_dir,_location],_part_out,false,dayz_characterID];
|
||||
dayzPublishVeh = [_veh,[_dir,_location],_part_out,false,dayz_playerUID];
|
||||
|
||||
publicVariable "dayzPublishVeh";
|
||||
if (isServer) then {
|
||||
|
||||
@@ -54,12 +54,12 @@ if (!_isOk) then {
|
||||
player reveal _tent;
|
||||
|
||||
|
||||
_tent setVariable ["characterID",dayz_characterID,true];
|
||||
_tent setVariable ["characterID",dayz_playerUID,true];
|
||||
_tent setVariable ["OEMPos",_location,true];
|
||||
|
||||
//player setVariable ["tentUpdate",["Land_A_tent",_dir,_location,[dayz_tentWeapons,dayz_tentMagazines,dayz_tentBackpacks]],true];
|
||||
|
||||
dayzPublishObj = [dayz_characterID,_tent,[_dir,_location],"VaultStorageLocked"];
|
||||
dayzPublishObj = [dayz_playerUID,_tent,[_dir,_location],"VaultStorageLocked"];
|
||||
publicVariable "dayzPublishObj";
|
||||
if (isServer) then {
|
||||
dayzPublishObj call server_publishObj;
|
||||
|
||||
Reference in New Issue
Block a user