Guten Morgen NG Community,
hier ein kleines Tutorial damit der SM Spaß auf eurem Server nicht zu kurz kommt ![]()
Ich habe das Tutorial aus AltisLife RPG übersetzt, d.h ich bin nicht der Autor.
Also los gehts
1. Altis Life 4.0 geht in eure Config_Master.hpp
und fügt das oben stehende ein.
danach geht ihr in eure stringtable.xml und fügt das ein
Spoiler anzeigen
<Key ID="STR_Item_GagKit">
<Original>Gag Kit</Original>
<German>Knebel Bausatz</German>
<French>Kit de baillonement</French>
</Key>
1. Altis Life 3.1.4.8 geht in eure configuration.sqf
und fügt das Obenstehende ein. (Achtet auf die Kommasetzung!)
danach geht ihr in eure fn_varhandle.sqf
und fügt das Obenstehende erste bei case 1 und das zweite bei case 2 ein.
danach geht ihr in eure fn_vartostr.sqf
und fügt das Obenstehende ein
2. Geht in eure fn_setupactions.sqf und fügt
V4.0
//GagKit Player
life_actions = [player addAction["<t color='#800000'>Ruhigstellen</t>",life_fnc_gagAction,"",0,false,false,"",'
!isNull cursorTarget && player distance cursorTarget < 3.5 && isPlayer cursorTarget && (cursorTarget getVariable["restrained",FALSE]) && !(cursorTarget GVAR["gagged",FALSE]) && life_inv_gagkit > 0']];
//Remove Gag from player.
life_actions = [player addAction["<t color='#800000'>Mundfessel entfernen</t>",life_fnc_removeGagAction,"",0,false,false,"",'
!isNull cursorTarget && player distance cursorTarget < 3.5 && isPlayer cursorTarget && (cursorTarget getVariable["restrained",FALSE]) && (cursorTarget GVAR["gagged",FALSE])']];
V3.1.4.8
//GagKit Player
life_actions = [player addAction["<t color='#800000'>Ruhigstellen</t>",life_fnc_gagAction,"",0,false,false,"",'
!isNull cursorTarget && player distance cursorTarget < 3.5 && isPlayer cursorTarget && (cursorTarget getVariable["restrained",FALSE]) && !(cursorTarget getVariable["gagged",FALSE]) && life_inv_gagkit > 0']];
//Remove Gag from player.
life_actions = [player addAction["<t color='#800000'>Mundfessel entfernen</t>",life_fnc_removeGagAction,"",0,false,false,"",'
!isNull cursorTarget && player distance cursorTarget < 3.5 && isPlayer cursorTarget && (cursorTarget getVariable["restrained",FALSE]) && (cursorTarget getVariable["gagged",FALSE])']];
Alles anzeigen
das oben stehende bei class civilianund beiclass cop ein
3. Erstellt folgende Datei namens fn_gagAction.sqf und speichert diese in dem actions Ordner
/*
File: fn_gagAction.sqf
Author: lowheartrate
Description:
Gags the target.
*/
private["_unit"];
_unit = cursorTarget;
if(isNull _unit) exitWith {}; // Not Valid
if(life_inv_gagkit < 1) exitWith {hint "Du hast keine Mundfessel"};
if((player distance _unit > 3)) exitWith {};
if((_unit getVariable "gagged")) exitWith {};
if(side _unit == west) exitWith {};
if(player == _unit) exitWith {};
if(!isPlayer _unit) exitWith {};
_unit setVariable["gagged",true,true];
//Make the unit (cursorTarget) call this script which will hint them they have been gagged, do the gagging etc.
//Player added to [] so that we can bring it over to the gagged script with _VARNAME = _this select 0;
//This will selec the player of this script which is the gagger and we can define it in the gagged script.
[[player],"life_fnc_gagged",_unit,false] spawn life_fnc_MP;
//Hint the player thats gagging the person that they have gagged the name of the unit.
hint format["Du hast %1 ruhig gestellt.", _unit getVariable["realname",_unit]];
//Remove the gagkit from the player
life_inv_gagkit = life_inv_gagkit - 1;
Alles anzeigen
4. Danach erstellt ihr diese Datei fn_gagged.sqf und speichert diese in dem actions Ordner
/*
File: fn_gagged.sqf
Author: lowheartrate
Assistance by: Panda
Description:
What happens to the player when gagged.
*/
private["_gagger"];
_gagger = param[0,ObjNull,[ObjNull]];
hint format["Du wurdest von %1 ruhig gestellt.", _gagger getVariable["realname",_gagger]];
titleText ["Da du ruhig gestellt wurdest kannst du nicht mehr sprechen!", "PLAIN"];
5 enableChannel false;
//Disable Group Chat
3 enableChannel false;
//Disable Vehicle Chat
4 enableChannel false;
//Disable Side Chat
7 enableChannel false;
waitUntil{!(player getVariable ["gagged",false]) OR !(player getVariable ["restrained",false])};
hint "Du wurdest befreit du kannst nun wieder sprechen!";
titleText ["Du wurdest berfreit!", "PLAIN"];
5 enableChannel true;
3 enableChannel true;
4 enableChannel true;
7 enableChannel true;
Alles anzeigen
5. Nun erstellt ihr folgende Dateifn_removegagaction.sqf und speichert diese in dem actions Ordner
/*
File: fn_removeGagAction.sqf
Author: lowheartrate
Assistance by: Panda
Description:
Removes the gag from the player.
*/
private["_unit"];
_unit = cursorTarget;
if(isNull _unit) exitWith {};
if(!(_unit getVariable "gagged")) exitWith {};
if(player == _unit) exitWith {};
if(!isPlayer _unit) exitWith {};
_unit setVariable["gagged",false,true];
Alles anzeigen
6. Zum Schluss schreibt ihr die Datein in die functions.h
unter class actions
So das wars schon bei Fragen einfach Fragen!