super das es nun doch mal zu sehen ist das uminöse ah script
vielen dank jetzt schon mal und natürlich wäre es mega, wenn das über einen restart in eine db gespeichert wird
p.s ich werd das mal auf ner 4.0 testen
Schön, dass du den Weg zu NodeZone.net gefunden hast! Aktuell bist du nicht angemeldet und kannst deshalb nur eingeschränkt auf unsere Community zugreifen. Um alle Funktionen freizuschalten, spannende Inhalte zu entdecken und dich aktiv einzubringen, registriere dich jetzt kostenlos oder melde dich mit deinem Account an.
super das es nun doch mal zu sehen ist das uminöse ah script
vielen dank jetzt schon mal und natürlich wäre es mega, wenn das über einen restart in eine db gespeichert wird
p.s ich werd das mal auf ner 4.0 testen
ist es bei mir doch auch, nur es wird bei mir in der in initmedic.sqf aufgerufen
trag es in die init ein die im core ordner ist
moinz
und geht das mit dem rauch nu ?? ;D
Du musst wohl für einen ziemlich guten Server scripten, so wie du Ahnung hast.
ironi kann man nicht lesen..
evtl such ich mir auch ein neues team oder steig aus ...
Warum sind da überall zwei " bei Strings?
weil das so in der mission.sqm steht
das setzt die automatisch
wenn man die mission.sqm per notepad++ öffnet sind die doppelt
im editor in der init vom npc sollte das nur entsprechend 1 " sein
hi
mit der datei weiss ich jetzt grad auch nicht
aber wie gesagt, wenn ich vor meinem fahrzeug stehe ist alles top, nur bei fremden sind die buttons ohne funktion
ich kann auch nur das fahrzeug abschelppen welches ich grade aus der garage geholt habe
wenn ich mich als civ ein fahrzeug ausparke und dann auf adac umlogge, dann kann ich mein fahrzeug auch nicht abschleppen/impounden
die impoundActionADAC ist eine 1:1 kopy der impoundAction, bei der adac version wurden nur die STR strings geändert
hab das jetzt in der fn_vInteractionMenu.sqf wieder auf die fn_impoundAction.sqf geändert , aber keine änderung
fn_impoundActionADAC.sqf
#include <macro.h>
/*
File: fn_impoundAction.sqf
Author: Bryan "Tonic" Boardwine
Description:
Impounds the vehicle
*/
private["_vehicle","_type","_time","_price","_vehicleData","_upp","_ui","_progress","_pgText","_cP","_filters"];
_vehicle = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
_filters = ["Car","Air","Ship"];
if(!((KINDOF_ARRAY(_vehicle,_filters)))) exitWith {_ui = "osefStatusBar" call BIS_fnc_rscLayer;_ui cutRsc["osefStatusBar","PLAIN"];};
if(player distance cursorTarget > 10) exitWith {_ui = "osefStatusBar" call BIS_fnc_rscLayer;_ui cutRsc["osefStatusBar","PLAIN"];};
_vehicleData = _vehicle GVAR ["vehicle_info_owners",[]];
if(count _vehicleData == 0) exitWith {deleteVehicle _vehicle}; //Bad vehicle.
_vehicleName = FETCH_CONFIG2(getText,CONFIG_VEHICLES,(typeOf _vehicle),"displayName");
[[0,"STR_NOTF_ADACBeingImpounded",true,[SEL(SEL(_vehicleData,0),1),_vehicleName]],"life_fnc_broadcast",true,false] call life_fnc_MP;
life_action_inUse = true;
_upp = localize "STR_NOTF_ADACImpounding";
//Setup our progress bar.
disableSerialization;
5 cutRsc ["life_progress","PLAIN"];
_ui = GVAR_UINS "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 {
sleep 0.09;
_cP = _cP + 0.01;
_progress progressSetPosition _cP;
_pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp];
if(_cP >= 1) exitWith {_ui = "osefStatusBar" call BIS_fnc_rscLayer;_ui cutRsc["osefStatusBar","PLAIN"];};
if(player distance _vehicle > 10) exitWith {_ui = "osefStatusBar" call BIS_fnc_rscLayer;_ui cutRsc["osefStatusBar","PLAIN"];};
if(!alive player) exitWith {_ui = "osefStatusBar" call BIS_fnc_rscLayer;_ui cutRsc["osefStatusBar","PLAIN"];};
};
5 cutText ["","PLAIN"];
if(player distance _vehicle > 10) exitWith {hint localize "STR_NOTF_ADACImpoundingCancelled"; life_action_inUse = false; _ui = "osefStatusBar" call BIS_fnc_rscLayer;_ui cutRsc["osefStatusBar","PLAIN"];};
if(!alive player) exitWith {life_action_inUse = false; _ui = "osefStatusBar" call BIS_fnc_rscLayer;_ui cutRsc["osefStatusBar","PLAIN"];};
if(EQUAL(count crew _vehicle,0)) then {
if(!(KINDOF_ARRAY(_vehicle,_filters))) exitWith {life_action_inUse = false; _ui = "osefStatusBar" call BIS_fnc_rscLayer;_ui cutRsc["osefStatusBar","PLAIN"];};
_type = FETCH_CONFIG2(getText,CONFIG_VEHICLES,(typeOf _vehicle),"displayName");
switch (true) do {
case (_vehicle isKindOf "Car"): {_price = LIFE_SETTINGS(getNumber,"impound_car");};
case (_vehicle isKindOf "Ship"): {_price = LIFE_SETTINGS(getNumber,"impound_boat");};
case (_vehicle isKindOf "Air"): {_price = LIFE_SETTINGS(getNumber,"impound_air");};
};
life_impound_inuse = true;
[[_vehicle,true,player],"TON_fnc_vehicleStore",false,false] call life_fnc_MP;
waitUntil {!life_impound_inuse};
hint format[localize "STR_NOTF_ADACImpounded",_type,_price];
[[0,"STR_NOTF_ADACHasImpounded",true,[profileName,SEL(SEL(_vehicleData,0),1),_vehicleName]],"life_fnc_broadcast",true,false] call life_fnc_MP;
ADD(BANK,_price);
} else {
hint localize "STR_NOTF_ADACImpoundingCancelled";
};
life_action_inUse = false;
_rscLayer = "osefStatusBar" call BIS_fnc_rscLayer;
_rscLayer cutRsc["osefStatusBar","PLAIN"];
edit:
habe es nun anders hin bekommen, es geht nun wie gewollt
ich habe aus dem offiziellen forum http://www.altisliferpg.com/topic/10162-al…hicles/?p=66174
eine geänderte version genommen und entsprechend angepasst
fn_vInteractionMenu.sqf
#include <macro.h>
/*
File: fn_vInteractionMenu.sqf
Author: Bryan "Tonic" Boardwine
Description:
Replaces the mass addactions 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"];
if(!dialog) then {
createDialog "vInteraction_Menu";
};
disableSerialization;
_curTarget = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
if(isNull _curTarget) exitWith {closeDialog 0;}; //Bad target
_isVehicle = if((_curTarget isKindOf "landVehicle") OR (_curTarget isKindOf "Ship") OR (_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;
//Set Repair Action
_Btn1 ctrlSetText localize "STR_vInAct_Repair";
_Btn1 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_repairTruck;";
if("ToolKit" in (items player) && (damage _curTarget < 1)) then {_Btn1 ctrlEnable true;} else {_Btn1 ctrlEnable false;};
if(_curTarget isKindOf "Ship") then {
_Btn2 ctrlSetText localize "STR_vInAct_PushBoat";
_Btn2 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;";
if(_curTarget isKindOf "Ship" && {local _curTarget} && {count crew _curTarget == 0}) then { _Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false};
} else {
if(typeOf (_curTarget) in ["C_Kart_01_Blu_F","C_Kart_01_Red_F","C_Kart_01_Fuel_F","C_Kart_01_Vrana_F"]) then {
_Btn2 ctrlSetText localize "STR_vInAct_GetInKart";
_Btn2 buttonSetAction "player moveInDriver life_vInact_curTarget; closeDialog 0;";
if(count crew _curTarget == 0 && {canMove _curTarget} && {locked _curTarget == 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(count crew _curTarget == 0 && {canMove _curTarget}) then { _Btn2 ctrlEnable false;} else {_Btn2 ctrlEnable true;};
};
};
switch(playerSide) do {
case west : {
_Btn3 ctrlSetText localize "STR_vInAct_Registration";
_Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_searchVehAction;";
_Btn4 ctrlSetText localize "STR_vInAct_SearchVehicle";
_Btn4 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_vehInvSearch;";
_Btn5 ctrlSetText localize "STR_vInAct_PullOut";
_Btn5 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction;";
if(count crew _curTarget == 0) then {_Btn5 ctrlEnable false;};
_Btn6 ctrlSetText localize "STR_vInAct_Impound";
_Btn6 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_impoundAction;";
};
case independent : {
if(license_med_adac) then {
_Btn3 ctrlSetText localize "STR_vInAct_Registration";
_Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_searchVehAction;";
_Btn5 ctrlSetText localize "STR_vInAct_ADACImpound";
_Btn5 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_impoundActionADAC;";
} else {
_Btn3 ctrlShow false;
_Btn5 ctrlShow false;
};
_Btn4 ctrlSetText localize "STR_vInAct_PullOut";
_Btn4 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction;";
if(count crew _curTarget == 0) then {_Btn4 ctrlEnable false;};
_Btn6 ctrlShow false;
};
case civilian : {
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")} OR !local _curTarget && {_curTarget in life_vehicles}) then {
_Btn3 ctrlEnable false;
} else {
_Btn3 ctrlEnable true;
};
} else {
_Btn3 ctrlShow false;
};
_Btn4 ctrlSetText localize "STR_vInAct_PullOut";
_Btn4 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction;";
if(count crew _curTarget == 0) then {_Btn4 ctrlEnable false;};
_Btn5 ctrlShow false;
_Btn6 ctrlShow false;
};
};
hi zusammen
ich hab da nen problem mit dem vInteractionMenu
als adac möchte ich fahrzeuge abschleppen, der adac ist bei den medics (independent) untergebracht
in der fn_vInteractionMenu.sqf habe ich die button definiert und alles
wenn ich mein eigenes fahrzeug abschleppen will, geht es ohne probleme
aber sobald ich ein "fremdes" fahrzeug versuche geht es nicht
es werden zwar alle buttons richtig angezeigt, aber es ist keine beschriftung drauf und natürlich keine funktion
http://www.pic-upload.de/view-27993450/adac1.jpg.html
fn_vInteractionMenu.sqf
#include <macro.h>
/*
File: fn_vInteractionMenu.sqf
Author: Bryan "Tonic" Boardwine
Description:
Replaces the mass addactions 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"];
if(!dialog) then {
createDialog "vInteraction_Menu";
};
disableSerialization;
_curTarget = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
if(isNull _curTarget) exitWith {closeDialog 0;}; //Bad target
_isVehicle = if((_curTarget isKindOf "landVehicle") OR (_curTarget isKindOf "Ship") OR (_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;
//Set Repair Action
_Btn1 ctrlSetText localize "STR_vInAct_Repair";
_Btn1 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_repairTruck;";
if("ToolKit" in (items player)) then {_Btn1 ctrlEnable true;} else {_Btn1 ctrlEnable false;};
//Abschleppen für den ADAC
if((playerSide == independent) && (license_med_adac) && {speed _curTarget == 0} && _curTarget in life_vehicles) then {
_Btn4 ctrlShow true;
_Btn4 ctrlSetText localize "STR_vInAct_Registration";
_Btn4 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_searchVehAction;";
_Btn5 ctrlShow true;
_Btn5 ctrlSetText "Abschleppen";
_Btn5 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_impoundActionADAC;";
_Btn6 ctrlShow false;
};
//Buttons verstecken für Medic
if((playerSide == independent) && (license_med_maAir) && {speed _curTarget == 0} && _curTarget in life_vehicles) then {
_Btn4 ctrlShow false;
_Btn5 ctrlShow false;
_Btn6 ctrlShow false;
};
if(playerSide == west) then {
_Btn2 ctrlSetText localize "STR_vInAct_Registration";
_Btn2 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_searchVehAction;";
_Btn3 ctrlSetText localize "STR_vInAct_SearchVehicle";
_Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_vehInvSearch;";
_Btn4 ctrlSetText localize "STR_vInAct_PullOut";
_Btn4 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction;";
if(count crew _curTarget == 0) then {_Btn4 ctrlEnable false;};
_Btn5 ctrlSetText localize "STR_vInAct_Impound";
_Btn5 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_impoundAction;";
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} && {count crew _curTarget == 0}) then { _Btn6 ctrlEnable true;} else {_Btn6 ctrlEnable false};
} else {
if(typeOf (_curTarget) in ["C_Kart_01_Blu_F","C_Kart_01_Red_F","C_Kart_01_Fuel_F","C_Kart_01_Vrana_F"]) then {
_Btn6 ctrlSetText localize "STR_vInAct_GetInKart";
_Btn6 buttonSetAction "player moveInDriver life_vInact_curTarget; closeDialog 0;";
if(count crew _curTarget == 0 && {canMove _curTarget} && {locked _curTarget == 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(count crew _curTarget == 0 && {canMove _curTarget}) then { _Btn6 ctrlEnable false;} else {_Btn6 ctrlEnable true;};
};
};
} else {
if(_curTarget isKindOf "Ship") then {
_Btn2 ctrlSetText localize "STR_vInAct_PushBoat";
_Btn2 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;";
if(_curTarget isKindOf "Ship" && {local _curTarget} && {count crew _curTarget == 0}) then { _Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false};
} else {
if(typeOf (_curTarget) in ["C_Kart_01_Blu_F","C_Kart_01_Red_F","C_Kart_01_Fuel_F","C_Kart_01_Vrana_F"]) then {
_Btn2 ctrlSetText localize "STR_vInAct_GetInKart";
_Btn2 buttonSetAction "player moveInDriver life_vInact_curTarget; closeDialog 0;";
if(count crew _curTarget == 0 && {canMove _curTarget} && {locked _curTarget == 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(count crew _curTarget == 0 && {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")} OR !local _curTarget && {_curTarget in life_vehicles}) then {
_Btn3 ctrlEnable false;
} else {
_Btn3 ctrlEnable true;
};
} else {
_Btn3 ctrlSetText localize "STR_vInAct_PullOut";
_Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction;";
if(count crew _curTarget == 0) then {_Btn3 ctrlEnable false;};
};
if((playerSide == civilian) && {speed _curTarget == 0} && _curTarget in life_vehicles) then {
_Btn4 ctrlShow false;
_Btn5 ctrlShow false;
_Btn6 ctrlShow false;
};
};
hu
supa geschrieben
(edit)
poste doch mal die inhalte der dateien
hi zusammen
ich brauch mal nen rat und so ;D
und zwar ... ist es möglich, die slots in der lobby festzulegen ?
also z.b
opfor/independent mit cop_level/med_level oder uid ?
grüsse
tass