Fahrzeuge wie zum beispiel Tempest und viele andere sachen, ich hänge mal bilder an, was mir nur angezeigt wird.
Beiträge von Claas_Fan_92
-
-
Hallo es fehlen irgendwie sachen im Editor, bin ich grad blind oder warum seh ich nix.
Auch bei meinem Laptop sieht es so aus und Arma 3 hab ich erst frisch installiert
-
Das ist nicht der Code, welchen ich gepostet habe.
Nein das ist was ich selbst versucht habe, ich habe als erstes dein code benutzt und zwar den.
Code
Alles anzeigen//L Key? case 38: { //If cop run checks for turning lights on. if (!(isNull objectParent player) && (typeOf vehicle player) 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 {vehicle player getVariable "lights"}) then { if (playerSide in [west, civilian]) then { [vehicle player] call life_fnc_sirenLights; } else { [vehicle player] call life_fnc_medicSirenLights; }; _handled = true; }; }; if (!_alt && !_ctrlKey) then { [] call life_fnc_radar; }; }; //Y Player Menu case 21: { if (!_alt && !_ctrlKey && !dialog && !(player getVariable ["restrained",false]) && {!life_action_inUse}) then { [] call life_fnc_p_openMenu; }; }; //F Key case 33: { [] spawn { life_siren_active = true; sleep 4.7; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "siren"}) then {_veh setVariable ["siren",false,true];}; if ((_veh getVariable "siren")) then { titleText [localize "STR_MISC_SirensOFF","PLAIN"]; _veh setVariable ["siren",false,true]; } else { titleText [localize "STR_MISC_SirensON","PLAIN"]; _veh setVariable ["siren",true,true]; if (playerSide in [west, civilian]) then { [_veh] remoteExec ["life_fnc_copSiren",RCLIENT]; } else { [_veh] remoteExec ["life_fnc_medicSiren",RCLIENT]; }; }; };
und da passiert wenn ich in kein fahrzeug sitzte geht mit f die sirene an.
-
Ja weiß ich, aber ich muss dir ehrlich sagen, dass ich es schon fast frech finde, dass du nach etwas "so leichtem" fragst. Ich kann nur das sagen, was ich bereits hier im Forum erwähnt habe: Setz dich mit den Skripten auseinander, probier aus und schau Befehle im BI-Wiki nach, die dir nichts sagen, anders lernt man es nicht.
Hier jedoch die überarbeitete Version, wobei du schauen musst, ob in der fn_sirenLights.sqf oder fn_copSiren.sqf noch Abfragen zur Spielerseite drinnen sind.:Code
Alles anzeigen//L Key? case 38: { //If cop run checks for turning lights on. if (!(isNull objectParent player) && (typeOf vehicle player) 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 {vehicle player getVariable "lights"}) then { if (playerSide in [west, civilian]) then { [vehicle player] call life_fnc_sirenLights; } else { [vehicle player] call life_fnc_medicSirenLights; }; _handled = true; }; }; if (!_alt && !_ctrlKey) then { [] call life_fnc_radar; }; }; //Y Player Menu case 21: { if (!_alt && !_ctrlKey && !dialog && !(player getVariable ["restrained",false]) && {!life_action_inUse}) then { [] call life_fnc_p_openMenu; }; }; //F Key case 33: { [] spawn { life_siren_active = true; sleep 4.7; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "siren"}) then {_veh setVariable ["siren",false,true];}; if ((_veh getVariable "siren")) then { titleText [localize "STR_MISC_SirensOFF","PLAIN"]; _veh setVariable ["siren",false,true]; } else { titleText [localize "STR_MISC_SirensON","PLAIN"]; _veh setVariable ["siren",true,true]; if (playerSide in [west, civilian]) then { [_veh] remoteExec ["life_fnc_copSiren",RCLIENT]; } else { [_veh] remoteExec ["life_fnc_medicSiren",RCLIENT]; }; }; };
Nochmal zu deinem Sound-Problem:Ich habe mal eben was geschrieben, was automatisch die Distanz und den Pitch aus der Konfig lädt, insofern du die Parameter mit dem Funktionsaufruf nicht überschreibst.
Sollte an sich funktionieren, falls doch nicht, dann kannst du ja nochmal was schreiben.
Durch diese Anpassung kannst du den bestehenden Code beibehalten und einfach die Konfig abändern.Code
Alles anzeigen/* File: fn_say3D.sqf Author: Basti0208 */ // Eigentliche Parameter in Variablen speichern params [ ["_object", objNull, [objNull]], ["_sound", "", [""]], ["_distance", -1, [0]], ["_pitch", -1, [0]] ]; if (isNull _object || {_sound isEqualTo ""}) exitWith {}; // Config-Einträge in Variablen speichern getArray(missionConfigFile >> "CfgSounds" >> _sound >> "sound") params [ "", "", ["_configPitch", 1, [0]], ["_configDistance", 100, [0]] ]; if (_distance isEqualTo -1) then { _distance = _configDistance; }; if (_pitch isEqualTo -1) then { _pitch = _configPitch; }; _object say3D [_sound, _distance, _pitch];
Also ich hab das so in die fn_KeyHandler.sqf eingetragen und ich sitzte nich mal im auto und kann die sirene vom medic anschalten, und in die 2 fn_sirenLights.sqf oder fn_copSiren.sqf sind keine Abfragen zur Spielerseite. ich habe den code von Basti0208 benutzt.
Code
Alles anzeigen//L Key? case 38: { //If cop run checks for turning lights on. if (_shift && playerSide in [west,independent,civilian]) then { if (!(isNull objectParent player) && (typeOf vehicle player) 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 {vehicle player getVariable "lights"}) then { if (playerSide isEqualTo west) then { [vehicle player] call life_fnc_sirenLights; } else { [vehicle player] call life_fnc_medicSirenLights; }; _handled = true; }; }; }; if (!_alt && !_ctrlKey) then { [] call life_fnc_radar; }; }; //Y Player Menu case 21: { if (!_alt && !_ctrlKey && !dialog && !(player getVariable ["restrained",false]) && {!life_action_inUse}) then { [] call life_fnc_p_openMenu; }; }; //F Key case 33: { if (playerSide in [west,independent,civilian] && {vehicle player != player} && {!life_siren_active} && {((driver vehicle player) == player)}) then { [] spawn { life_siren_active = true; sleep 4.7; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "siren"}) then {_veh setVariable ["siren",false,true];}; if ((_veh getVariable "siren")) then { titleText [localize "STR_MISC_SirensOFF","PLAIN"]; _veh setVariable ["siren",false,true]; } else { titleText [localize "STR_MISC_SirensON","PLAIN"]; _veh setVariable ["siren",true,true]; if (playerSide isEqualTo west) then { [_veh] remoteExec ["life_fnc_copSiren",RCLIENT]; } else { [_veh] remoteExec ["life_fnc_medicSiren",RCLIENT]; }; }; }; };
denn hab ich das mal so eingetragen und und ich sitzte im cop auto mit medic sirene an und kann nicht das blaulicht einschalten, irgendwas mach ich verkehrt.
-
Wenn in deiner life_fnc_say3D die Parameter definiert sind, dann kannst du das fast so machen, ja.
Schau dir aber nochmal den Aufruf genau an:
[_shop,["robberyalarm",200,1] remoteExec ["life_fnc_say3D",0];
(Die blaue Klammer muss weg, wollte es nur versuchen, zu visualisieren ^^)Du siehst, dass die erste Klammer mit einem richtigen Syntax-Highlight eine andere Farbe hat.
Danke dir werde es gleich mal so machen, weißt du wie ich es hin bekomme das alle fraktionen das blaulicht und die sirene an machen können?
hast du einen empfehlung wie weit man so einen alarm hören kann tanke / auto knacken
-
Problem Nr.1
Also ich habe das einmal bei Auto aufbrechen versucht aber der Cop hört nix, auch nicht mal wenn er direkt davor steht
Code_curTarget say3D ["CarAlarm",100,1]; //Class name specified in description.ext, max distance & pitch
Und denn nochmal bei der Tanke der Cop hat wieder nix gehört nicht mal wo er direkt davor stand
Code_shop say3D ["robberyalarm",100,1]; //Claas name specified in description.ext, max distance & pitch
Hier nochmal die description.
Code
Alles anzeigenclass CfgSounds { sounds[] = {}; class sirenLong { name = "sirenLong"; sound[] = {"\sounds\sirenLong.ogg", 10.0, 1}; titles[] = {}; }; class medicSiren { name = "medicSiren"; sound[] = {"\sounds\medicSiren.ogg", 10.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 CarAlarm { name = "CarAlarm"; sound[] = {"\sounds\caralarm.ogg", 5.0, 1}; titles[] = {}; }; class empwarn { name = "empwarn"; sound[] = {"\sounds\empwarn.ogg", 5.0, 1}; titles[] = {}; }; class empacsound { name = "empacsound"; sound[] = {"sounds\empac.ogg", 5.0, 1}; titles[] = {}; }; class robberyalarm { name = "robberyalarm"; sound[] = {"\sounds\robberyalarm.ogg", 5.0, 1}; titles[] = {}; }; };
Problem Nr.2 ist das das der Civ keine Sirene und kein Blaulicht anmachen kann.
Hier nochmal die fn_keyHandler.sqf
Code
Alles anzeigen//L Key? case 38: { //If cop run checks for turning lights on. if (!(isNull objectParent player) && (typeOf vehicle player) 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 {vehicle player getVariable "lights"}) then { if (playerSide isEqualTo west) then { [vehicle player] call life_fnc_sirenLights; } else { [vehicle player] call life_fnc_medicSirenLights; }; _handled = true; }; }; if (!_alt && !_ctrlKey) then { [] call life_fnc_radar; }; }; //Y Player Menu case 21: { if (!_alt && !_ctrlKey && !dialog && !(player getVariable ["restrained",false]) && {!life_action_inUse}) then { [] call life_fnc_p_openMenu; }; }; //F Key case 33: { [] spawn { life_siren_active = true; sleep 4.7; life_siren_active = false; }; _veh = vehicle player; if (isNil {_veh getVariable "siren"}) then {_veh setVariable ["siren",false,true];}; if ((_veh getVariable "siren")) then { titleText [localize "STR_MISC_SirensOFF","PLAIN"]; _veh setVariable ["siren",false,true]; } else { titleText [localize "STR_MISC_SirensON","PLAIN"]; _veh setVariable ["siren",true,true]; if (playerSide isEqualTo west) then { [_veh] remoteExec ["life_fnc_copSiren",RCLIENT]; } else { [_veh] remoteExec ["life_fnc_medicSiren",RCLIENT]; }; }; };
-
Nein, die Distanz wie weit man einen Sound hört machst du immer über Say3d.
Schau dir dazu einfach an, wie das bei den Sirenen gehandhabt wurde.
Okay also muss ich hier zum beispiel von Alt auf Neu machen?
Code[_shop,"robberyalarm"] remoteExec ["life_fnc_say3D",0]; // Alt [_shop,["robberyalarm",200,1] remoteExec ["life_fnc_say3D",0]; // Neu [_curTarget,"CarAlarm"] remoteExec ["life_fnc_say3D",RANY]; // Alt [_curTarget,["CarAlarm",100,1] remoteExec ["life_fnc_say3D",RANY]; // Neu
Und denn hab ich noch eine Frage was muss ich einstellen damit alle Fraktionen das Blaulicht und die Sirene anmachen können?
-
Aber zum beispiel, claas robberyalarm das ändere ich in der description?
-
Hallo erstmal, ja ich weiß es gibt schon zich Beiträge was das Sound Problem betrifft aber die ich gefunden haben waren dicht.
Ich stehe 100m vor einen Polizei hunter mit sirene an, ich höre nix bei 99meter ganz ganz leise höre ich erst was. sirenLong ist die Polizei sirene, ihr seht ja ich habe 500 meter eingestellt.
Was muss ich tun?
Code
Alles anzeigenclass CfgSounds { sounds[] = {}; class sirenLong { name = "sirenLong"; sound[] = {"\sounds\sirenLong.ogg", 10.0, 1, 500}; titles[] = {}; }; class medicSiren { name = "medicSiren"; sound[] = {"\sounds\medicSiren.ogg", 10.0, 1, 500}; 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 CarAlarm { name = "CarAlarm"; sound[] = {"\sounds\caralarm.ogg", 5.0, 1, 100}; titles[] = {}; }; class empwarn { name = "empwarn"; sound[] = {"\sounds\empwarn.ogg", 5.0, 1}; titles[] = {}; }; class empacsound { name = "empacsound"; sound[] = {"sounds\empac.ogg", 5.0, 1}; titles[] = {}; }; class robberyalarm { name = "robberyalarm"; sound[] = {"\sounds\robberyalarm.ogg", 5.0, 1, 200}; titles[] = {}; }; };
Hier nochmal ein Bild
-
Tutorial: EMP Script mit dem Heli Autos stoppen (Cops)
Version: Altis Life 4.4 / 5.0
Schiwerigkeitsgrad: Leicht
Funktionen:
Mit dem EMP Script kann man mit Helikoptern Fahrzeuge stoppen, der Motor wird beim auslösen des EMP zerstört. Aufrufen tut ihr das Menü mit der Taste K siehe Schritt: 6
Ich weise daraufhin das: FUNKTIONIERT SO WIE ES HIER STEHT NUR MIT DEM HUMMINGBIRD, versucht also nicht das Menü mit dem Ghosthawk auf zu rufen sofern ihr das nicht geändert habt.
Rechtliche Hinweise (Copyright):
Dieses Script stammt aus dem nitrado.net Forum und wurde dort von soulsafer veröffentlicht. Alle Rechte liegen bei ihm, ich übersetze das Tutorial lediglich.Zum ursprünglichen Tutorial: ^Klick Mich^
Hinweis:
In diesem Tutorial verändert ihr Dateien in eurer Mission, macht bitte vor Beginn diese Tutorials ein gesamtes Backup davon.
Ich Avirex bin nicht für kaputt gegangene Daten oder sonstige Verluste verantwortlich.
Nun wünsche ich Viel Erfolg beim durchführen des Tutorials
Anleitung:
Schritt 1:
In derdescription.ext in der class CfgSounds { folgendes einfügen:
C: description.ext
Alles anzeigenclass empwarn { name = "empwarn"; sound[] = {"\sounds\empwarn.ogg", 1.0, 1}; titles[] = {}; }; class empacsound { name = "empacsound"; sound[] = {"sounds\empac.ogg", 1.0, 1}; titles[] = {}; };
Schritt 2:
In der configuration.sqf folgendes einfügen in Backend Variables
Schritt 3:
In der Functions.hpp unter class Vehicle { eine neue class erstellen:
C: Functions.hpp
Alles anzeigenclass Special { file = "core\special"; class openEmpMenu {}; class isEmpOperator {}; class scanVehicles {}; class warnVehicle {}; class empVehicle {}; class vehicleWarned {}; class vehicleEmpd {}; };
Schritt 4:
In die MasterHandler.hpp das hinzufügen:
Schritt 5:
In der CfgRemoteExec.hpp folgende Einträge einfügen unter /* Client only functions */:
Schritt 6:
Füge in derfn_keyHandler.sqf folgenden Eintrag hinzu.
C: fn_keyHandler.sqf//EMP Konsole - K case 37: { if (!_shift && !_alt && !_ctrlKey && (playerSide == west) && (vehicle player != player && (typeOf vehicle player) in ["B_Heli_Light_01_F"])) then { [] call life_fnc_openEmpMenu; [_this] call life_fnc_isEmpOperator; }; };
Schritt 7:
Nun downloade dir die Datei > Script.rar < und schiebe den enthaltenen Ordner special in das Verzeichnis: Altis_Life.Altis\core
Öffne den dialog Ordner in der heruntergeladenen Script.rar Datei und schiebe die enthaltene emp_menu.hppin deinen dialog Ordner von deinem Server.
Öffne den sounds Ordner in der heruntergeladenen Script.rar Datei und schiebe die enthaltenen Sounds (empac.ogg,empwarn.ogg) in deinen sounds Ordner von deinem Server.
gLÜCKWUNSCH. Du hast das "EMP Script mit dem Heli Autos stoppen (Cops)" Script vOLLSTÄNDIG installiert.
Solltet ihr Wünsche oder Verbesserungsvorschläge haben, dann postet sie hier herein.Ich wünsche euch nun Viel Spaß mit dem Script. Über eine kleine Rückmeldung was ihr davon haltet würde ich mich sehr freuen
Hallo was muss ich ändern damit ich eine längere EMP warn sound file einfügen kann? die sound file geht 16sekunden weil nur die sound file ersetzen geht nich da sich das denn überschneidet. Ich schicke mal die File mit rein , ich spreche da halt das wenn die net landen ich sie vom himmel hole, aber das passt ja nicht wenn ich ein auto warnen tute
-
Ja du hast recht....
Bin schon länger nicht mehr in SQF unterwegs...
Aber gut dann können wir hier zu machen.
Jap kann zu.
-
C
Alles anzeigen/* Author: ? edited by Joe Barbaro Description: Tankstellenraub Script */ #include "..\..\script_macros.hpp" /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ private _shop = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; //The object that has the action attached to it is _this. ,0, is the index of object, ObjNull is the default should there be nothing in the parameter or it's broken private _robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; //Can you guess? Alright, it's the player, or the "caller". The object is 0, the person activating the object is 1 private _action = [_this,2] call BIS_fnc_param;//Action name private _kassa = 10000 + round(random 10000); //The amount the shop has to rob, you could make this a parameter of the call (community.bistudio.com/wiki/addAction). Give it a try and post below private _cops = (west countSide playableUnits); /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ if(side _robber != civilian) exitWith { hintSilent "Ich melde dich lieber deinem Vorgesetzten" }; if(_robber distance _shop > 5) exitWith { hintSilent "Was willst du denn den aus nem Kilometer bedrohen?" }; if (vehicle player != _robber) exitWith { hintSilent "Was solln das werden Drive-by?" }; if !(alive _robber) exitWith {}; if (currentWeapon _robber == "") exitWith { hintSilent "Was willst du pisser von mir hau ab!" }; if (_kassa == 0) exitWith {hintSilent "Kein Geld keine Beute!"}; if(_cops < 1) exitWith {hintSilent "Ohne Polizei macht so ein Überfall doch gar keinen Spaß :D";}; /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ _rip = true; _shop removeAction _action; [_shop,"AmovPercMstpSsurWnonDnon",true] remoteExecCall ["life_fnc_animSync",RCLIENT]; _chance = random(100); if(_chance >= 1) then {[1,format["ALARM! - Tankstelle: %1 wird ausgeraubt!", _shop]] remoteExec ["life_fnc_broadcast",west]; }; /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ disableSerialization; 250 cutRsc ["life_progress","PLAIN"]; _ui = uiNameSpace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%1)...","%"]; _progress progressSetPosition 0.01; _cP = 0.01; if(_rip) then { while{true} do { uiSleep 0.85; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%2)...",round(_cP * 100),"%"]; _Pos = position player; // by ehno: get player pos { _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map "TankeMarker" setMarkerColor "ColorRed"; "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!"; "TankeMarker" setMarkerType "mil_warning"; } forEach playableUnits; if(_cP >= 1) exitWith {}; if(_robber distance _shop > 5) exitWith { }; if!(alive _robber) exitWith {}; /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ }; if(_robber getVariable "restrained") exitWith {_rip = false; hint "Tja festgenomen scheiße gelaufen..."; 250 cutText ["","PLAIN"];}; //Player got arrested, or restrained by another player! if(life_istazed) exitWith {_rip = false; hint "Du wurdest getazert RIP!"; 250 cutText ["","PLAIN"];}; //Player was tazed if!(alive _robber) exitWith {_rip = false; 250 cutText ["","PLAIN"];}; if(_robber distance _shop > 5) exitWith { deleteMarker "TankeMarker"; [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT]; hintSilent "Du hast den Kassierer nicht im Auge gehabt"; 250 cutText ["","PLAIN"]; _rip = false; }; 250 cutText ["","PLAIN"]; titleText[format["Du hast %1$, geklaut! Hau ab bevor die Cops kommen!",[_kassa] call life_fnc_numberText],"PLAIN"]; [_shop,"robberyalarm"] remoteExec ["life_fnc_say3D",0]; deleteMarker "TankeMarker"; // by ehno delete maker life_cash = life_cash + _kassa; _rip = false; life_use_atm = false; uiSleep (30 + random(180)); life_use_atm = true; if!(alive _robber) exitWith {}; [getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2]; }; uiSleep 300; _action = _shop addAction["Tankstelle ausrauben",life_fnc_robShops]; [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
Ich danke euch, es funkt jetzt alles.
Ich wünsche euch denn noch einen schönen Abend.
-
C
Alles anzeigen/* Author: ? edited by Joe Barbaro Description: Tankstellenraub Script */ #include "..\..\script_macros.hpp" /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ private _shop = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; //The object that has the action attached to it is _this. ,0, is the index of object, ObjNull is the default should there be nothing in the parameter or it's broken private _robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; //Can you guess? Alright, it's the player, or the "caller". The object is 0, the person activating the object is 1 private _action = [_this,2] call BIS_fnc_param;//Action name private _kassa = 10000 + round(random 10000); //The amount the shop has to rob, you could make this a parameter of the call (community.bistudio.com/wiki/addAction). Give it a try and post below /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ if(side _robber != civilian) exitWith { hintSilent "Ich melde dich lieber deinem Vorgesetzten" }; if(_robber distance _shop > 5) exitWith { hintSilent "Was willst du denn den aus nem Kilometer bedrohen?" }; if (vehicle player != _robber) exitWith { hintSilent "Was solln das werden Drive-by?" }; if !(alive _robber) exitWith {}; if (currentWeapon _robber == "") exitWith { hintSilent "Was willst du pisser von mir hau ab!" }; if (_kassa == 0) exitWith {hintSilent "Kein Geld keine Beute!"}; /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ _rip = true; _shop removeAction _action; if(_cops < 1) exitWith {hintSilent "Ohne Polizei macht so ein Überfall doch gar keinen Spaß :D";}; [_shop,"AmovPercMstpSsurWnonDnon",true] remoteExecCall ["life_fnc_animSync",RCLIENT]; _chance = random(100); _cops = (west countSide playableUnits); if(_chance >= 1) then {[1,format["ALARM! - Tankstelle: %1 wird ausgeraubt!", _shop]] remoteExec ["life_fnc_broadcast",west]; }; /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ disableSerialization; 250 cutRsc ["life_progress","PLAIN"]; _ui = uiNameSpace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%1)...","%"]; _progress progressSetPosition 0.01; _cP = 0.01; if(_rip) then { while{true} do { uiSleep 0.85; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%2)...",round(_cP * 100),"%"]; _Pos = position player; // by ehno: get player pos { _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map "TankeMarker" setMarkerColor "ColorRed"; "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!"; "TankeMarker" setMarkerType "mil_warning"; } forEach playableUnits; if(_cP >= 1) exitWith {}; if(_robber distance _shop > 5) exitWith { }; if!(alive _robber) exitWith {}; /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ }; if(_robber getVariable "restrained") exitWith {_rip = false; hint "Tja festgenomen scheiße gelaufen..."; 250 cutText ["","PLAIN"];}; //Player got arrested, or restrained by another player! if(life_istazed) exitWith {_rip = false; hint "Du wurdest getazert RIP!"; 250 cutText ["","PLAIN"];}; //Player was tazed if!(alive _robber) exitWith {_rip = false; 250 cutText ["","PLAIN"];}; if(_robber distance _shop > 5) exitWith { deleteMarker "TankeMarker"; [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT]; hintSilent "Du hast den Kassierer nicht im Auge gehabt"; 250 cutText ["","PLAIN"]; _rip = false; }; 250 cutText ["","PLAIN"]; titleText[format["Du hast %1$, geklaut! Hau ab bevor die Cops kommen!",[_kassa] call life_fnc_numberText],"PLAIN"]; [_shop,"robberyalarm"] remoteExec ["life_fnc_say3D",0]; deleteMarker "TankeMarker"; // by ehno delete maker life_cash = life_cash + _kassa; _rip = false; life_use_atm = false; uiSleep (30 + random(180)); life_use_atm = true; if!(alive _robber) exitWith {}; [getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2]; }; uiSleep 300; _action = _shop addAction["Tankstelle ausrauben",life_fnc_robShops]; [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
Meinst du so?
Code_rip = true; _shop removeAction _action; _cops = (west countSide playableUnits); if(_cops < 1) exitWith {hintSilent "Ohne Polizei macht so ein Überfall doch gar keinen Spaß :D";}; [_shop,"AmovPercMstpSsurWnonDnon",true] remoteExecCall ["life_fnc_animSync",RCLIENT]; _chance = random(100); if(_chance >= 1) then {[1,format["ALARM! - Tankstelle: %1 wird ausgeraubt!", _shop]] remoteExec ["life_fnc_broadcast",west]; };
-
Jap jetzt hab ich es so, aber ich danke euch für die Hilfe
Code{ _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map "TankeMarker" setMarkerColor "ColorRed"; "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!"; "TankeMarker" setMarkerType "mil_warning"; } forEach playableUnits;
Weißt du wie ich es machen muss damit der Typ nicht die hände hoch nimmt wenn nicht soviele Polizisten da sind?
-
wieso den überhaupt foreach für eine Tanke die Ausgeraubt wird
Da blick ich irgendwie nicht durch.
Ich habe es so gemacht es funktioniert
Code_CreatMarkerName = "TankRob"; _Pos = position player; // by ehno: get player pos _marker = createMarker [_CreatMarkerName, _Pos]; //by ehno: Place a Maker on the map _CreatMarkerName setMarkerColor _MarkerColor; _CreatMarkerName setMarkerText _MarkerText; _CreatMarkerName setMarkerType _MarkerType;
Oder sehe ich hier was flasch.
Ja das lag am createMarkerlocal hab das local weg gemacht und jetzt geht es.
-
Habs hin bekommen
Code{ _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map "TankeMarker" setMarkerColor "ColorRed"; "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!"; "TankeMarker" setMarkerType "mil_warning"; } forEach playableUnits;
Aber jetzt hab ich noch eine Letzte Frage und zwar nimmt der Tankwärter tank wärter die Hände hoch ob wohl nicht genügend cobs da sind, wie ändere ich das?
-
Code
{ _marker = createMarkerlocal ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map "TankeMarker" setMarkerColorlocal "ColorRed"; "TankeMarker" setMarkerTextlocal "!LAUFENDER ÜBERFALL!"; "TankeMarker" setMarkerTypelocal "mil_warning"; } forEach playableUnits;
Ich ahne nix gutes die Klammern hätten da sein sollen, okay ich mach sie wieder hin xD
Ich dulli, ich habe doch die Klammern garnicht hin gemacht.
Ich werde es ja sehn was passiert xD
Also ich Als Ziv sehe den Marker aber der Polizist nicht
-
-
Also um auf die Ursprungsfrage zurückzukommen:
Du musst natürlich den Namen der Funktion in der AddAction anpassen
Wenn du den Marker nur für Cops sichtbar machen möchtest musst du CreateMarkerLocal anwenden.
Und danach deleteMarker wie es im Script stehet.
Mit freundlichen Grüßen
Joe Barbaro
Also was den marker betrifft, hab nur ich als Ziv den gesehn der Cop hat den marker nicht gesehn, Es sollen alle den sehn, ja ich hab den Fehler gefunden warum ich nicht nochmal Überfallen konnte, hab jetzt meine Life Funktion genommen die auch in der Mission.sqm steht
-
Eine frage hab ich noch wie bekomme ich das hin, das wenn die Tanke überfallen wird das die Cops auf der Karte den marker sehn? Muss ich da überall nur das Local wegmachen?
Code{ _marker = createMarkerlocal ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map "TankeMarker" setMarkerColorlocal "ColorRed"; "TankeMarker" setMarkerTextloacal "!LAUFENDER ÜBERFALL!"; "TankeMarker" setMarkerTypeloacal "mil_warning"; } forEach [playerside isEqualTo west];
Wäre das so richtig?