Hallo NG Community,
Lange her, als ich mein letztes Tutorial gemmacht habe.
Bei diesem Tutorial können Polizisten bei geschlossenen Türen als Fahrer oder Beifahrer einsteigen.
So können also die leute, denen das Trollen spaß macht nicht mehr Trollen
Fangen wir mal an:
1. Erstellt eine neue SQF datei namens fn_copEnter.sqf mit folgendem Inhallt, und fügt diese in euren core/cop Ordner:
Code
/*
File: fn_copEnter.sqf
Author: I dunno, I do not care!
Description:
Allows Cops to enter locked Vehicles
*/
if(playerSide != west) exitWith {};
private ["_position","_veh"];
_position = _this select 3;
switch (_position) do
{
case "driver":
{
cursorTarget lock false;
player action ["getInDriver", cursorTarget];
cursorTarget lock true;
};
case "passenger":
{
cursorTarget lock false;
player action ["getInCargo", cursorTarget];
cursorTarget lock true;
};
case "gunner":
{
cursorTarget lock false;
player action ["getIngunner", cursorTarget];
cursorTarget lock true;
};
case "exit":
{
_veh = vehicle player;
_veh lock false;
player action ["getOut", _veh];
_veh lock true;
};
};
Alles anzeigen
2. Öffnet eure functions.h und fügt folgendes unter class cop hinzu:
3. Öffnet eure core/fn_setupActions.sqf und fügt folgendes unter case west hinzu:
Code
//CopEnter - Driver Seat
life_actions = life_actions + [player addAction[localize "STR_pAct_DriverSeat",life_fnc_copEnter,"driver",200,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
//CopEnter - Passenger Seat
life_actions = life_actions + [player addAction[localize "STR_pAct_PassengerSeat",life_fnc_copEnter,"passenger",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
//CopEnter - Gunner Seat
life_actions = life_actions + [player addAction[localize "STR_pAct_GunnerSeat",life_fnc_copEnter,"gunner",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
//CopEnter - Exit
life_actions = life_actions + [player addAction[localize "STR_pAct_GoOut",life_fnc_copEnter,"exit",100,false,false,"",'(vehicle player != player) && (locked(vehicle player)==2)']];
4. Öffnet eure Stringtable.xml und fügt folgendes dazu:
Code
<Key ID="STR_pAct_DriverSeat">
<Original>Auf den Fahrersitz</Original>
</Key>
<Key ID="STR_pAct_PassengerSeat">
<Original>Auf den Passagiersitz</Original>
</Key>
<Key ID="STR_pAct_GunnerSeat">
<Original>Gunner Seat</Original>
</Key>
<Key ID="STR_pAct_GoOut">
<Original>Aus dem Fahrzeug austeigen</Original>
</Key>
Alles anzeigen
Das war es schon.
Nun können Polizisten in geschlossene Fahrzeugen ein und aussteigen.
MfG
Noldy