Hey Leute,
Also mal wieder ein Weiteres Problem bei unserem neuen Krankenhaus Spawnen die Autos aus der Garage oder Shop unterm Boden.
Nun gibt es ja z.b. in der fn_vehicleShopBuy (standard)
Code
if((life_veh_shop select 0) == "med_air_hs") then {
if(count(nearestObjects[(getMarkerPos _spawnPoints),["Air"],35]) == 0) exitWith {_spawnPoint = _spawnPoints};
} else {
//Check if there is multiple spawn points and find a suitable spawnpoint.
if(typeName _spawnPoints == typeName []) then {
//Find an available spawn point.
{if(count(nearestObjects[(getMarkerPos _x),["Car","Ship","Air"],5]) == 0) exitWith {_spawnPoint = _x};} foreach _spawnPoints;
} else {
if(count(nearestObjects[(getMarkerPos _spawnPoints),["Car","Ship","Air"],5]) == 0) exitWith {_spawnPoint = _spawnPoints};
};
};
Alles anzeigen
Das der Heli aufm Dach vom Krankenhaus gespawnt wird.
Ich habe jetzt folgendes Probiert da das immer nur in unserem Krankenhaus passiert ne ne if bedingung einzufügen.
Code
if ((life_veh_shop select 0) == "med_air_hs") then {
if (nearestObjects[(getMarkerPos _spawnPoints),["Air"],35] isEqualTo []) exitWith {_spawnPoint = _spawnPoints};
}
else
{
if ((life_veh_shop select 0) == "med_shop_g") then
{
if (nearestObjects[(getMarkerPos _spawnPoints),["Car"],8] isEqualTo []) exitWith {_spawnPoint = _spawnPoints};
}
else
{
//Check if there is multiple spawn points and find a suitable spawnpoint.
if (_spawnPoints isEqualType []) then
{
//Find an available spawn point.
{
if ((nearestObjects[(getMarkerPos _x),["Car","Ship","Air"],5]) isEqualTo []) exitWith {_spawnPoint = _x};
true
} count _spawnPoints;
} else
{
if (nearestObjects[(getMarkerPos _spawnPoints),["Car","Ship","Air"],5] isEqualTo []) exitWith {_spawnPoint = _spawnPoints};
};
};
};
Alles anzeigen
Nur leider erscheinen jetzt im Shop keine Fahrzeuge mehr.
Init des Shops:
Code
this enableSimulation false; this allowDamage false; this addAction[format ["%1 ($%2)",localize (getText(missionConfigFile >> "Licenses" >> "mAir" >> "displayName")), [(getNumber(missionConfigFile >> "Licenses" >> "mAir" >> "price"))] call life_fnc_numberText],life_fnc_buyLicense,"mAir",0,false,false,"",' !license_med_mAir && playerSide isEqualTo independent ']; this addAction[localize"STR_MAR_EMS_Item_Shop",life_fnc_weaponShopMenu,"med_basic"]; this addAction[localize"STR_MAR_EMS_Clothing_Shop",life_fnc_clothingMenu,"med_clothing"]; this addAction[localize"STR_MAR_W_E_Vehicle Shop",life_fnc_vehicleShopMenu,["med_shop_g",independent,"med_car_1","med","Kavala Hospital"]]; this addAction[localize"STR_MAR_Helicopter_Shop", life_fnc_vehicleShopMenu,["med_air_hs",independent,"med_air_1","med","Kavala Hospital"]]; this addAction[localize"STR_MAR_W_Car_Garage", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,"Car",player] remoteExecCall ["HC_fnc_getVehicles",HC_Life]; } else { [getPlayerUID player,playerSide,"Car",player] remoteExecCall ["TON_fnc_getVehicles",2];}; createDialog "Life_impound_menu"; disableSerialization; ctrlSetText[2802,"Fetching Vehicles...."]; life_garage_sp = "med_car_1"; life_garage_type = "Car"; },"",0,false,false,"",'playerSide isEqualTo independent']; this addAction[localize"STR_MAR_Helicopter_Garage", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,"Air",player] remoteExecCall ["HC_fnc_getVehicles",HC_Life]; } else { [getPlayerUID player,playerSide,"Air",player] remoteExecCall ["TON_fnc_getVehicles",2];}; createDialog "Life_impound_menu"; disableSerialization; ctrlSetText[2802,"Fetching Vehicles...."]; life_garage_sp = "med_air_1"; life_garage_type = "Air"; },"",0,false,false,"",'playerSide isEqualTo independent ']; this addAction[localize"STR_MAR_Store_vehicle_in_Garage",life_fnc_storeVehicle,"",0,false,false,"",'!life_garage_store']; this addAction[localize"STR_Shops_Market",life_fnc_virt_menu,"med_market",1.5,false,false,"",' isNull objectParent player && player distance _target < 5 && playerSide isEqualTo independent ']; this setObjectTextureGlobal [0,"textures\medic_uniform.jpg"];
Kann mir wer sagen woran das liegt oder mir sagen wie ich es sonst hinbekommen könnte?