Hi there. I need help creating script that can put a vehicle into a temporary cache which can be retrieved later if needed. I created a script so far but it doesn't work yet. Can anyone help me please. Here is wat i got so far...
; create dialog
_cacheMenu = CreateDialog "CacheDialog"
_cache = []
#start
_vehiclePlayer = vehicle player
btnCache=false
btnSave=false
#loop
; if button pressed "Cache"
? btnCache : btnCache=false;if ((_vehiclePlayer distance garage > 10 ) && (player in _vehiclePlayer)) then {player action ["eject",_vehiclePlayer]; lbAdd [2000, typeof _vehiclePlayer]; deletevehicle _vehiclePlayer} else {hint "exit"}
; if button pressed "Save"
? btnSave : btnSave=false; goto "cache"
goto "loop"
#cache
; list saved to an array
_cache set [(0,lbText [2000, 0])]
goto "start"
By pressing the "Cache" button: The vehicle is deleted and added to a list.
By pressing the "Save" button: The vehicle needs to be added to an array. Then the array must be "saved" and every time the dialog is created, the list must be occupied by all the cached vehicles.
The script must create a Garage. When i drive a vehicle into a garage, the vehicle must be deleted, saved and recovered if needed. This will help me lower the lag of my mission.
Please help. Thx in advance.
Fanus.