Kommt bestimmt drauf an, welche Fahrzeuge und wie viele du haben möchtest.
Beiträge von SilentF0x
-
-
Habe ich mich bereits auch gefragt. Ich denke diese gibt es nur bei Anfrage und Bezahlung.
Ich kann dir auch gerne einen Link schicken mit anderen Fahrzeugen. Gerade weiß ich nur nicht, ob ich einen externen Link schicken darf (armaholic).
-
-
fn_initCop
Ganz unten am besten.
-
ich kann kein z und so mehr drücken
Da
Spoiler anzeigen
#include "..\..\script_macros.hpp"
/*
* File: fn_keyHandler.sqf
* Author: Bryan "Tonic" Boardwine
*
* Description:
* Main key handler for event 'keyDown'.
*/
private ["_handled","_shift","_alt","_code","_ctrl","_alt","_ctrlKey","_veh","_locked","_interactionKey","_mapKey","_interruptionKeys"];
_ctrl = _this select 0;
_code = _this select 1;
_shift = _this select 2;
_ctrlKey = _this select 3;
_alt = _this select 4;
_speed = speed cursorObject;
_handled = false;_interactionKey = if (count (actionKeys "User10") isEqualTo 0) then {219} else {(actionKeys "User10") select 0};
_mapKey = (actionKeys "ShowMap" select 0);
//hint str _code;
_interruptionKeys = [17,30,31,32]; //A,S,W,D//Vault handling...
if ((_code in (actionKeys "GetOver")_code in (actionKeys "salute")
_code in (actionKeys "SitDown")
_code in (actionKeys "Throw")
_code in (actionKeys "GetIn")
_code in (actionKeys "GetOut")
_code in (actionKeys "Fire")
_code in (actionKeys "ReloadMagazine")
_code in [16,18]) && ((player getVariable ["restrained",false])
(player getVariable ["playerSurrender",false])
life_isknocked
life_istazed)) exitWith {
true;
};if (life_action_inUse) exitWith {
if (!life_interrupted && _code in _interruptionKeys) then {life_interrupted = true;};
_handled;
};//Hotfix for Interaction key not being able to be bound on some operation systems.
if (!(count (actionKeys "User10") isEqualTo 0) && {(inputAction "User10" > 0)}) exitWith {
//Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)
if (!life_action_inUse) then {
[] spawn {
private "_handle";
_handle = [] spawn life_fnc_actionKeyHandler;
waitUntil {scriptDone _handle};
life_action_inUse = false;
};
};
true;
};if (life_container_active) then {
switch (_code) do {
//space key
case 57: {
[] spawn life_fnc_placestorage;
};
};
true;
};//Space key for Jumping
case 57: {
if (!_shift && life_barrier_active) then {
0 spawn life_fnc_placeablesPlaceComplete;
};
if (isNil "jumpActionTime") then {jumpActionTime = 0;};
if (_shift && {!(animationState player isEqualTo "AovrPercMrunSrasWrflDf")} && {isTouchingGround player} && {stance player isEqualTo "STAND"} && {speed player > 2} && {!life_is_arrested} && {((velocity player) select 2) < 2.5} && {time - jumpActionTime > 1.5}) then {
if (life_barrier_active) then { [true] call life_fnc_placeableCancel; };
jumpActionTime = time; //Update the time.
[player] remoteExec ["life_fnc_jumpFnc",RANY]; //Global execution
_handled = true;
};
};//Ö-Key
case 39: {
if ((isNull(findDisplay 20000)) && (playerSide in ([west,independent]))) then {
0 spawn life_fnc_placeablesMenu;
_handled = true;
};
_handled = true;
};//ENTF-Key
case 211: {
if ((playerSide in [west,independent]) && ((typeOf cursorTarget) in life_definePlaceables)) then {
deleteVehicle cursorTarget;
hintSilent "Die Absperrung wurde entfernt";
};
};//Surrender (Shift + B)
case 48: {
if (_shift) then {
if (player getVariable ["playerSurrender",false]) then {
player setVariable ["playerSurrender",false,true];
} else {
[] spawn life_fnc_surrender;
};
_handled = true;
};
};//Map Key
case _mapKey: {
switch (playerSide) do {
case west: {if (!visibleMap) then {[] spawn life_fnc_copMarkers;}};
case independent: {if (!visibleMap) then {[] spawn life_fnc_medicMarkers;}};
case civilian: {if (!visibleMap) then {[] spawn life_fnc_civMarkers;}};
};
};//Holster / recall weapon. (Shift + H)
case 35: {
if (_shift && !_ctrlKey && !(currentWeapon player isEqualTo "")) then {
life_curWep_h = currentWeapon player;
player action ["SwitchWeapon", player, player, 100];
player switchCamera cameraView;
};if (!_shift && _ctrlKey && !isNil "life_curWep_h" && {!(life_curWep_h isEqualTo "")}) then {
if (life_curWep_h in [primaryWeapon player,secondaryWeapon player,handgunWeapon player]) then {
player selectWeapon life_curWep_h;
};
};
};//Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)
case _interactionKey: {
if (!life_action_inUse) then {
[] spawn {
private "_handle";
_handle = [] spawn life_fnc_actionKeyHandler;
waitUntil {scriptDone _handle};
life_action_inUse = false;
};
};
};//Restraining (Shift + R)
case 19: {
if (_shift) then {_handled = true;};
if (_shift && playerSide isEqualTo west && {!isNull cursorObject} && {cursorObject isKindOf "Man"} && {(isPlayer cursorObject)} && {(side cursorObject in [civilian,independent])} && {alive cursorObject} && {cursorObject distance player < 3.5} && {!(cursorObject getVariable "Escorting")} && {!(cursorObject getVariable "restrained")} && {speed cursorObject < 1}) then {
[] call life_fnc_restrainAction;
};
};//Knock out, this is experimental and yeah... (Shift + G)
case 34: {
if (_shift) then {_handled = true;};
if (_shift && playerSide isEqualTo civilian && !isNull cursorObject && cursorObject isKindOf "Man" && isPlayer cursorObject && alive cursorObject && cursorObject distance player < 4 && speed cursorObject < 1) then {
if ((animationState cursorObject) != "Incapacitated" && (currentWeapon player == primaryWeapon playercurrentWeapon player == handgunWeapon player) && currentWeapon player != "" && !life_knockout && !(player getVariable ["restrained",false]) && !life_istazed && !life_isknocked) then {
[cursorObject] spawn life_fnc_knockoutAction;
};
};
};//T Key (Trunk)
case 20: {
if (!_alt && !_ctrlKey && !dialog && {!life_action_inUse}) then {
if (vehicle player != player && alive vehicle player) then {
if ((vehicle player) in life_vehicles) then {
[vehicle player] spawn life_fnc_openInventory;
};
} else {
private "_list";
_list = ((ASLtoATL (getPosASL player)) nearEntities [["Box_IND_Grenades_F","B_supplyCrate_F"], 2.5]) select 0;
if (!(isNil "_list")) then {
_house = nearestObject [(ASLtoATL (getPosASL _list)), "House"];
if (_house getVariable ["locked", false]) then {
hint localize "STR_House_ContainerDeny";
} else {
[_list] spawn life_fnc_openInventory;
};
} else {
_list = ["landVehicle","Air","Ship"];
if (KINDOF_ARRAY(cursorObject,_list) && {player distance cursorObject < 7} && {isNull objectParent player} && {alive cursorObject} && {!life_action_inUse}) then {
if (cursorObject in life_vehicles{locked cursorObject isEqualTo 0}) then {
[cursorObject] spawn life_fnc_openInventory;
};
};
};
};
};
};//L Key?
case 38: {
//If cop run checks for turning lights on.
if (_shift && playerSide in [west,independent]) then {
if (vehicle player != 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] && {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];
};
};
};
};//O Key
case 24: {
if (_shift) then {
if (soundVolume != 1) then {
1 fadeSound 1;
systemChat localize "STR_MISC_soundnormal";
} else {
1 fadeSound 0.1;
systemChat localize "STR_MISC_soundfade";
};
};
};//U Key
case 22: {
if (!_alt && !_ctrlKey) then {
if (isNull objectParent player) then {
_veh = cursorObject;
} else {
_veh = vehicle player;
};if (_veh isKindOf "House_F" && {playerSide isEqualTo civilian}) then {
if (_veh in life_vehicles && {player distance _veh < 20}) then {
_door = [_veh] call life_fnc_nearestDoor;
if (_door isEqualTo 0) exitWith {hint localize "STR_House_Door_NotNear"};
_locked = _veh getVariable [format ["bis_disabled_Door_%1",_door],0];if (_locked isEqualTo 0) then {
_veh setVariable [format ["bis_disabled_Door_%1",_door],1,true];
_veh animate [format ["door_%1_rot",_door],0];
systemChat localize "STR_House_Door_Lock";
} else {
_veh setVariable [format ["bis_disabled_Door_%1",_door],0,true];
_veh animate [format ["door_%1_rot",_door],1];
systemChat localize "STR_House_Door_Unlock";
};
};
} else {
_locked = locked _veh;
if (_veh in life_vehicles && {player distance _veh < 20}) then {
if (_locked isEqualTo 2) then {
if (local _veh) then {
_veh lock 0;// BI
_veh animateDoor ["door_back_R",1];
_veh animateDoor ["door_back_L",1];
_veh animateDoor ['door_R',1];
_veh animateDoor ['door_L',1];
_veh animateDoor ['Door_L_source',1];
_veh animateDoor ['Door_rear',1];
_veh animateDoor ['Door_rear_source',1];
_veh animateDoor ['Door_1_source',1];
_veh animateDoor ['Door_2_source',1];
_veh animateDoor ['Door_3_source',1];
_veh animateDoor ['Door_LM',1];
_veh animateDoor ['Door_RM',1];
_veh animateDoor ['Door_LF',1];
_veh animateDoor ['Door_RF',1];
_veh animateDoor ['Door_LB',1];
_veh animateDoor ['Door_RB',1];
_veh animateDoor ['DoorL_Front_Open',1];
_veh animateDoor ['DoorR_Front_Open',1];
_veh animateDoor ['DoorL_Back_Open',1];
_veh animateDoor ['DoorR_Back_Open ',1];
} else {
[_veh,0] remoteExecCall ["life_fnc_lockVehicle",_veh];_veh animateDoor ["door_back_R",1];
_veh animateDoor ["door_back_L",1];
_veh animateDoor ['door_R',1];
_veh animateDoor ['door_L',1];
_veh animateDoor ['Door_L_source',1];
_veh animateDoor ['Door_rear',1];
_veh animateDoor ['Door_rear_source',1];
_veh animateDoor ['Door_1_source',1];
_veh animateDoor ['Door_2_source',1];
_veh animateDoor ['Door_3_source',1];
_veh animateDoor ['Door_LM',1];
_veh animateDoor ['Door_RM',1];
_veh animateDoor ['Door_LF',1];
_veh animateDoor ['Door_RF',1];
_veh animateDoor ['Door_LB',1];
_veh animateDoor ['Door_RB',1];
_veh animateDoor ['DoorL_Front_Open',1];
_veh animateDoor ['DoorR_Front_Open',1];
_veh animateDoor ['DoorL_Back_Open',1];
_veh animateDoor ['DoorR_Back_Open ',1];
};
systemChat localize "STR_MISC_VehUnlock";
[_veh,"unlockCarSound"] remoteExec ["life_fnc_say3D",RANY];
} else {
if (local _veh) then {
_veh lock 2;_veh animateDoor ["door_back_R",0];
_veh animateDoor ["door_back_L",0];
_veh animateDoor ['door_R',0];
_veh animateDoor ['door_L',0];
_veh animateDoor ['Door_L_source',0];
_veh animateDoor ['Door_rear',0];
_veh animateDoor ['Door_rear_source',0];
_veh animateDoor ['Door_1_source',0];
_veh animateDoor ['Door_2_source',0];
_veh animateDoor ['Door_3_source',0];
_veh animateDoor ['Door_LM',0];
_veh animateDoor ['Door_RM',0];
_veh animateDoor ['Door_LF',0];
_veh animateDoor ['Door_RF',0];
_veh animateDoor ['Door_LB',0];
_veh animateDoor ['Door_RB',0];
_veh animateDoor ['DoorL_Front_Open',0];
_veh animateDoor ['DoorR_Front_Open',0];
_veh animateDoor ['DoorL_Back_Open',0];
_veh animateDoor ['DoorR_Back_Open ',0];
} else {
[_veh,2] remoteExecCall ["life_fnc_lockVehicle",_veh];_veh animateDoor ["door_back_R",0];
_veh animateDoor ["door_back_L",0];
_veh animateDoor ['door_R',0];
_veh animateDoor ['door_L',0];
_veh animateDoor ['Door_L_source',0];
_veh animateDoor ['Door_rear',0];
_veh animateDoor ['Door_rear_source',0];
_veh animateDoor ['Door_1_source',0];
_veh animateDoor ['Door_2_source',0];
_veh animateDoor ['Door_3_source',0];
_veh animateDoor ['Door_LM',0];
_veh animateDoor ['Door_RM',0];
_veh animateDoor ['Door_LF',0];
_veh animateDoor ['Door_RF',0];
_veh animateDoor ['Door_LB',0];
_veh animateDoor ['Door_RB',0];
_veh animateDoor ['DoorL_Front_Open',0];
_veh animateDoor ['DoorR_Front_Open',0];
_veh animateDoor ['DoorL_Back_Open',0];
_veh animateDoor ['DoorR_Back_Open ',0];
};
systemChat localize "STR_MISC_VehLock";
[_veh,"lockCarSound"] remoteExec ["life_fnc_say3D",RANY];
};
};
};
};
};
};_handled;
Zwei mal die case 57: { Änder die 57 einmal und dann sollte es gehen.
-
Glaube nicht, dass das geht. Sollte von Arma sein.
Bitte berichtigen wenn ich falsch liege.
-
Schon mit einer if (playerside... versucht?
-
Habe da noch eine Frage
Wie bekomme ich es hin, das GetOutMan zu blockieren, wenn der Sicherheitsgurt noch angelegt ist?
Codeif (life_seatbelt = true;) then { GetOutMan = false; [] call life_fnc_hudUpdate; //--Enable if you are putting a hud option to display when your seatbelt is on }]; };
Habe es so. Funktioniert aber nicht.
-
Werde ich mal probieren, danke!
-
-
Hab noch eine Frage. Wie kann ich die Position der 3D Kamera ändern? Möchte diese gerne, dass die Autos auf der Spawninsel vorgezeigt werden und nicht irgendwo in der Luft.
-
ok
Dann müssen wir mal schauen ob wir das überhaupt dann machen.
Danke trotzdem.
-
Möchte das halt so machen, dass man dann mit einem Script ein Flugzeug nimmt und dann auf die Insel fliegt. Alles wird gespeichert.
-
Moin
,
ich möchte auf meinem Modded Server eine zweite Map als Auswahl haben. Kann man das irgendwie umsetzen?
Danke im Voraus!
-
Keine Ahnung. Wollte es eben einbauen und sehe sowas
-
Das war nur ein Beispiel.
Es ging für mich um {"shounka_a3_base\couleurs\noir.paa"};
-
Schau mal in der Config.cpp.
Recht weit unten stehen alle Classnames mit den Farben.
Codeclass shounka_rs6_noir : Mrshounka_rs6_base { scope = 2; crew = "C_man_1"; side = 3; faction = CIV_F; displayName = "Audi RS6 Avant Noir"; vehicleClass = "SHOUNKA_vehicule_civil"; author = "MrShounka"; hiddenSelectionsTextures[] = {"shounka_a3_base\couleurs\noir.paa"}; };
Als Beispiel. Du kannst dir jetzt die Textur aus diesem Ordner entnehmen und dann deine eigene Textur anfertigen.
-
Hab mal das coole Script eingefügt hat auch soweit funktioniert hab da nur noch paar fragen zu.
Wollte einen Sound einbinden bei der Aktivierung des Ausrauben. Hab aber das Problem das der Sound vom Player abgespielt wird und nicht von dem Tresor. Zu dem geht die Musik unendlich
was mich auch noch stört wenn man das z.b auf die Bank Ausrauben Zeit bis sie fertig ist wäre ganz cool.
Wäre ganz cool wenn ihr mich verbessern könntethab das hier an der Stelle eingefügt: [player,"Ausrauben"] remoteExecCall ["life_fnc_say3D",0];
Und das Problem das wenn die Bank ausgeraubt wird kommt keine Nachricht bei der Polizei?Code
Alles anzeigen/* Author : MrKraken edited by Brizi jaeger */ //private["_robber","_shop","_kassa","_ui","_progress","_pgText","_cP","_rip","_pos"]; _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 _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 //_kassa = 1000; //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 _action = [_this,2] call BIS_fnc_param;//Action name if(side _robber != civilian) exitWith { hintSilent "Du kannst dieses Depot nicht ausrauben!" }; if(_robber distance _shop > 15) exitWith { hintSilent "Maximal 15 Meter entfernen!" }; if !(_kassa) then { _kassa = 1000; }; if (_rip) exitWith { hintSilent "Golddepot wird schon ausgeraubt!" }; if (vehicle player != _robber) exitWith { hintSilent "Raus aus dem Fahrzeug!" }; if !(alive _robber) exitWith {}; if (currentWeapon _robber == "") exitWith { hintSilent "Ich finde Pranks immer wieder schön..." }; if (_kassa == 0) exitWith { hintSilent "Heute gibt es hier nichts!" }; _rip = true; _kassa = 200000 + round(random 100000); _shop removeAction _action; _shop switchMove "AmovPercMstpSsurWnonDnon"; _chance = random(100); if(_chance >= 1) then {[1,hint parseText format["<img size='10' color='#FFFFFF' image='textures\info.paa'/><br/><br/>" + ("Das Altis Gelddepot wird angegriffen! Verteidigen Sie es bevor die Gangster das Geld haben!")]] remoteExec ["life_fnc_broadcast",west]; }; if(_chance >= 1) then {[1,hint parseText format["<img size='10' color='#FFFFFF' image='textures\info.paa'/><br/><br/>" + ("Das Altis Gelddepot wird angegriffen! Wir bitte Sie sich in einem Umkreis von 1 Kilometer zu entfernen ansonsten muss mit beschuss gerechnet werden. Wenn Sie Verteidigen, schreiben Sie einen Notruf an die Polizei! Ihre Altis Polizei")]] remoteExec ["life_fnc_broadcast",civilian]; }; _cops = (west countSide playableUnits); if(_cops < 0) exitWith{[_vault,-1] remoteExec ["disableSerialization;",2]; hintSilent "Die Polizei hat alle einnahmen abgeholt!";}; disableSerialization; 5 cutRsc ["life_progress","PLAIN"]; _ui = uiNameSpace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format["Raub gestartet! Bewege dich maximal 15 Meter weit weg! (1%1)...","%"]; _progress progressSetPosition 0.01; _cP = 0.01; if(_rip) then { while{true} do { [player,"Ausrauben"] remoteExecCall ["life_fnc_say3D",0]; uiSleep 6; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format["Behalte eine Distanz von 15 Metern zum Tresor! (%1%2)...",round(_cP * 100),"%"]; _Pos = position player; // by ehno: get player pos _marker = createMarker ["Marker200", _Pos]; //by ehno: Place a Maker on the map "Marker200" setMarkerColor "ColorRed"; "Marker200" setMarkerText "Sperrgebiet"; "Marker200" setMarkerType "mil_warning"; // "mil_warning" "Marker200" setMarkerShape "ELLIPSE"; //create sperrgebiet by brizi "Marker200" setMarkerSize [350, 350]; //create sperrgebiet by brizi if(_cP >= 1) exitWith {}; if(_robber distance _shop > 15.5) exitWith { }; if!(alive _robber) exitWith {}; }; if!(alive _robber) exitWith { _rip = false; }; if(_robber distance _shop > 15.5) exitWith { deleteMarker "Marker200"; _shop switchMove ""; hintSilent "Du warst zu weit weg vom Depot."; 5 cutText ["","PLAIN"]; _rip = false; }; 5 cutText ["","PLAIN"]; titleText[format["Du hast $%1 gestohlen, jetzt hau ab die Polizei ist unterwegs!!",[_kassa] call life_fnc_numberText],"PLAIN"]; deleteMarker "Marker200"; // by ehno delete maker deleteMarker "Marker200"; // by brizi delete sperrgebiet life_cash = life_cash + _kassa; [getPlayerUID _robber,name _robber,"23"] remoteExecCall ["life_fnc_wantedAdd",2]; _rip = false; life_use_atm = false; uiSleep (30 + random(180)); life_use_atm = true; if!(alive _robber) exitWith {}; }; uiSleep 300; _action = _shop addAction["Ausrauben",life_fnc_robfederal]; _shop switchMove "";
Danke schon mal im vorraus
Möchte ich auch gerne wissen
So ein kleinen Bankalarm wie bei PayDay wäre nicht schlecht. -
Benutz bitte die code funktion. Kann sich ja so keinen geben.
-