Liebe NN Community
Ich habe da mal ne frage also auf meinem Server habe ich das Problem wenn ich weiter weg von meinem Fahrzeug gehe dann werden sie einfach in die Garage geparkt .
von anderen Spielern auch
Infos :
Altis life 5.0.0
Liebe NN Community
Ich habe da mal ne frage also auf meinem Server habe ich das Problem wenn ich weiter weg von meinem Fahrzeug gehe dann werden sie einfach in die Garage geparkt .
von anderen Spielern auch
Infos :
Altis life 5.0.0
guck mal in die fn_cleanup.sqf im life_server
dort ist das Geregelt
Wo wird das denn definiert?
Komme damit nicht klar zu konfigurieren.
/*%FSM<COMPILE "scriptedFSM.cfg, Server-Side Cleanup">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-62.908096,-391.651611,27.091887,-341.651672,0.000000,"init"};
item1[] = {"true",8,218,-62.976639,-315.185364,27.023363,-265.185364,0.000000,"true"};
item2[] = {"Share__Work_load",2,250,-64.183350,-224.681931,25.816656,-174.681931,0.000000,"Share " \n "Work-load"};
item3[] = {"Continue__",4,4314,-220.591476,74.216980,-130.591476,124.216980,0.000000,"" \n "" \n "Continue" \n "" \n ""};
item4[] = {"Time_Check",4,218,-219.425827,-133.310532,-129.425964,-83.310455,0.000000,"Time Check"};
item5[] = {"Delete_Dead_Cars",2,250,-220.186951,-29.248400,-130.187195,20.751413,0.000000,"Delete" \n "Dead" \n "Cars"};
item6[] = {"",7,210,-312.538239,95.295059,-304.538239,103.295059,0.000000,""};
item7[] = {"",7,210,-312.798218,-204.081940,-304.798218,-196.081940,0.000000,""};
item8[] = {"End_Cleanup_",1,250,-64.828239,87.581070,25.171984,137.581238,0.000000,"" \n "End Cleanup" \n ""};
item9[] = {"Check_for_HC_",4,218,-65.059021,-30.047342,24.941008,19.952658,0.000000,"" \n "Check for HC" \n ""};
link0[] = {0,1};
link1[] = {1,2};
link2[] = {2,4};
link3[] = {3,6};
link4[] = {4,5};
link5[] = {5,3};
link6[] = {5,9};
link7[] = {6,7};
link8[] = {7,2};
link9[] = {9,8};
globals[] = {0.000000,0,0,0,0,640,480,1,53,6316128,1,-481.887177,425.726196,554.522583,-436.926575,857,816,1};
window[] = {0,-1,-1,-32000,-32000,1120,545,1909,159,1,875};
*//*%FSM</HEAD>*/
//class FSM
{ fsmName = "Server-Side Cleanup"; class States { /*%FSM<STATE "init">*/ class init { name = "init"; itemno = 0; init = /*%FSM<STATEINIT""">*/"private [""_impound"",""_cars"",""_objs"",""_totCars"",""_thread""];" \n "_impound = time;" \n "_cars = time;" \n "_objs = time;" \n "cleanupFSM setFSMVariable [""stopfsm"",false];"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "true">*/ class true { itemno = 1; priority = 0.000000; to="Share__Work_load"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Share__Work_load">*/ class Share__Work_load { name = "Share__Work_load"; itemno = 2; init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Time_Check">*/ class Time_Check { itemno = 4; priority = 0.000000; to="Delete_Dead_Cars"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"((time - _cars) > (3 * 60))"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Delete_Dead_Cars">*/ class Delete_Dead_Cars { name = "Delete_Dead_Cars"; itemno = 5; init = /*%FSM<STATEINIT""">*/"{" \n " if (!alive _x) then {" \n " _dbInfo = _x getVariable [""dbInfo"",[]];" \n " if (count _dbInfo > 0) then {" \n " _uid = _dbInfo select 0;" \n " _plate = _dbInfo select 1;" \n "" \n " _query = format [""UPDATE vehicles SET alive='0' WHERE pid='%1' AND plate='%2'"",_uid,_plate];" \n " _query spawn {" \n " " \n " _thread = [_this,1] call DB_fnc_asyncCall;" \n " };" \n " };" \n " if (!isNil ""_x"" && {!isNull _x}) then {" \n " deleteVehicle _x;" \n " };" \n " };" \n "} forEach allMissionObjects ""LandVehicle"";" \n "" \n "{" \n " if (!alive _x) then {" \n " _dbInfo = _x getVariable [""dbInfo"",[]];" \n " if (count _dbInfo > 0) then {" \n " _uid = _dbInfo select 0;" \n " _plate = _dbInfo select 1;" \n "" \n " _query = format [""UPDATE vehicles SET alive='0' WHERE pid='%1' AND plate='%2'"",_uid,_plate];" \n " _query spawn {" \n " " \n " _thread = [_this,1] call DB_fnc_asyncCall;" \n " };" \n " };" \n " if (!isNil ""_x"" && {!isNull _x}) then {" \n " deleteVehicle _x;" \n " };" \n " };" \n "} forEach allMissionObjects ""Air"";" \n "_cars = time;" \n "" \n "//Group cleanup." \n "{" \n " if (units _x isEqualTo [] && local _x) then {" \n " deleteGroup _x;" \n " };" \n "} forEach allGroups;"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Check_for_HC_">*/ class Check_for_HC_ { itemno = 9; priority = 0.000000; to="End_Cleanup_"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"cleanupFSM getFSMVariable ""stopfsm"""/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Continue__">*/ class Continue__ { itemno = 3; priority = 0.000000; to="Share__Work_load"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"!(cleanupFSM getFSMVariable ""stopfsm"")"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "End_Cleanup_">*/ class End_Cleanup_ { name = "End_Cleanup_"; itemno = 8; init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { }; }; /*%FSM</STATE>*/ }; initState="init"; finalStates[] = { "End_Cleanup_", };
};
/*%FSM</COMPILE>*/
Alles anzeigen
FSM Dateien editierst du am besten über den FSM Editor.
Diesen findest du bei Steam in den Arma3 Tools.
Bedeutet ((time - _cars) > (3 * 60)) das alle 180 minuten der check durchläuft?
Allerding habe ich auch folgende stelle gefunden.
#include "\life_server\script_macros.hpp"
/*
File: fn_cleanup.sqf
Author: Bryan "Tonic" Boardwine
Description:
Server-side cleanup script on vehicles.
Sort of a lame way but whatever. Yep someone should look at it!
*/
private "_deleted";
_deleted = false;
for "_i" from 0 to 1 step 0 do {
private ["_veh","_units","_fuel"];
uiSleep (60 * 60);
{
_protect = false;
_veh = _x;
_vehicleClass = getText(configFile >> "CfgVehicles" >> (typeOf _veh) >> "vehicleClass");
_fuel = 1;
if (!isNil {_veh getVariable "NPC"} && {_veh getVariable "NPC"}) then {_protect = true;};
if ((_vehicleClass in ["Car","Air","Ship","Armored","Submarine"]) && {!(_protect)}) then {
if (LIFE_SETTINGS(getNumber,"save_vehicle_fuel") isEqualTo 1) then {_fuel = (fuel _veh);};
_dbInfo = _veh getVariable ["dbInfo",[]];
_units = {(_x distance _veh < 300)} count playableUnits;
if (count crew _x isEqualTo 0) then {
switch (true) do {
case ((_x getHitPointDamage "HitEngine") > 0.7 && _units isEqualTo 0) : {deleteVehicle _x; _deleted = true;};
case ((_x getHitPointDamage "HitLFWheel") > 0.98 && _units isEqualTo 0) : {deleteVehicle _x; _deleted = true;};
case ((_x getHitPointDamage "HitLF2Wheel") > 0.98 && _units isEqualTo 0) : {deleteVehicle _x; _deleted = true;};
case ((_x getHitPointDamage "HitRFWheel") > 0.98 && _units isEqualTo 0) : {deleteVehicle _x; _deleted = true;};
case ((_x getHitPointDamage "HitRF2Wheel") > 0.98 && _units isEqualTo 0) : {deleteVehicle _x; _deleted = true;};
case (_units isEqualTo 0): {deleteVehicle _x; _deleted = true;};
};
};
if (_deleted) then {
waitUntil {isNull _veh};
_deleted = false;
};
if (isNull _veh) then {
if (count _dbInfo > 0) then {
_uid = _dbInfo select 0;
_plate = _dbInfo select 1;
_query = format ["UPDATE vehicles SET active='0', fuel='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate,_fuel];
[_query,1] call DB_fnc_asyncCall;
};
};
};
} forEach vehicles;
uiSleep (3 * 60); //3 minute cool-down before next cycle.
{
if ((typeOf _x) in ["Land_BottlePlastic_V1_F","Land_TacticalBacon_F","Land_Can_V3_F","Land_CanisterFuel_F", "Land_Can_V3_F","Land_Money_F","Land_Suitcase_F"]) then {
deleteVehicle _x;
};
} forEach (allMissionObjects "Thing");
uiSleep (2 * 60);
{
deleteVehicle _x;
} forEach (allMissionObjects "GroundWeaponHolder");
};
Alles anzeigen
Was bedeutet das rot markierte?
Jo ich werde da mal rein kucken ... da habe ich aber nichts geändert @br1zey
Was muss ich denn da ändern ?
Odin0707 : alle Fahrzeuge, die verlassen auf der Insel stehen, werden standardmässig nach jewewils einer Stunde Serverlaufzeit eingeparkt.
kann ich das auch ändern?
Moment ich habe da gerade was durcheinander gebracht. in der FSM geht es um die kaputten Fahrzeuge, diese werden nach 3 Minuten gelöscht.
wie du schon richtig festgestellt hast ist das löschen der intakten Fahrzeuge in der fn_cleanup.sqf
die Bedingung sind entweder Beschädigungen oder dass kein Spieler innerhalb eines 300 Meter Radiuses ist.
Leider werden auch Autos gelöscht die keinen schaden habe
ja dann ist niemand in der nähe
_units = {(_x distance _veh < 300)} count playableUnits;
...
case (_units isEqualTo 0): {deleteVehicle _x; _deleted = true;};
Sagen wir mal du Startest den Server um 12 Uhr, dann läuft das Script gegen 13 uhr durch (+1-2 Minuten) je nachdem wie schnell der Server startet. Sollte sich dann gegen 13:02 niemand in einem 300 Meter umkreis befinden wird das Fahrzeug gelöscht und in die Garage gestellt.
Ich habe das mal zum test auf 20000 gesetzt trotzdem verschwinden sie
Am einfachsten wäre es das auszukommentieren, dann wird die Aktion nicht mehr durchgeführt oder man stellt entsprechend die Zeit hoch
@Avirex geht das auch ohne Probleme ???