Also wenn ich mal viel Zeit habe baue ich das vielleicht. Aber warum nimmst du nicht das COP Light Script da ist alles drin was du für blinker brauchst.
Beiträge von moeck
-
-
Also mit dem Script sollte es definitiv funktionieren. Die Datei muss nach \core\vehicle\
Code: fn_vInteractionMenu.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_vInteractionMenu.sqf Author: Bryan "Tonic" Boardwine Description: Replaces the mass add actions for various vehicle actions. */ #define Btn1 37450 #define Btn2 37451 #define Btn3 37452 #define Btn4 37453 #define Btn5 37454 #define Btn6 37455 #define Title 37401 private ["_display","_curTarget","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_id"]; if (!dialog) then { createDialog "vInteraction_Menu"; }; disableSerialization; _curTarget = param [0,objNull,[objNull]]; if (isNull _curTarget) exitWith {closeDialog 0;}; //Bad target _isVehicle = if ((_curTarget isKindOf "landVehicle") || (_curTarget isKindOf "Ship") || (_curTarget isKindOf "Air")) then {true} else {false}; if (!_isVehicle) exitWith {closeDialog 0;}; _display = findDisplay 37400; _Btn1 = _display displayCtrl Btn1; _Btn2 = _display displayCtrl Btn2; _Btn3 = _display displayCtrl Btn3; _Btn4 = _display displayCtrl Btn4; _Btn5 = _display displayCtrl Btn5; _Btn6 = _display displayCtrl Btn6; life_vInact_curTarget = _curTarget; _id = getObjectDLC _curTarget; //Grundeinstellung der Buttons _Btn1 ctrlShow true; //_Btn1 soll immer angezeigt werden _Btn2 ctrlShow false; _Btn3 ctrlShow false; _Btn4 ctrlShow false; _Btn5 ctrlShow false; _Btn6 ctrlShow false; //Alle Buttons deaktiviert _Btn1 ctrlEnable false; _Btn2 ctrlEnable false; _Btn3 ctrlEnable false; _Btn4 ctrlEnable false; _Btn5 ctrlEnable false; _Btn6 ctrlEnable false; //Set Repair Action _Btn1 ctrlSetText localize "STR_vInAct_Repair"; _Btn1 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_repairTruck; closeDialog 0;"; if ((life_inv_toolkit >= 1) && {alive life_vInact_curTarget} && {([life_vInact_curTarget] call life_fnc_isDamaged)}) then {_Btn1 ctrlEnable true;} else {_Btn1 ctrlEnable false;}; if (playerSide isEqualTo west) then { _Btn2 ctrlShow true; _Btn3 ctrlShow true; _Btn4 ctrlShow true; _Btn5 ctrlShow true; _Btn6 ctrlShow true; //Registration Button2 _Btn2 ctrlSetText localize "STR_vInAct_Registration"; _Btn2 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_searchVehAction; closeDialog 0;"; _Btn2 ctrlEnable true; //Vehicle Search Button3 _Btn3 ctrlSetText localize "STR_vInAct_SearchVehicle"; _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_vehInvSearch; closeDialog 0;"; _Btn3 ctrlEnable true; //Pullout Button4 _Btn4 ctrlSetText localize "STR_vInAct_PullOut"; _Btn4 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction; closeDialog 0;"; if !(crew _curTarget isEqualTo []) then {_Btn4 ctrlEnable true;}; //Impound Button5 _Btn5 ctrlSetText localize "STR_vInAct_Impound"; _Btn5 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_impoundAction; closeDialog 0;"; _Btn3 ctrlEnable true; if (_curTarget isKindOf "Ship") then { _Btn6 ctrlSetText localize "STR_vInAct_PushBoat"; _Btn6 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;"; if (_curTarget isKindOf "Ship" && {local _curTarget} && {crew _curTarget isEqualTo []}) then { _Btn6 ctrlEnable true;} else {_Btn6 ctrlEnable false}; } else { if (!isNil "_id") then { if !(_id in getDLCs 1) then { _Btn6 ctrlSetText localize "STR_vInAct_GetInVehicle"; _Btn6 buttonSetAction "player moveInDriver life_vInact_curTarget; closeDialog 0;"; if (crew _curTarget isEqualTo [] && {canMove _curTarget} && {locked _curTarget isEqualTo 0}) then {_Btn6 ctrlEnable true;} else {_Btn6 ctrlEnable false}; }; } else { _Btn6 ctrlSetText localize "STR_vInAct_Unflip"; _Btn6 buttonSetAction "life_vInact_curTarget setPos [getPos life_vInact_curTarget select 0, getPos life_vInact_curTarget select 1, (getPos life_vInact_curTarget select 2)+0.5]; closeDialog 0;"; if (alive _curTarget && {crew _curTarget isEqualTo []} && {canMove _curTarget}) then { _Btn6 ctrlEnable false;} else {_Btn6 ctrlEnable true;}; }; }; }; if ((playerSide isEqualTo civilian)|| (playerSide isEqualTo independent)) then { _Btn2 ctrlShow true; _Btn3 ctrlShow true; _Btn4 ctrlShow true; if (_curTarget isKindOf "Ship") then { _Btn2 ctrlSetText localize "STR_vInAct_PushBoat"; _Btn2 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;"; if (alive _curTarget && {_curTarget isKindOf "Ship"} && {local _curTarget} && {crew _curTarget isEqualTo []}) then { _Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false}; } else { if (!isNil "_id") then { if !(_id in getDLCs 1) then { _Btn2 ctrlSetText localize "STR_vInAct_GetInVehicle"; _Btn2 buttonSetAction "player moveInDriver life_vInact_curTarget; closeDialog 0;"; if (crew _curTarget isEqualTo [] && {canMove _curTarget} && {locked _curTarget isEqualTo 0}) then {_Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false}; }; } else { _Btn2 ctrlSetText localize "STR_vInAct_Unflip"; _Btn2 buttonSetAction "life_vInact_curTarget setPos [getPos life_vInact_curTarget select 0, getPos life_vInact_curTarget select 1, (getPos life_vInact_curTarget select 2)+0.5]; closeDialog 0;"; if (alive _curTarget && {crew _curTarget isEqualTo []} && {canMove _curTarget}) then { _Btn2 ctrlEnable false;} else {_Btn2 ctrlEnable true;}; }; }; if (typeOf _curTarget == "O_Truck_03_device_F") then { _Btn3 ctrlSetText localize "STR_vInAct_DeviceMine"; _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_deviceMine"; if (!isNil {(_curTarget getVariable "mining")} || !local _curTarget && {_curTarget in life_vehicles}) then { _Btn3 ctrlEnable false; } else { _Btn3 ctrlEnable true; }; } else { _Btn3 ctrlShow false; if (typeOf (_curTarget) in ["C_Van_01_fuel_F","I_Truck_02_fuel_F","B_Truck_01_fuel_F"] && _curTarget in life_vehicles) then { if (!isNil {_curTarget getVariable "fuelTankWork"}) then { _Btn3 ctrlSetText localize "STR_FuelTank_Stop"; _Btn3 buttonSetAction "life_vInact_curTarget setVariable [""fuelTankWork"",nil,true]; closeDialog 0;"; _Btn3 ctrlShow true; } else { if (count (nearestObjects [_curTarget, ["Land_FuelStation_Feed_F","Land_fs_feed_F"], 15]) > 0) then { _Btn3 ctrlSetText localize "STR_FuelTank_Supply"; _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_fuelSupply"; _Btn3 ctrlShow true; }else{ { if (player distance (getMarkerPos _x) < 20) exitWith { _Btn3 ctrlSetText localize "STR_FuelTank_Store"; _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_fuelStore"; _Btn3 ctrlShow true; }; } forEach ["fuel_storage_1","fuel_storage_2"]; }; }; }; }; _Btn4 ctrlShow false; if (playerSide isEqualTo independent) then { _Btn5 ctrlSetText localize "STR_vInAct_Impound"; _Btn5 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_impoundAction; closeDialog 0;"; _Btn5 ctrlShow true; } else {_Btn5 ctrlShow false}; _Btn6 ctrlShow false; };
Gruß,
moeck -
Ich packe die Info ins TUT ;-), habe das auch an anderen Stellen bereits erweitert. so bald ich fertig bin gibt es das komplettpaket.
gruß,
moeck -
so Problem gelöst. kann geschlossen werden
-
oder so war mit dem handy unterwegs
-
such einfach in der mission datei nach blueforce, ... und ersetze das durch den wunsch string
-
und du mietest die autos nicht? und ja ohne logs wird es schwierig
-
Hi,
ich bin langsam aber sicher am Verzweifeln. Vielleicht habt ihr ja eine Idee. Ich versuche auf einen Wert in lbData zu zugreifen aber das klappt irgendwie nicht.
Code: veh_repaint.hpp
Alles anzeigenclass Life_vehicle_repaint { idd = 2300; name= "life_vehrepaint_menu"; movingEnable = false; enableSimulation = true; //onLoad = "[] execVM 'core\client\keychain\init.sqf'"; class controlsBackground { class Life_RscTitleBackground:Life_RscText { colorBackground[] = {0.4, 0, 0, 0.7}; idc = -1; x = 0.1; y = 0.2; w = 0.8; h = (1 / 25); }; class MainBackground:Life_RscText { colorBackground[] = {0, 0, 0, 0.7}; idc = -1; x = 0.1; y = 0.2 + (11 / 250); w = 0.8; h = 0.6 - (22 / 250); }; }; class controls { class Title : Life_RscTitle { colorBackground[] = {0, 0, 0, 0}; idc = 2301; text = "Auto umlackierung"; x = 0.1; y = 0.2; w = 0.8; h = (1 / 25); }; class VehicleList : Life_RscListBox { idc = 2302; text = ""; sizeEx = 0.035; colorBackground[] = {0,0,0,0}; onLBSelChanged = "[_this] call life_fnc_Repaintcolor"; x = 0.12; y = 0.26; w = 0.76; h = 0.4; }; class ColorList : Life_RscCombo { idc = 2303; x = 0.42; y = 0.68; w = 0.275; h = 0.03; }; class CloseButtonKey : Life_RscButtonMenu { idc = -1; text = "$STR_Global_Close"; onButtonClick = "closeDialog 0;"; x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.8 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; class RepaintCar : life_RscButtonMenu { idc = -1; text = "Repaint ($20000)"; onButtonClick = "[] spawn life_fnc_RepaintVehicle;"; x = 0.26 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.8 - (1 / 25); w = (10 / 40); h = (1 / 25); }; }; };
Code: fn_repaintvehicle.sqf
Alles anzeigen/* File: fn_RepaintVehicle.sqf Author: MooN-Gaming Description: Does the active repaint man....read the title! */ private["_index","_veh","_color","_color_index","_testdata"]; if(!isNull (findDisplay 2300)) then { _testdata=lbdata [2303,lbcursel 2303]; hint format["lbc: %1 || lbvalue: %2",_testlbcursel,_testlbvalue]; _veh = nearestObject [position player, _testdata]; _color = lbcursel 2303; _color_index = lbValue[2303,_color]; closeDialog 0; _baseprice = 20000; _vehicleData = _veh getVariable["vehicle_info_owners",[]]; _vehOwner = (_vehicleData select 0) select 0; if(life_6cash < _basePrice) exitWith {hint "Du hast keine 20000$ um den Lackierer zu bezahlen."}; if(isNil {_vehicleData}) exitWith {hint "Es gibt keine Infos zu diesem Fahrzeug, es ist entweder gemietet oder gecheated."}; if ((getPlayerUID player) != _vehOwner) exitWith {hint "Du bist nicht der Besitzer des Fahrzeugs das lackiert werden soll."}; life_action_inUse = true; //[player,"spraycan"] call life_fnc_globalSound; _displayName = getText(configFile >> "CfgVehicles" >> (typeOf _veh) >> "displayName"); _upp = format["Lackiere %1",_displayName]; //Setup our progress bar. disableSerialization; 5 cutRsc ["life_progress","PLAIN"]; _ui = uiNameSpace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format["%2 (1%1)...","%",_upp]; _progress progressSetPosition 0.01; _cP = 0.01; while{true} do { if(animationState player != "AinvPknlMstpSnonWnonDnon_medic_1") then { [[player,"AinvPknlMstpSnonWnonDnon_medic_1"],"life_fnc_animSync",true,false] spawn life_fnc_MP; player playMoveNow "AinvPknlMstpSnonWnonDnon_medic_1"; }; sleep 0.29; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp]; if(_cP >= 1) exitWith {}; if(!alive player) exitWith {}; if(player != vehicle player) exitWith {}; if(life_interrupted) exitWith {}; }; life_action_inUse = false; 5 cutText ["","PLAIN"]; player playActionNow "stop"; if(life_interrupted) exitWith {life_interrupted = false; titleText["Abgebrochen!","PLAIN"]; life_action_inUse = false;}; if(player != vehicle player) exitWith {titleText["Du musst aus dem Fahrzeug aussteigen, um es lackieren zu können!","PLAIN"];}; life_6cash = life_6cash - _basePrice; //Send toDB [[_veh,_color_index],"TON_fnc_vehicleRepaint",false,false] spawn life_fnc_MP; //Color vehicle locally [_veh,_color_index] call life_fnc_colorVehicle; [] call SOCK_fnc_updateRequest; //Sync silently because it's obviously silently.. hint format["Fahrzeug: %1 || Neue Farbe: %2 || Besitzer: %3",_veh,_color_index,_vehicledata]; };
Code: fn_repaintmenu.sqf
Alles anzeigen/* File: fn_RepaintMenu.sqf Author: MooN-Gaming Description: What could it do bro?! */ private["_display","_vehicles","_objects","_color","_haha","_pic","_text","_owners"]; createDialog "Life_vehicle_repaint"; disableSerialization; if(!isNull (findDisplay 2300)) then { _display = findDisplay 2300; _vehicles = _display displayCtrl 2302; _objects = nearestObjects[getPos (_this select 0),["Car","Air","Ship"],20]; //_objects = nearestObject [position player, "LandVehicle"]; _xx = _objects select 0; //List vehicles { if(vehicle player != _x) then { _color = [(typeOf _xx),(_xx getVariable "Life_VEH_color")] call life_fnc_vehicleColorStr; _pic = getText(configFile >> "CfgVehicles" >> typeOf _x >> "picture"); _text = format["(%1)",_color]; _haha = typeOf _x; if(_text == "()") then { _text = ""; }; _vehicles lbAdd format ["%1 || %2", getText(configFile >> "cfgVehicles" >> typeOf _x >> "DisplayName"), _text]; _vehicles lbSetPicture [(lbSize _vehicles)-1,_pic]; _vehicles lbSetData [(lbSize _vehicles)-1,_haha]; }; } foreach _objects; };
Also ich versuche aus dem Menü das Fahrzeug an die RepaintVehicle zu übergeben. Allerdings scheitere ich jedes mal.
Danke,
moeck -
ja klar, wäre eh zu empfehlen, da Arma die besser darstellen kann. Sind halt im richtigen Format.
-
und die } Klammern haben auch noch gefehlt, damit würde er die Definition nicht abschliessen.
-
-
schau dir mal die vehiclecfg an ;-). Da solltest du fündig werden
-
guckst du da Spawn Points
-
Frage wäre jetzt was hast du geändert ;-). So wie es aussieht nutzt Du Mods. Sind die Classes alle da? Bzw. nimm die alte Datei und erweitere diese Schrittweise. Nimm immer nur einen Block dazu, dann lässt sich der Fehler relativ schnell eingrenzen.
-
Moin,
auf den ersten Blick habe ich jetzt nix gesehen. Hast Du eventuell eine Fehlermeldung?
Gruß,
moeck -
Moin,
wenn man sich mit Linux auskennt, dann ist die Serveradministration und Automatisierung mit Linux deutlich einfacher als mit Windows. Allerdings muss man wissen was man tut. Ich persönlich halte grafische Oberflächen auf Servern für deutlich überbewertet. Ich muss aber auch dazu sagen, dass ich das Ganze auch beruflich mache und Linux als Serverbetriebssystem bevorzuge. Grundsätzlich läuft das auch auf Windows und ist für die meisten Leute einfacher zu händeln.
Gruß,
moeck -
-
Moin,
mach doch einfach mal die Condition für Kavala raus.
Du änderst das
Codeclass Altis { class Civilian { class Kavala { displayName = "Kavala"; spawnMarker = "civ_spawn_1"; icon = "\a3\ui_f\data\map\MapControl\watertower_ca.paa"; conditions = "!license_civ_rebel"; };
in dasCodeclass Altis { class Civilian { class Kavala { displayName = "Kavala"; spawnMarker = "civ_spawn_1"; icon = "\a3\ui_f\data\map\MapControl\watertower_ca.paa"; conditions = ""; };
Das sollte schon alles gewesen sein.Gruß,
moeck -
Moin,
füg mal nach der Texture noch ein " ein. Ich denke das sollte es schon gewesen sein. Andernfalls poste bitte mal die Config hier.
Gruß,
moeck -
Moin nochmal,
ich habe das Script jetzt ausführlich getestet und es funktioniert auch für Fahrzeuge. Leider habe ich noch keine Möglichkeit gefunden auch Helis und Boote mit einzubinden. Ich habe mittlerweile auch herausgefunden, dass an folgender Zeile liegt.
Leider hatte ich bisher noch nicht die richtige Idee wie ich dort auch die anderen Typen einbinde. Kann man das eventuell über lbData lösen?
Gruß,
moeck