Spoiler anzeigen
if (_itemFilter isEqualTo "car") then {
private _className = _newItem;
private _colorIndex = -1; //Nix Farbe LAN
private _spawnPoint = [((getPosATL player) select 0) + 5,((getPosATL player) select 1) + 5,(getPosATL player) select 2]; //Posi: 5m neben dem Spieler
_vehicle = createVehicle [_className, _spawnPoint, [], 0, "NONE"]; //Fahrzeug spawnen an besagter Posi
waitUntil {!isNil "_vehicle" && {!isNull _vehicle}}; //Wait? Warte bis Fahrzeug da ist
_vehicle allowDamage false; //Temp disable damage handling..
//_vehicle setPos _spawnPoint;
_vehicle setVectorUp (surfaceNormal _spawnPoint); //Die Fahrzeugneigung dem Boden anpassen
_vehicle setDir (getDir player); //Richtung: Blickrichutng Spieler
_vehicle lock 2; //Absperre
//[_vehicle,_colorIndex] call life_fnc_colorVehicle;
[_vehicle] call life_fnc_clearVehicleAmmo; //Munition entfernen
[_vehicle,"trunk_in_use",false,true] remoteExecCall ["TON_fnc_setObjVar"]; //VAR: Is Kofferraum in Benutzung?
[_vehicle,"vehicle_info_owners",[[getPlayerUID player,profileName]],true] remoteExecCall ["TON_fnc_setObjVar"]; //VAR: Besitzer
_vehicle disableTIEquipment true; //No Thermals.. They're cheap but addictive.
_vehicle allowDamage true; //Schaden erlauben
//life_vehicles set[count life_vehicles,_vehicle]; //Add err to the chain.
life_vehicles pushBack _vehicle; //Zum Schlüsselbund zufügen
[getPlayerUID player,playerSide,_vehicle,1] remoteExecCall ["TON_fnc_keyManagement"],2; //Schlüssel abfragbar machen
[getPlayerUID player,playerSide,_vehicle,_colorIndex] remoteExecCall ["TON_fnc_vehicleCreate",2]; //DB eintragen
};
weiß leider nicht an was es liegt das es mir das Fahrzeug nach dem craften nicht in die Garage stellt beim einparken Schlüssel hat man aber