Save player and vehicle after trade

Also forgot to commit a change yesterday
This commit is contained in:
icomrade
2016-09-11 12:52:38 -04:00
parent b835059885
commit b806043a4a
2 changed files with 13 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ class AdvancedTrading
{ {
idd = 711197; idd = 711197;
onLoad = "uiNamespace setVariable ['AdvancedTrading', _this select 0]"; onLoad = "uiNamespace setVariable ['AdvancedTrading', _this select 0]";
onUnload = "player_forceSave; if (!isNull Z_vehicle) then {PVDZ_veh_Save = [Z_vehicle,'all']; publicVariable 'PVDZ_veh_Save';};";
class Controls { class Controls {
class RscText_ATBackground1: ZSC_RscText class RscText_ATBackground1: ZSC_RscText
{ {

View File

@@ -287,5 +287,17 @@ fa_plr2str = {
_res _res
}; };
array_reduceSize = {
private ["_array1","_array","_count","_num"];
_array1 = _this select 0;
_array = _array1 - ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing","Fishing_Swing","Sledge_Swing","CSGAS"];
_count = _this select 1;
_num = count _array;
if (_num > _count) then {
_array resize _count;
};
_array
};
// Precise base building 1.0.5 // Precise base building 1.0.5
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\kk_functions.sqf"; call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\kk_functions.sqf";