HelpπŸ’¬ Vehicle spawn script not working... Halp

Posts 1–5 of 5 Β· Page 1 of 1
πŸ’¬ Vehicle spawn script not working... Halp
This is a vehicle script with i use in my new menu but.. the vehicles arent showing up in my menu Halp


Code:
disableSerialization;
					_display = findDisplay 3030;
					_Vehicle_Menu = (_display) displayCtrl 1;
					lbClear ((_display) displayCtrl 1);
					_Vehicle_Menu ctrlSetFontHeight .034;
					_Vehicle_Menu ctrlSetFont "Zeppelin33";
					_Vehicle_Menu ctrlRemoveAllEventHandlers "LBDblClick";_Vehicle_Menu ctrlRemoveAllEventHandlers "LBSelChanged";
					_Vehicle_Menu ctrlSetEventHandler ["LBDblClick","[lbText [1,(lbCurSel 1)],(lbCurSel 1)] spawn PRaZ_Admin_Vehicle;"];
					
					_cfg_vehicle = configFile >> "cfgVehicles";
					_vehicle_list = [];

					for "_i" from 0 to (count _cfg_vehicle)-1 do 
					{
						_vehicle_class = _cfg_vehicle select _i;
						if (isClass _vehicle_class) then 
						{
							_vehicle = configName _vehicle_class;
							if ((getNumber (_vehicle_class >> "scope") == 2) && (getText (_vehicle_class >> "picture") != "") && (((_vehicle isKindOf "LandVehicle") or (_vehicle isKindOf "Air") or (_vehicle isKindOf "Boat"))) && !((_vehicle isKindOf "ParachuteBase") or (_vehicle isKindOf "BIS_Steerable_Parachute"))) then
							{
								_vehicle_list = _vehicle_list + [_vehicle];
							};
						};
					};
					
					for "_i" from 0 to (count _vehicle_list)-1 do 
					{
						_vehicles = _vehicle_list select _i;
						
						_Vehicle_Menu lbAdd _vehicles;
						_Vehicle_Menu lbSetPicture [_i, (getText (configFile >> "cfgVehicles" >> _vehicles >> "picture"))];
					};
					lbSort _Vehicle_Menu;
					
					PRaZ_Admin_Vehicle = 
					{
						_vehicle_selected = _this select 0;
						if (_vehicle_selected != "") then 
						{
							_pos = getPos vehicle player; 
							_vehicle_type = _vehicle_selected createVehicle _pos;
							systemChat format["::PRaZ:: Vehicle Spawned : %1",_vehicle_selected];
						};
					};
				};
				
				if (_cmd == "VehicleDelivery") then 
				{
					disableSerialization;
					_display = findDisplay 3030;
					_Vehicle_Menu = (_display) displayCtrl 1;
					lbClear ((_display) displayCtrl 1);
					_Vehicle_Menu ctrlSetFontHeight .033;
					_Vehicle_Menu ctrlSetFont "Zeppelin33";
					_Vehicle_Menu ctrlRemoveAllEventHandlers "LBDblClick";_Vehicle_Menu ctrlRemoveAllEventHandlers "LBSelChanged";
					_Vehicle_Menu ctrlSetEventHandler ["LBDblClick","[lbText [1,(lbCurSel 1)],(lbCurSel 1)] spawn PRaZ_Admin_Vehicle;"];
					
					PRaZ_vehicles = [];
					_checkdist = 1;
					_checkcrew = true;
					_maxdmg = 0.9;
					_minfuel = 0;
					
					{
						if((_x isKindOf "LandVehicle") or (_x isKindOf "Ship") or (_x isKindOf "Air")) then 
						{
							_vname = getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "displayName");
							if (!(_vname in PRaZ_vehicles) and ((player distance _x) > _checkdist) and (fuel _x >= _minfuel) and (damage _x <= _maxdmg) and !(_checkcrew and (count(crew _x)>0))) then 
							{
								PRaZ_vehicles set [count PRaZ_vehicles, _vname];
							};
						};
					} forEach ([6800, 9200, 0] nearEntities [["AllVehicles"], 11000]);
					
					for "_i" from 0 to (count PRaZ_vehicles)-1 do 
					{
						_vehicles = PRaZ_vehicles select _i;
						
						_Vehicle_Menu lbAdd _vehicles;
						_Vehicle_Menu lbSetPicture [_i, (getText (configFile >> "cfgVehicles" >> _vehicles >> "picture"))];
					};
					
					PRaZ_Admin_Vehicle = 
					{
						_vehicle_selected = _this select 0;
						if (_vehicle_selected != "") then 
						{
							{
								if((_x isKindOf "LandVehicle") or (_x isKindOf "Ship") or (_x isKindOf "Air")) then 
								{
									_vname = getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "displayName");
									if((_vname in PRaZ_vehicles) && (_vname == _vehicle_selected)) then 
									{
										_x attachTo [player,[0,6,1]];
										sleep 1;
										detach _x;
										player action ["getInDriver",_x];
										systemChat format["::PRaZ:: Vehicle Delivered : %1",_vehicle_selected];
									};
								};
							}forEach ([6800, 9200, 0] nearEntities [["AllVehicles"], 11000]);
						};
					};
				};
			};
Let me check this out, see if it works for me.
Quote Originally Posted by RyanGashh View Post
Let me check this out, see if it works for me.
Did it work for you?
Quote Originally Posted by PureBrainH View Post


Did it work for you?
still didn't try, ill check now

- - - Updated - - -

NEW UPDATE:

Nope, list of vehicles doesn't load.
Quote Originally Posted by RyanGashh View Post
still didn't try, ill check now

- - - Updated - - -

NEW UPDATE:

Nope, list of vehicles doesn't load.
lol ok thanks tho
Posts 1–5 of 5 Β· Page 1 of 1

Post a Reply

Similar Threads

Talk with us