- Offizieller Beitrag
- Logdateien zur Fehleranalyse
- Ja, ich habe Logdateien meines Servers hochgeladen
Hallooooo,
zum Grundprinzip. Über das eine Action soll innerhalb eines Fahrzeuges via say3D eine Durchsage gespielt werden. Funktioniert nach mehreren Anläufen nicht.
Größtes Problem, Log gibt mir keine Fehler.
Serverlog:
arma3server_x64_2021-02-07_16-02-27.rpt
Clientlog:
Arma3_x64_2021-02-07_16-02-46.rpt
Files:
Code: fn_cop_ansg_re_feuer.sqf
#include "..\..\script_macros.hpp"
if (playerSide in [west] && {vehicle player != player} && {!life_ansg_re_feuer_active} && {((driver vehicle player) isEqualTo player)}) then {
[] spawn {
life_ansg_re_feuer_active = true;
sleep 6.138;
life_ansg_re_feuer_active = false;
};
private _veh = vehicle player;
if (isNil {_veh getVariable "ansg_re_feuer"}) then {_veh setVariable ["ansg_re_feuer",false,true];};
if ((_veh getVariable "ansg_re_feuer")) then {
hint "Ansage aus - Testmode";
_veh setVariable ["ansg_re_feuer",false,true];
if !(isNil {(_veh getVariable "sirenJIP")}) then {
private _jip = _veh getVariable "sirenJIP";
_veh setVariable ["sirenJIP",nil,true];
remoteExec ["",_jip]; //remove from JIP queue
};
} else {
hint "Ansage an - Testmode";
_veh setVariable ["ansg_re_feuer",true,true];
private "_jip";
if (playerSide isEqualTo west) then {
_jip = [_veh] remoteExec ["life_fnc_ansg_re_feuers",RCLIENT,true];
};
_veh setVariable ["sirenJIP",_jip,true];
};
};
Alles anzeigen
Code: fn_cop_ansg_re_feuers.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_copSiren.sqf
Author: Bryan "Tonic" Boardwine
Description:
Starts the cop siren sound for other players.
*/
private ["_vehicle"];
_vehicle = param [0,objNull,[objNull]];
if (isNull _vehicle) exitWith {};
if (isNil {_vehicle getVariable "ansg_re_feuer"}) exitWith {};
for "_i" from 0 to 1 step 0 do {
if (!(_vehicle getVariable "ansg_re_feuer")) exitWith {};
if (count crew _vehicle isEqualTo 0) then {_vehicle setVariable ["ansg_re_feuer",false,true]};
if (!alive _vehicle) exitWith {};
if (isNull _vehicle) exitWith {};
_vehicle say3D ["ansg_re_feuer",500,1]; //Class name specified in description.ext, max distance & pitch
sleep 6.138;//Exactly matches the length of the audio file.
if (!(_vehicle getVariable "ansg_re_feuer")) exitWith {};
_vehicle setVariable ["ansg_re_feuer",false,true];
};
Alles anzeigen
Code: fn_setupActions.sqf
//Cop-Ansagen
life_actions pushBack (player addAction["<t color = '#FF0000'>Ansage - Feuer eröffnen</t>",life_fnc_cop_ansg_re_feuer,"",0,false,false,"",' vehicle player != player ']);
life_actions pushBack (player addAction["<t color = '#FF6600'>Ansage - Gebäude räumen</t>",life_fnc_cop_ansg_unbe_geb,"",0,false,false,"",' vehicle player != player ']);
life_actions pushBack (player addAction["<t color = '#00FF00'>Ansage - rechts halten</t>",life_fnc_cop_ansg_re_halten,"",0,false,false,"",' vehicle player != player ']);
Hatte es Anfangs, nur über die fn_cop_ansg_re_feuers.sqf aufgerufen, dann aber aus der KeyHandler die Codezeilen übernommen. Ist in der RemoteExec eingetragen:
JIP(life_fnc_ansg_re_feuers,CLIENT)
Vielleicht hat ja jemand, eine Idee.
Grüße