Ja eigentlich ganz einfach ich will ne Clan Sirene machen wo der jenige halt auf Ö drücken kann und eine sirene abgespielt werden (Clan Lizenes ist vorhanden. license_civ_SOS Name der Lizenes
Custom Auto Sirene
-
Deomann -
8. August 2018 um 22:51 -
Erledigt
-
-
Joa dann mach mal.
#edit: Forumssuche ftw [Tutorial] Polizei RP Sirene / Zweite Sirene hinzufügen
-
Code
Code //Ö Key case 39: { if (playerSide in [west,independent] && {vehicle player != player} && {!life_siren_active} && {((driver vehicle player) == player)}) then { [] spawn {
Das heißt ich würde einfach bei west Civilian eintragen?
-
Dann kann sie aber jeder abspielen der civ ist
-
und wie würde ich die abfrage nach der Lizenz machen
-
Das heißt ich würde einfach bei west Civilian eintragen?
Jein, natürlich ist das nicht alles. Die Unterscheidung nach Fraktion ist der erste Schritt. Das Tutorial ist ja auch nur ein guter Startpunkt. Und du kamst ja von alleine auf die Idee mit der Lizenz. Das musst du also auch noch einbauen.
Und damit alles so läuft wie du es dir vorstellst (Sound in Schleife oder nur einmal etc.), musst du eventuell noch andere Sachen machen. Dazu kommt natürlich auch immer wieder testen testen testen und vom Code lernen, welcher schon da ist und ähnliche Sachen löst.
Wenn du Probleme oder konkrete Fragen hast: Gerne.#edit zu deiner Frage, welche ich erst nach dem Tippen gesehen hab
Codeswitch true do { case LIZENZCLAN1 : /*hier code um sound abspielen aufzurufen mit Sound für clan 1*/ case LIZENZCLAN2 : /* ... */ };
so wären mehrere Clans umsetzbar. Wenn es nur eine Lizenz geben soll, reicht auch ein if (LIZENZ) then {/*...*/};
-
[warnbox]Thread moved[/warnbox]
Bitte in Zukunft darauf achten im richtigen Bereich zu posten
-
Code
Alles anzeigencase 46: { switch true do { case license_civ_clanPeterson: { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanPeterson"}) then {_veh setVariable ["clanPeterson",false,true];}; if ((_veh getVariable "clanPeterson")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanPeterson",RCLIENT]; }; }; }; case license_civ_clanNabat: { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanNabat"}) then {_veh setVariable ["clanNabat",false,true];}; if ((_veh getVariable "clanNabat")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanNabat",RCLIENT]; }; }; }; }; };
Es kommt kein Fehler nur das die Sirene angemacht wurde... ich verstehe das nicht so richtig wie das mit der case abfrage funktioniert
Mit
ging es aber da kann ich ja schlecht 2 machen das wäre ja extrem inpervormant
-
Code
Alles anzeigencase 46: { switch true do { case license_civ_clanPeterson: { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanPeterson"}) then {_veh setVariable ["clanPeterson",false,true];}; if ((_veh getVariable "clanPeterson")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanPeterson",RCLIENT]; }; }; }; case license_civ_clanNabat: { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanNabat"}) then {_veh setVariable ["clanNabat",false,true];}; if ((_veh getVariable "clanNabat")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanNabat",RCLIENT]; }; }; }; }; };
Es kommt kein Fehler nur das die Sirene angemacht wurde... ich verstehe das nicht so richtig wie das mit der case abfrage funktioniert
Mit
ging es aber da kann ich ja schlecht 2 machen das wäre ja extrem inpervormant
Du kannst auch zwei Sachen in den then packen so:
if (LIZENZ) then {
das1
das2
das3
};
-
Ne ich brauche ja die abfrage wenn er license_civ_clanPeterson hat soll er die clanPeterson Sirene abspielen und wenn er die license_civ_clanNabat hat soll er die clanNabat ausführen.
Normalerweiße sollte das ja mit der case abfrage gehen aber iwie will das bei mir nicht gehen
-
Ne ich brauche ja die abfrage wenn er license_civ_clanPeterson hat soll er die clanPeterson Sirene abspielen und wenn er die license_civ_clanNabat hat soll er die clanNabat ausführen.
Normalerweiße sollte das ja mit der case abfrage gehen aber iwie will das bei mir nicht gehen
Warum keine normale Abfrage? Und ja für mehrere dann mit einem ELSE oder eine neue IF abfrage...
-
Ich habe es jetzt versucht mit einer zweiten if abfrage aber jetzt geht garnichts mehr ...
Code
Alles anzeigencase 46: { if (playerSide in [Civilian] && {vehicle player != player} && {!life_siren_active} && {((driver vehicle player) == player)}) then { if (license_civ_clanPeterson) then { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanPeterson"}) then {_veh setVariable ["clanPeterson",false,true];}; if ((_veh getVariable "clanPeterson")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanPeterson",RCLIENT]; }; }; }; }; if (playerSide in [Civilian] && {vehicle player != player} && {!life_siren_active} && {((driver vehicle player) == player)}) then { if (license_civ_clanNabat) then { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanNabat"}) then {_veh setVariable ["clanNabat",false,true];}; if ((_veh getVariable "clanNabat")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanNabat",RCLIENT]; }; }; }; }; };
nun startet die mission nicht mal mehr ...
ich habe jetzt sogar zwei verschiedene fn_clanXXX.sqf gemacht geht trotzdem nicht...
-
Ich habe es jetzt versucht mit einer zweiten if abfrage aber jetzt geht garnichts mehr ...
Code
Alles anzeigencase 46: { if (playerSide in [Civilian] && {vehicle player != player} && {!life_siren_active} && {((driver vehicle player) == player)}) then { if (license_civ_clanPeterson) then { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanPeterson"}) then {_veh setVariable ["clanPeterson",false,true];}; if ((_veh getVariable "clanPeterson")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanPeterson",RCLIENT]; }; }; }; }; if (playerSide in [Civilian] && {vehicle player != player} && {!life_siren_active} && {((driver vehicle player) == player)}) then { if (license_civ_clanNabat) then { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanNabat"}) then {_veh setVariable ["clanNabat",false,true];}; if ((_veh getVariable "clanNabat")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanNabat",RCLIENT]; }; }; }; }; };
nun startet die mission nicht mal mehr ...
ich habe jetzt sogar zwei verschiedene fn_clanXXX.sqf gemacht geht trotzdem nicht...
Versuch mal das:
Code
Alles anzeigencase 46: { if (playerSide in civilian && vehicle player != player && !life_siren_active && driver vehicle player == player) then { if (license_civ_clanPeterson) then { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanPeterson"}) then {_veh setVariable ["clanPeterson",false,true];}; if ((_veh getVariable "clanPeterson")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanPeterson",RCLIENT]; }; }; }; }; if (playerSide in civilian && vehicle player != player && !life_siren_active && driver vehicle player == player) then { if (license_civ_clanNabat) then { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanNabat"}) then {_veh setVariable ["clanNabat",false,true];}; if ((_veh getVariable "clanNabat")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanNabat",RCLIENT]; }; }; }; }; };
Und lade bitte mal deine Description.ext hier hoch bitte.
Mfg
-
-
C
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 "config\Config_SpyGlass.hpp" #include "CfgRemoteExec.hpp" #include "dialog\MasterHandler.hpp" #include "config\Config_Master.hpp" #include "The-Programmer\theprogrammer_dialog_master.cpp" class CfgServer { DatabaseName = "altislife"; //Config name that'll be grep in the extdb-conf.ini. Default: [altislife] DebugMode = 1; //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. */ }; class RscTitles { #include "dialog\progress.hpp" #include "dialog\hud_nameTags.hpp" #include "dialog\hud_stats.hpp" #include "The-Programmer\GPS\RscTitles.hpp" }; class CfgFunctions { #include "Functions.hpp" #include "The-Programmer\theprogrammer_functions_master.cpp" }; class CfgSounds { sounds[] = {}; class sirenLong { name = "sirenLong"; sound[] = {"\sounds\sirenLong.ogg", 1.0, 1}; titles[] = {}; }; class medicSiren { name = "medicSiren"; sound[] = {"\sounds\medicSiren.ogg", 1.0, 1}; titles[] = {}; }; class tazerSound { name = "tazerSound"; sound[] = {"\sounds\tazer.ogg", 0.25, 1}; titles[] = {}; }; class flashbang { name = "flashbang"; sound[] = {"\sounds\flashbang.ogg", 1.0, 1}; titles[] = {}; }; class mining { name = "mining"; sound[] = {"\sounds\mining.ogg", 1.0, 1}; titles[] = {}; }; class harvest { name = "harvest"; sound[] = {"\sounds\harvest.ogg", 1.0, 1}; titles[] = {}; }; class lockCarSound { name = "lockCarSound"; sound[] = {"\sounds\carLock.ogg", 0.25, 1}; titles[] = {}; }; class unlockCarSound { name = "unlockCarSound"; sound[] = {"\sounds\carUnlock.ogg", 0.25, 1}; titles[] = {}; }; class clanpeterson { name = "clanpeterson"; sound[] = {"\sounds\clan_peterson.ogg", 1.0, 1}; titles[] = {}; class clanNabat { name = "clanNabat"; sound[] = {"\sounds\clan_nabat.ogg", 1.0, 1}; titles[] = {}; }; }; class CfgDebriefing { class NotWhitelisted { title = "$STR_NotWhitelisted_Title"; subtitle = "$STR_NotWhitelisted_SubTitle"; description = "$STR_NotWhitelisted_Descript"; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; class Blacklisted { title = "$STR_Blacklisted_Title"; subtitle = "$STR_Blacklisted_SubTitle"; description = "$STR_Blacklisted_Descript"; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; class SpyGlass { title = "$STR_SpyDetect_Title"; subTitle = "$STR_SpyDetect_SubTitle"; description = "$STR_SpyDetect_Descript"; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; }; class CfgNotifications { class MedicalRequestEmerg { title = "$STR_MedicalRequestEmerg_Title"; iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa"; description = "%1"; duration = 5; priority = 7; }; class DeliveryAssigned { title = "$STR_DeliveryAssigned_Title"; iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa"; description = "%1"; duration = 10; priority = 7; }; class DeliveryFailed { title = "$STR_DeliveryFailed_Title"; iconPicture = "\A3\ui_f\data\map\mapcontrol\taskiconfailed_ca.paa"; description = "%1"; duration = 7; priority = 7; }; class DeliverySucceeded { title = "$STR_DeliverySucceeded_Title"; iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcondone_ca.paa"; description = "%1"; duration = 6; priority = 6; }; class TextMessage { title = "$STR_TextMessage_Title"; iconPicture = "icons\ico_messageNew.paa"; description = "%1"; duration = 10; priority = 6; }; class PoliceDispatch { title = "$STR_PoliceDispatch_Title"; iconPicture = "icons\ico_messagePolice.paa"; description = "%1"; duration = 10; priority = 6; }; class AdminDispatch { title = "$STR_AdminDispatch_Title"; iconPicture = "icons\ico_messageAdmin.paa"; description = "%1"; duration = 10; priority = 6; }; class AdminMessage { title = "$STR_AdminMessage_Title"; iconPicture = "icons\ico_messageAdmin.paa"; description = "%1"; duration = 10; priority = 5; }; };
Hier wäre die ganze
-
Du schließt die klammer von clanpetersen nicht
-
-
Schau mal noch in deiner Config_Licenses ob irgendwo ne klammer fehlt oder Sonderzeichen drin sind
-
Versuch mal das:
Code
Alles anzeigencase 46: { if (playerSide in civilian && vehicle player != player && !life_siren_active && driver vehicle player == player) then { if (license_civ_clanPeterson) then { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanPeterson"}) then {_veh setVariable ["clanPeterson",false,true];}; if ((_veh getVariable "clanPeterson")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanPeterson",RCLIENT]; }; }; }; }; if (playerSide in civilian && vehicle player != player && !life_siren_active && driver vehicle player == player) then { if (license_civ_clanNabat) then { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanNabat"}) then {_veh setVariable ["clanNabat",false,true];}; if ((_veh getVariable "clanNabat")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanNabat",RCLIENT]; }; }; }; }; };
Und lade bitte mal deine Description.ext hier hoch bitte.
Mfg
Damit ging es leider auch nicht
Code
Alles anzeigenMit der Version case 46: { if (playerSide in [Civilian] && {vehicle player != player} && {!life_siren_active} && {((driver vehicle player) == player)}) then { if (license_civ_clanPeterson) then { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanPeterson"}) then {_veh setVariable ["clanPeterson",false,true];}; if ((_veh getVariable "clanPeterson")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanPeterson",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanPeterson",RCLIENT]; }; }; }; }; if (playerSide in [Civilian] && {vehicle player != player} && {!life_siren_active} && {((driver vehicle player) == player)}) then { if (license_civ_clanNabat) then { [] spawn { life_siren_active = true; sleep 24; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "clanNabat"}) then {_veh setVariable ["clanNabat",false,true];}; if ((_veh getVariable "clanNabat")) then { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",false,true]; } else { titleText ["Clan-Sierne","PLAIN"]; _veh setVariable ["clanNabat",true,true]; if (playerSide isEqualTo civilian) then { [_veh] remoteExec ["life_fnc_clanNabat",RCLIENT]; }; }; }; }; };
hat es wenigstens angezeit das er die Sierne starten will aber wie kann ich nachschauen ob er die life_fnc_clanNabat/clanPeterson ausführt weil den ton den es abspielen sollte hats nicht gemacht
-
Hast du überhaupt die fn_clanPeterson.sqf erstellt und in der Functions.hpp eingetragen? ggf. noch in der remoteExec eintragen
-