.... Wies dort steht. Datei öffnen und einfügen
[TUTORIAL][Altis Life 4.4+] Aufsteckblaulicht für die Polizei
-
- Altis Life
-
blackfisch -
7. März 2017 um 21:37
-
-
hab es in der Core/init.sqf das rein vor denn dialogs
emergLight_vehicles = [];
{
emergLight_vehicles pushBack (configName _x);
} forEach ("true" configClasses (missionConfigFile >> "emergLightVehicles")); -
Vor den Dialogs? Wut? Zeig bitte mal die Datei
-
Code
Alles anzeigen#include "..\script_macros.hpp" /* File: init.sqf Author: Description: Master client initialization file */ private["_handle","_timeStamp","_server_isReady","_extDB_notLoaded"]; if (life_HC_isActive) then { _server_isReady = life_HC_server_isReady; _extDB_notLoaded = life_HC_server_extDB_notLoaded; } else { _server_isReady = life_server_isReady; _extDB_notLoaded = life_server_extDB_notLoaded; }; life_firstSpawn = true; life_session_completed = false; 0 cutText["Setting up client, please wait...","BLACK FADED"]; 0 cutFadeOut 9999999; _timeStamp = diag_tickTime; diag_log "----------------------------------------------------------------------------------------------------"; diag_log "--------------------------------- Starting Altis Life Client Init ----------------------------------"; diag_log "------------------------------------------ Version 4.4r4 -------------------------------------------"; diag_log "----------------------------------------------------------------------------------------------------"; waitUntil {!isNull player && player == player}; //Wait till the player is ready [] call compile PreprocessFileLineNumbers "core\clientValidator.sqf"; enableSentences false; //Setup initial client core functions diag_log "::Life Client:: Initialization Variables"; [] call compile PreprocessFileLineNumbers "core\configuration.sqf"; //Set bank amount for new players switch (playerSide) do { case west: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop"); }; case civilian: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_civ"); }; case independent: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_med"); }; case east: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_adac"); }; }; diag_log "::Life Client:: Variables initialized"; diag_log "::Life Client:: Setting up Eventhandlers"; [] call life_fnc_setupEVH; diag_log "::Life Client:: Eventhandlers completed"; diag_log "::Life Client:: Setting up user actions"; [] call life_fnc_setupActions; diag_log "::Life Client:: User actions completed"; diag_log "::Life Client:: Waiting for server functions to transfer.."; waitUntil {(!isNil "TON_fnc_clientGangLeader")}; diag_log "::Life Client:: Received server functions."; 0 cutText ["Waiting for the server to be ready...","BLACK FADED"]; 0 cutFadeOut 99999999; diag_log "::Life Client:: Waiting for the server to be ready.."; waitUntil{!isNil "_server_isReady"}; waitUntil{(_server_isReady || !isNil "_extDB_notLoaded")}; if (!isNil "_extDB_notLoaded" && {_extDB_notLoaded isEqualType []}) exitWith { diag_log _extDB_notLoaded; 999999 cutText ["extDB failed to load, please contact an administrator.","BLACK FADED"]; 999999 cutFadeOut 99999999; }; [] call SOCK_fnc_dataQuery; waitUntil {life_session_completed}; 0 cutText["Finishing client setup procedure","BLACK FADED"]; 0 cutFadeOut 9999999; //diag_log "::Life Client:: Group Base Execution"; [] spawn life_fnc_escInterupt; switch (playerSide) do { case west: { _handle = [] spawn life_fnc_initCop; waitUntil {scriptDone _handle}; }; case civilian: { //Initialize Civilian Settings _handle = [] spawn life_fnc_initCiv; waitUntil {scriptDone _handle}; }; case independent: { //Initialize Medics and blah _handle = [] spawn life_fnc_initMedic; waitUntil {scriptDone _handle}; }; case east: { //Initialize Adac and blah _handle = [] spawn life_fnc_initAdac; waitUntil {scriptDone _handle}; }; }; player setVariable ["restrained",false,true]; player setVariable ["Escorting",false,true]; player setVariable ["transporting",false,true]; player setVariable ["playerSurrender",false,true]; diag_log "Past Settings Init"; [] execFSM "core\fsm\client.fsm"; diag_log "Executing client.fsm"; waitUntil {!(isNull (findDisplay 46))}; diag_log "Display 46 Found"; (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call life_fnc_keyHandler"]; player addRating 99999999; [player,life_settings_enableSidechannel,playerSide] remoteExecCall ["TON_fnc_managesc",RSERV]; 0 cutText ["","BLACK IN"]; [] call life_fnc_hudSetup; /* Set up frame-by-frame handlers */ LIFE_ID_PlayerTags = ["LIFE_PlayerTags","onEachFrame","life_fnc_playerTags"] call BIS_fnc_addStackedEventHandler; LIFE_ID_RevealObjects = ["LIFE_RevealObjects","onEachFrame","life_fnc_revealObjects"] call BIS_fnc_addStackedEventHandler; player setVariable ["steam64ID",getPlayerUID player]; player setVariable ["realname",profileName,true]; life_fnc_moveIn = compileFinal " life_disable_getIn = false; player moveInCargo (_this select 0); life_disable_getOut = true; "; life_fnc_RequestClientId = player; publicVariableServer "life_fnc_RequestClientId"; //Variable OwnerID for HeadlessClient [] spawn life_fnc_survival; [] spawn { for "_i" from 0 to 1 step 0 do { waitUntil{(!isNull (findDisplay 49)) && (!isNull (findDisplay 602))}; // Check if Inventory and ESC dialogs are open (findDisplay 49) closeDisplay 2; // Close ESC dialog (findDisplay 602) closeDisplay 2; // Close Inventory dialog }; }; CONSTVAR(life_paycheck); //Make the paycheck static. if (LIFE_SETTINGS(getNumber,"enable_fatigue") isEqualTo 0) then {player enableFatigue false;}; if (LIFE_SETTINGS(getNumber,"pump_service") isEqualTo 1) then{ [] execVM "core\fn_setupStationService.sqf"; }; if (life_HC_isActive) then { [getPlayerUID player,player getVariable["realname",name player]] remoteExec ["HC_fnc_wantedProfUpdate",HC_Life]; } else { [getPlayerUID player,player getVariable["realname",name player]] remoteExec ["life_fnc_wantedProfUpdate",RSERV]; }; //DynMarket DYNAMICMARKET_boughtItems = []; [player] remoteExec ["TON_fnc_playerLogged",RSERV]; emergLight_vehicles = []; { emergLight_vehicles pushBack (configName _x); } forEach ("true" configClasses (missionConfigFile >> "emergLightVehicles")); diag_log "----------------------------------------------------------------------------------------------------"; diag_log format[" End of Altis Life Client Init :: Total Execution Time %1 seconds ",(diag_tickTime) - _timeStamp]; diag_log "----------------------------------------------------------------------------------------------------";
ja da rein eben oder gehört es in die andere init.sqf so geht es ja auch
-
Code
Alles anzeigen#include "..\script_macros.hpp" /* File: init.sqf Author: Description: Master client initialization file */ private["_handle","_timeStamp","_server_isReady","_extDB_notLoaded"]; if (life_HC_isActive) then { _server_isReady = life_HC_server_isReady; _extDB_notLoaded = life_HC_server_extDB_notLoaded; } else { _server_isReady = life_server_isReady; _extDB_notLoaded = life_server_extDB_notLoaded; }; life_firstSpawn = true; life_session_completed = false; 0 cutText["Setting up client, please wait...","BLACK FADED"]; 0 cutFadeOut 9999999; _timeStamp = diag_tickTime; diag_log "----------------------------------------------------------------------------------------------------"; diag_log "--------------------------------- Starting Altis Life Client Init ----------------------------------"; diag_log "------------------------------------------ Version 4.4r4 -------------------------------------------"; diag_log "----------------------------------------------------------------------------------------------------"; waitUntil {!isNull player && player == player}; //Wait till the player is ready [] call compile PreprocessFileLineNumbers "core\clientValidator.sqf"; enableSentences false; //Setup initial client core functions diag_log "::Life Client:: Initialization Variables"; [] call compile PreprocessFileLineNumbers "core\configuration.sqf"; //Set bank amount for new players switch (playerSide) do { case west: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop"); }; case civilian: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_civ"); }; case independent: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_med"); }; case east: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_adac"); }; }; diag_log "::Life Client:: Variables initialized"; diag_log "::Life Client:: Setting up Eventhandlers"; [] call life_fnc_setupEVH; diag_log "::Life Client:: Eventhandlers completed"; diag_log "::Life Client:: Setting up user actions"; [] call life_fnc_setupActions; diag_log "::Life Client:: User actions completed"; diag_log "::Life Client:: Waiting for server functions to transfer.."; waitUntil {(!isNil "TON_fnc_clientGangLeader")}; diag_log "::Life Client:: Received server functions."; 0 cutText ["Waiting for the server to be ready...","BLACK FADED"]; 0 cutFadeOut 99999999; diag_log "::Life Client:: Waiting for the server to be ready.."; waitUntil{!isNil "_server_isReady"}; waitUntil{(_server_isReady || !isNil "_extDB_notLoaded")}; if (!isNil "_extDB_notLoaded" && {_extDB_notLoaded isEqualType []}) exitWith { diag_log _extDB_notLoaded; 999999 cutText ["extDB failed to load, please contact an administrator.","BLACK FADED"]; 999999 cutFadeOut 99999999; }; [] call SOCK_fnc_dataQuery; waitUntil {life_session_completed}; 0 cutText["Finishing client setup procedure","BLACK FADED"]; 0 cutFadeOut 9999999; //diag_log "::Life Client:: Group Base Execution"; [] spawn life_fnc_escInterupt; switch (playerSide) do { case west: { _handle = [] spawn life_fnc_initCop; waitUntil {scriptDone _handle}; }; case civilian: { //Initialize Civilian Settings _handle = [] spawn life_fnc_initCiv; waitUntil {scriptDone _handle}; }; case independent: { //Initialize Medics and blah _handle = [] spawn life_fnc_initMedic; waitUntil {scriptDone _handle}; }; case east: { //Initialize Adac and blah _handle = [] spawn life_fnc_initAdac; waitUntil {scriptDone _handle}; }; }; player setVariable ["restrained",false,true]; player setVariable ["Escorting",false,true]; player setVariable ["transporting",false,true]; player setVariable ["playerSurrender",false,true]; diag_log "Past Settings Init"; [] execFSM "core\fsm\client.fsm"; diag_log "Executing client.fsm"; waitUntil {!(isNull (findDisplay 46))}; diag_log "Display 46 Found"; (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call life_fnc_keyHandler"]; player addRating 99999999; [player,life_settings_enableSidechannel,playerSide] remoteExecCall ["TON_fnc_managesc",RSERV]; 0 cutText ["","BLACK IN"]; [] call life_fnc_hudSetup; /* Set up frame-by-frame handlers */ LIFE_ID_PlayerTags = ["LIFE_PlayerTags","onEachFrame","life_fnc_playerTags"] call BIS_fnc_addStackedEventHandler; LIFE_ID_RevealObjects = ["LIFE_RevealObjects","onEachFrame","life_fnc_revealObjects"] call BIS_fnc_addStackedEventHandler; player setVariable ["steam64ID",getPlayerUID player]; player setVariable ["realname",profileName,true]; life_fnc_moveIn = compileFinal " life_disable_getIn = false; player moveInCargo (_this select 0); life_disable_getOut = true; "; life_fnc_RequestClientId = player; publicVariableServer "life_fnc_RequestClientId"; //Variable OwnerID for HeadlessClient [] spawn life_fnc_survival; [] spawn { for "_i" from 0 to 1 step 0 do { waitUntil{(!isNull (findDisplay 49)) && (!isNull (findDisplay 602))}; // Check if Inventory and ESC dialogs are open (findDisplay 49) closeDisplay 2; // Close ESC dialog (findDisplay 602) closeDisplay 2; // Close Inventory dialog }; }; CONSTVAR(life_paycheck); //Make the paycheck static. if (LIFE_SETTINGS(getNumber,"enable_fatigue") isEqualTo 0) then {player enableFatigue false;}; if (LIFE_SETTINGS(getNumber,"pump_service") isEqualTo 1) then{ [] execVM "core\fn_setupStationService.sqf"; }; if (life_HC_isActive) then { [getPlayerUID player,player getVariable["realname",name player]] remoteExec ["HC_fnc_wantedProfUpdate",HC_Life]; } else { [getPlayerUID player,player getVariable["realname",name player]] remoteExec ["life_fnc_wantedProfUpdate",RSERV]; }; //DynMarket DYNAMICMARKET_boughtItems = []; [player] remoteExec ["TON_fnc_playerLogged",RSERV]; emergLight_vehicles = []; { emergLight_vehicles pushBack (configName _x); } forEach ("true" configClasses (missionConfigFile >> "emergLightVehicles")); diag_log "----------------------------------------------------------------------------------------------------"; diag_log format[" End of Altis Life Client Init :: Total Execution Time %1 seconds ",(diag_tickTime) - _timeStamp]; diag_log "----------------------------------------------------------------------------------------------------";
ja da rein eben oder gehört es in die andere init.sqf so geht es ja auch
Ich denke du solltest eher die Init.SQF im Hauptverzeichnis nehmen. Nicht diese hier.
Kann auch sein das ich mich irre
-
Mhm komisch Welche ist eigentlich egal @Roo1 aber versuchs mal benjin
-
kann sein zur zeit hab ich keinen error mehr allerdings das problem beim einpacken in die garage besteht trotzdem noch das der cleanup fehlt für das teil
aber merkwürdig das es so und so geht
-
Erst abmachen, klar fehlt der Cleanup war ursprünglich auch nicht für Altis Life geschrieben
-
Geht diese auch auf der 5.00
-
Warum sollte es nicht gehen auf der 5.0 ?
Teste es doch einfach
-
Warum sollte es nicht gehen auf der 5.0 ?
Teste es doch einfach
Dachte weil es beim medic suv nicht ging aber ich werde wenn ich es platzieren möchte wegen Batteleye: setvariable restriction gekickt was muss ich ändern im batteleye
-
Dateien alles eingefügt, fehlerfrei, es macht aber immer nur das Normale bereits vorhandene Blautlicht an.
init.sqfCode: init.sqf
Alles anzeigen/* File: init.sqf Author: Description: */ StartProgress = false; if (hasInterface) then { [] execVM "briefing.sqf"; //Load Briefing }; [] execVM "KRON_Strings.sqf"; StartProgress = true; emergLight_vehicles = []; { emergLight_vehicles pushBack (configName _x); } forEach ("true" configClasses (missionConfigFile >> "emergLightVehicles"));
description.ext
C: description.ext
Alles anzeigendisableChannels[] = {{0,true,true},{1,true,true},{2,true,true}}; // Disabled text and voice for global, side, and command channels. Syntax: disableChannels[] = {{channelID<number>, disableChat<bool>, disableVoice<bool>}}; overviewText = "$STR_MISC_overviewText"; // Text to be displayed below the overviewPicture on the mission selection screen when the mission is available to play. #include "CfgRemoteExec.hpp" #include "dialog\MasterHandler.hpp" #include "config\Config_Master.hpp" #include "Config_EmergLights.hpp" class CfgServer { DatabaseName = "altislife"; //Config name that'll be grep in the extdb-conf.ini. Default: [altislife] DebugMode = 0; //Enable many server/hc debugging logs. Default: 0 (1 = Enabled / 0 = Disabled) HeadlessSupport = 0; //Enable/Disable Headless client support. Default: 1 (1 = Enabled / 0 = Disabled) /* Enabled: When HeadlessSupport is set to 1 (enabled), the server will run without fault when no Headless Client is connected. However, it will support the Headless Client if you choose to connect one. Disabled: If HeadlessSupport is set to 0 (disabled), the connection of a Headless Client will make no difference. This option will increase server performance a TINY but negligible amount. */
Conifg_EmergLights.hpp
Code: Config_EmergLights.hpp
Alles anzeigenclass emergLightVehicles { class C_SUV_01_F { pos[] = { 0.4, -0.05, 0.32 }; }; /* +++ Config Example +++ New Vehicles: class Vehicle_Class_Name { pos[] = { x, y, z }; // coordinates relative to vehicle }; vehicles with same coordinates (e.g. same vehicle, different skin & class): class Vehicle_Class_2: Vehicle_Class_Name {}; // "Vehicle_Class_2" gets the same attributes as "Vehicle_Class_Name" */ };
CfgRemoteExec.hpp
Code: CfgRemoteExec.hpp
Alles anzeigen/* Functions for everyone */ F(BIS_fnc_effectKilledAirDestruction,ANYONE) F(BIS_fnc_effectKilledSecondaries,ANYONE) F(life_fnc_animSync,ANYONE) F(life_fnc_broadcast,ANYONE) F(life_fnc_colorVehicle,ANYONE) F(life_fnc_corpse,ANYONE) F(life_fnc_demoChargeTimer,ANYONE) F(life_fnc_flashbang,ANYONE) F(life_fnc_jumpFnc,ANYONE) F(life_fnc_lockVehicle,ANYONE) F(life_fnc_pulloutVeh,ANYONE) F(life_fnc_say3D,ANYONE) F(life_fnc_setFuel,ANYONE) F(life_fnc_simDisable,ANYONE) F(SPY_fnc_notifyAdmins,ANYONE) F(bf_fnc_lightsOn,ANYONE) };
Functions.hpp
Code: Functions.hpp
Alles anzeigenclass Socket_Reciever { tag = "SOCK"; class SQL_Socket { file = "core\session"; class dataQuery {}; class insertPlayerInfo {}; class requestReceived {}; class syncData {}; class updatePartial {}; class updateRequest {}; }; }; class blackfisch_Functions { tag = "bf"; class Scripts { file = "core\scripts"; class lights {}; class lightsOn {}; }; }; class Life_Client_Core { tag = "life"; class Master_Directory { file = "core"; class initCiv {}; class initCop {}; class initMedic {}; class setupActions {}; class setupEVH {}; class survival {}; class welcomeNotification {}; };
core/scripts/fn_lights.sqf
Code: fn_lights.sqf
Alles anzeigen/* File: fn_lights.sqf Author: blackfisch Based on code by: nflug Description: Aufsteckblaulicht */ private _vehicle = vehicle player; private _vehType = typeOf _vehicle; if (isNull objectParent player) exitWith {}; //not in a vehicle if (!alive player) exitWith {}; //not alive if !(driver _vehicle isEqualTo player) exitWith {}; //not the driver if !(_vehType in emergLight_vehicles) exitWith {}; //not defined vehicle private _attachPoint = getArray(missionConfigFile >> "emergLightVehicles" >> _vehType >> "pos"); //get coordinates of attachment point private _class = "Land_Camping_Light_off_F"; //classname of the object if !(_vehicle getVariable ["light",false]) then { _vehicle setVariable ["light",true,true]; _blaulicht = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"]; _vehicle setVariable ["lightObj",_blaulicht,true]; _blaulicht attachTo [_vehicle, _attachPoint]; } else { _vehicle setVariable ["light",false,true]; _vehicle setVariable ["lightObj",objNull,true]; { if ((typeOf _x) isEqualTo _class) then { _vehicle setVariable ["lights",false,true]; //detach _x; deleteVehicle _x; }; } forEach (attachedObjects _vehicle); };
core/scripts/fn_lightsOn.sqf
Code: fn_lightsOn.sqf
Alles anzeigen/* File: fn_lightsOn.sqf Author: blackfisch Description: Main functions for lights */ if !(params [["_veh", objNull, [objNull]]]) exitWith {}; //why no parameter cyka? private _lightObj = _veh getVariable ["lightObj",objNull]; if (isNull _veh) exitWith {}; if !(typeOf _veh in emergLight_vehicles) exitWith {}; //not defined vehicle if (isNull _lightObj) exitWith {}; private _color = [0.1, 0.1, 10]; //setup the color //create the light _light = "#lightpoint" createVehicle (getPos _lightObj); _light setLightDayLight true; _light setLightColor _color; _light setLightAmbient [0.1,0.1,1]; _light lightAttachObject [_lightObj, [0, 0, 0.07]]; _light setLightAttenuation [0.181, 0, 1000, 130]; _light setLightBrightness 0.05; _light setLightIntensity 10; _light setLightDayLight true; for "_i" from 0 to 1 step 0 do { if !(_veh getVariable ["lights",false]) exitWith {}; _light setLightBrightness 6; uisleep 0.05; _light setLightBrightness 0.05; uisleep 0.05; _light setLightBrightness 6; uisleep 0.05; _light setLightBrightness 0.05; uisleep 0.15; }; waitUntil {!(_veh getVariable ["lights",false])}; deleteVehicle _light;
fn_keyHandler.sqf
Code: fn_keyHandler.sqf
Alles anzeigen//L Key? case 38: { private _veh = vehicle player; if (_shift && playerSide in [west,independent]) then { if (_ctrlKey && {!_shift} && {!isNull objectParent player} && {(driver _veh) isEqualTo player} && {playerSide isEqualTo west}) then { call bf_fnc_lights; _handled = true; }; if (_shift && {!_ctrlKey} && {!isNull objectParent player} && {(driver _veh) isEqualTo player} && {playerSide isEqualTo west}) then { if (!isNull (_veh getVariable ["lightObj",objNull])) then { if (_veh getVariable ["lights",false]) then { _veh setVariable ["lights",false,true]; } else { _veh setVariable ["lights",true,true]; [_veh] remoteExec ["bf_fnc_lightsOn",0]; }; } else { if ((typeOf _veh) in ["C_Offroad_01_F","B_MRAP_01_F","C_SUV_01_F","C_Hatchback_01_sport_F","B_Heli_Light_01_F","B_Heli_Transport_01_F"]) then { if (!isNil {_veh getVariable "lights"}) then { if (playerSide isEqualTo west) then { [_veh] call life_fnc_sirenLights; } else { [_veh] call life_fnc_medicSirenLights; }; _handled = true; }; }; }; _handled = true; }; };
Es passiert ingame immernoch nichts.
EDIT: Dazu kommt jetzt "desctiption.ext line 168 CfgFunctions Missing ")"
-
KeyHandler nochmal die case ersetzen, da hast du was falsch gemacht
-
KeyHandler nochmal die case ersetzen, da hast du was falsch gemacht
Brauche ich dafür eine gewisse Anordnung der Codeschnipsel?
Da es ja in der Code funktion nicht gezeigt wird.
-
Wie meinst du?
Ersetz einfach deine case 38 nochmal mit der aus dem Tut vollständig
-
Wüde ich es jetzt ersetzen sähe es so aus.
- Habe mich mit der fn_KeyHandler.sqf noch nie beschäftigt bis jetzt. -
-
Schick bitte mal die Datei hier rein...
-
-
probier das mal
-
Morgen,
Da ist mein Internet mir gestern abgewürgt... Danke Kabel-Deutschland.
Werde ich nachher mal ausprobieren!
Danke
-