Hallo,
ich wollte über ein Script auf ein Fahrzeug eine Variable geben. Die soll bezwecken, das man das Kennzeichen vom Fahrzeug entfernt hat. Meine fn_kennzeichen.sqf.Nun sagt er mir immer undefinierte Variable in "_fealschungsdata"
Code
_vehicle = nearestObject [position player, "LandVehicle"];
_vehicle setVariable ["vehicle_info_fake",true];
Die fn_searchVehAction.sqf
Code
private ["_vehicle","_data","_faelschungsdata"];
_vehicle = cursorObject;
if ((_vehicle isKindOf "Car") || !(_vehicle isKindOf "Air") || !(_vehicle isKindOf "Ship")) then {
_owners = _vehicle getVariable "vehicle_info_owners";
if (isNil "_owners") exitWith {hint localize "STR_NOTF_VehCheat"; deleteVehicle _vehicle;};
_faelschungsdata = _vehicle getVariable "vehicle_info_fake";
life_action_inUse = true;
hint localize "STR_NOTF_Searching";
sleep 3;
life_action_inUse = false;
if (player distance _vehicle > 10 || !alive player || !alive _vehicle) exitWith {hint localize "STR_NOTF_SearchVehFail";};
//_inventory = [(_vehicle getVariable "vehicle_info_inv")] call fnc_veh_inv;
//if (isNil {_inventory}) then {_inventory = "Nothing in storage."};
_owners = [_owners] call life_fnc_vehicleOwners;
if (_owners == "any<br/>") then {
_owners = "No owners, impound it<br/>";
};
if (_faelschungsdata) then {
_owners = "No owners, impound it<br/>";
};
hint parseText format [localize "STR_NOTF_SearchVeh",_owners];
};
Alles anzeigen