Guten Tag liebe NN Community
Wie es der Titel bereits verrät benötige ich Hilfe im Thema Medic Spawns, im allgemeinen Sinne, also Car, Heli und Clientspawnn
Und zwar, ich komme in die Spawnauswal und danach spawne ich, jedoch nicht an dem Punkt wo ich im Editor den Spawn gesetzt habe.
2tens kann ich zum Autohändler gehen und dort versuchen was zu kaufen, jedoch spawnt da nichts. Das gleiche ebenfalls beim Heliverkäufer.
Clientspawn: med_spawn_1, med_spawn_2, med_spawn_3 // Carspawn: med_car_1, med_car_2, med_car_3 // med_heli_1, med_heli_2, med_heli_3
Das habe ich life_server/init.sqf und sobald ich dies lösche, kommt beim Spawn: Warte auf den Server.
{
_hs = createVehicle ["Land_Hospital_main_F", [0,0,0], [], 0, "NONE"];
_hs setDir (markerDir _x);
_hs setPosATL (getMarkerPos _x);
_var = createVehicle ["Land_Hospital_side1_F", [0,0,0], [], 0, "NONE"];
_var attachTo [_hs, [4.69775,32.6045,-0.1125]];
detach _var;
_var = createVehicle ["Land_Hospital_side2_F", [0,0,0], [], 0, "NONE"];
_var attachTo [_hs, [-28.0336,-10.0317,0.0889387]];
detach _var;
if (worldName isEqualTo "Altis") then {
if (_forEachIndex isEqualTo 0) then {
atm_hospital_2 setPos (_var modelToWorld [4.48633,0.438477,-8.25683]);
vendor_hospital_2 setPos (_var modelToWorld [4.48633,0.438477,-8.25683]);
"medic_spawn_3" setMarkerPos (_var modelToWorld [8.01172,-5.47852,-8.20022]);
"med_car_2" setMarkerPos (_var modelToWorld [8.01172,-5.47852,-8.20022]);
hospital_assis_2 setPos (_hs modelToWorld [0.0175781,0.0234375,-0.231956]);
} else {
atm_hospital_3 setPos (_var modelToWorld [4.48633,0.438477,-8.25683]);
vendor_hospital_3 setPos (_var modelToWorld [4.48633,0.438477,-8.25683]);
"medic_spawn_1" setMarkerPos (_var modelToWorld [-1.85181,-6.07715,-8.24944]);
"med_car_1" setMarkerPos (_var modelToWorld [5.9624,11.8799,-8.28493]);
hospital_assis_2 setPos (_hs modelToWorld [0.0175781,0.0234375,-0.231956]);
};
};
} forEach ["hospital_2","hospital_3"];
Alles anzeigen
In der mpMissions/core/shops/fn_vehicleShopBuy.sqf habe ich dies so drinne:
rivate "_purchasePrice";
if (_mode) then {
_purchasePrice = round(_initalPrice * _buyMultiplier);
} else {
_purchasePrice = round(_initalPrice * _rentMultiplier);
};
private _conditions = M_CONFIG(getText,"LifeCfgVehicles",_className,"conditions");
if !([_conditions] call life_fnc_levelCheck) exitWith {hint localize "STR_Shop_Veh_NoLicense";};
private _colorIndex = lbValue[2304,(lbCurSel 2304)];
if (_purchasePrice < 0) exitWith {closeDialog 0;}; //Bad price entry
if (CASH < _purchasePrice) exitWith {hint format [localize "STR_Shop_Veh_NotEnough",[_purchasePrice - CASH] call life_fnc_numberText];closeDialog 0;};
private _spawnPoints = life_veh_shop select 1;
private _spawnPoint = "";
if ((life_veh_shop select 0) == "med_heli_1","med_heli_2","med_heli_3","med_car_1","med_car_2","med_car_3") then {
if (nearestObjects[(getMarkerPos _spawnPoints),["Air"],35] 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};
};
};
if (_spawnPoint isEqualTo "") exitWith {hint localize "STR_Shop_Veh_Block"; closeDialog 0;};
CASH = CASH - _purchasePrice;
[0] call SOCK_fnc_updatePartial;
hint format [localize "STR_Shop_Veh_Bought",getText(configFile >> "CfgVehicles" >> _className >> "displayName"),[_purchasePrice] call life_fnc_numberText];
//Spawn the vehicle and prep it.
private "_vehicle";
if ((life_veh_shop select 0) == "med_air_hs") then {
_vehicle = createVehicle [_className,[0,0,999],[], 0, "NONE"];
waitUntil {!isNil "_vehicle" && {!isNull _vehicle}}; //Wait?
_vehicle allowDamage false;
_hs = nearestObjects[getMarkerPos _spawnPoint,["Land_Hospital_side2_F"],50] select 0;
_vehicle setPosATL (_hs modelToWorld [-0.4,-4,12.65]);
sleep 0.6;
} else {
_vehicle = createVehicle [_className, (getMarkerPos _spawnPoint), [], 0, "NONE"];
waitUntil {!isNil "_vehicle" && {!isNull _vehicle}}; //Wait?
_vehicle allowDamage false; //Temp disable damage handling..
_vehicle setPos (getMarkerPos _spawnPoint);
_vehicle setVectorUp (surfaceNormal (getMarkerPos _spawnPoint));
_vehicle setDir (markerDir _spawnPoint);
};
_vehicle lock 2;
Alles anzeigen
falls ihr sonst noch etwas benötigt, schreibt es dann werde ich es Posten.
Ich bin froh um jede Hilfe.
MFG Nico Müller