Advertisement
Guest User

Untitled

a guest
May 18th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 3.92 KB | None | 0 0
  1. {
  2.     private _fnc_scriptNameParent = if (isNil '_fnc_scriptName') then {'OEC_fnc_JKnubUkkbxmToEM'} else {_fnc_scriptName};
  3.     private _fnc_scriptName = 'OEC_fnc_JKnubUkkbxmToEM';
  4.     scriptName _fnc_scriptName;
  5.  
  6. #line 1 "core\LgEyrUVzgnJMJSs\fn_JKnubUkkbxmToEM.sqf [OEC_fnc_JKnubUkkbxmToEM]"
  7. private["_mode","_action","_item","_index","_atm","_box","_defaultTime","_error"];if(isNull(findDisplay 80000)) exitWith{};_index=lbCurSel 80001;_mode=(oev_dep_data select _index) select 1;_item=((oev_dep_data select _index) select 3);_atm=cursorTarget;_error=false;closeDialog 0;hint"Sending claim request to server - Please wait...";uiSleep random(10.0);if((!isNull(findDisplay 80000))||(((oev_dep_data select _index) select 3)!=_item)) exitWith{hint"An error has occured and the claim was refused. Please try again, later.";};if((typeOf _atm)!="Land_Atm_01_F") exitWith{hint"You need to be at an ATM to claim this deposit."};switch(_mode) do{case 2:{private["_defaultTime","_box"];_defaultTime=time+900;if(count(attachedObjects _atm)==0) then{_box="Box_IND_Ammo_F"createVehicleLocal(position _atm);_box allowDamage false;_box setVariable["atmObject",_atm,false];_box attachTo[_atm,[0,-1,-1]];clearWeaponCargo _box;clearMagazineCargo _box;clearItemCargo _box;clearBackpackCargo _box;_box addItemCargo[_item,(oev_dep_data select _index) select 2];_box setVariable["deletionTime",_defaultTime];[_box,_defaultTime]spawn{private["_box","_defaultTime"];_box=param[0,objNull,[objNull]];_defaultTime=param[1,-1,[0]];if(_box==objNull||_defaultTime==-1) exitWith{_error=true};waitUntil{time>(_box getVariable["deletionTime",_defaultTime])};deleteVehicle _box;};}else{_box=(attachedObjects _atm) select 0;_box addItemCargo[_item,(oev_dep_data select _index) select 2];_box setVariable["deletionTime",_defaultTime];};};case 3:{private["_curQuan","_addQuan","_weight"];if(oehGnxocnBCiMje+(([([_item]call OEC_fnc_varToStr)]call OEC_fnc_IIpGdrvsasDEMtH)*((oev_dep_data select _index) select 2))>;oev_maxWeight) exitWith{systemChat"You do not have enough room to store this item.";_error=true;};_curQuan=missionNamespace getVariable[_item,0];
  8. _addQuan=(oev_dep_data select _index) select 2;missionNamespace setVariable[_item,(_curQuan+_addQuan)];yIhULMbdRTCPzwi=(yIhULMbdRTCPzwi+_addQuan);_weight=([([_item]call OEC_fnc_varToStr)]call OEC_fnc_IIpGdrvsasDEMtH)*_addQuan;oehGnxocnBCiMje=oehGnxocnBCiMje+_weight;};case 4:{life_atmCash=life_atmCash+((oev_dep_data select _index) select 2);life_cache_atmCash=life_cache_atmCash+((oev_dep_data select _index) select 2);};};if(_error) exitWith{hint"An error has occurred. Please try again, later.";};switch(_mode) do{case 0:{private["_houID","_className","_spaceIndex"];_className=(oev_dep_data select _index) select 3;_spaceIndex=_className find" ";_houID=parseNumber(_className select[0,_spaceIndex]);[[nil,(getPlayerUID player),nil,(oev_dep_data select _index) select 4,false,nil,true,_houID],"OES_fnc_VrRCFtTvwgUxtVF",false,false]call OEC_fnc_MP;};case 1:{private["_vehID","_className","_spaceIndex"];_className=(oev_dep_data select _index) select 3;_spaceIndex=_className find" ";_vehID=parseNumber(_className select[0,_spaceIndex]);[[nil,(getPlayerUID player),nil,(oev_dep_data select _index) select 4,true,_vehID],"OES_fnc_VrRCFtTvwgUxtVF",false,false]call OEC_fnc_MP;};default{[[nil,nil,nil,(oev_dep_data select _index) select 4],"OES_fnc_VrRCFtTvwgUxtVF",false,false]call OEC_fnc_MP;};};switch(_mode) do{case 0:{hint"You have successfully claimed the property. It will be available upon the next server restart.";};case 1:{hint"You have successfully claimed your item. It is now in your garage.";};case 2:{hint format["Your claimed item(s) - (%1) have been placed in the crate in front of the ATM.",([_item]call OEC_fnc_dpRnrsfgFkjfEet) select 1];};case 3:{hint format["You have successfully claimed your item(s) - (%1).",([_item]call OEC_fnc_varToStr)];};case 4:{hint format["You have successfully claimed your deposit of $%1.",((oev_dep_data select _index) select 2)];};};
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement