*** Brennerei ***Hefe + Roggen + Wasser = destilled Whiskey
Getreidemehl + Wasser = Mash (illegal)
Mash + Hefe = Moonshine (illegal)
*** Brauerei ***
Hefe + Hopfen + Wasser = gebrautes Bier
Apfel + Wasser = Apfelsaft
*** Abfüller ***
Whiskey + Glasflasche = abgefüllter Whiskey (Promillewert steigt + Effekt beim benutzen)
Moonshine + Glasflasche = abgefüllter Moonshine(illegal) (Promillewert steigt + Effekt beim benutzen)
gebrautes Bier + Glasflasche = abgefülltes Bier (Promillewert steigt + Effekt beim benutzen)
Apfelsaft + Glasflasche = abgefüllter Apfelsaft
*** Verkauf bei Händlern ***
Mr.Moonshine = abgefüllter Moonshine
Kneipe/Bar = abgefüllter Whiskey, abgefülltes Bier und abgefüllter Apfelsaft
*** Lizenzen ***
Mash-Lizenz (illegal), Moonshine-Lizenz (illegal), Whiskey-Lizenz, Brauerei-Lizenz, Abfüller-Lizenz
*** Ressourcen ***
Hefe (abbaubar), Hopfen (abbaubar), Roggen (abbaubar), Apfel (abbaubar), Wasser (kaufen), Glasflasche (kaufen), Getreidemehl (kaufen)
!!! Unbedingt Backup machen bevor Ihr anfangt !!!
*** zu bearbeitende Dateien *** - Alle Dateien befinden sich im Missionsordner
Config_Master.hpp
stringtable.xml
Function.h
core/configuration.sqf
core/config/fn_varToStr.sqf
core/config/fn_varHandle.sqf
core/actions/fn_gather.sqf
core/pmenu/fn_useItem.sqf
dialog/pInteraction.h
core/cop/fn_copInteractionMenu.sqf
core/civilian/fn_jail.sqf
core/pmenu/fn_p_openMenu.sqf
core/fn_survival.sqf
*** neue Dateien ***
core/actions/fn_dynprocess.sqf | BY OPTIX aka https://nodezone.net/www.steamcommunity.com/id/ryanthett | Quelle: http://www.altisliferpg.com/topic/9820-scr…rocess-by-ryan/
core/cop/fn_breathalyzer.sqf | Author: midgetgrimm | Quelle: Original Script auf Altisliferpg.com
core/items/fn_drinkbeer.sqf | Author: midgetgrimm
core/items/fn_drinkmoonshine.sqf | Author: midgetgrimm
core/items/fn_drinkwhiskey.sqf | Author: midgetgrimm
*** Allgemeine Infos ***
Ohne Lizenz ist kein verarbeiten möglich. Hast du das Geld Cash dabei kauft er die Lizenz beim verarbeiten automatisch.
Man kann auch die Lizenz kaufen ohne etwas zu verarbeiten.
Los geht,
öffne deine Missionsdatei im Arma 3 Editor und nehm die nachfolgenden Änderungen vor.
NPC´s erstellen im Missioneditor
Brennerei | Neue Einheit platzieren und folgendes in das Init-Feld hinzufügen
this allowDamage false; this enableSimulation false; this addAction [ ""Process Mash"", { [[[""cornmeal"",1],[""waterbottle"",1]],""license_civ_mashL"",50000,[[""mash"",1],[""AItem:>"",2]]] spawn life_fnc_dynprocess; } ]; this addAction[format[""%1 ($%2)"",localize (getText(missionConfigFile >> ""Licenses"" >> ""mashL"" >> ""displayName"")), [(getNumber(missionConfigFile >> ""Licenses"" >> ""mashL"" >> ""price""))] call life_fnc_numberText],life_fnc_buyLicense,""mashL"",0,false,false,"""",' !license_civ_mashL && playerSide == civilian '];this addAction [ ""Process Moonshine"", { [[[""mash"",1],[""yeast"",1]],""license_civ_MoonshineL"",50000,[[""Moonshine"",1],[""AItem:>"",2]]] spawn life_fnc_dynprocess; } ]; this addAction[format[""%1 ($%2)"",localize (getText(missionConfigFile >> ""Licenses"" >> ""MoonshineL"" >> ""displayName"")), [(getNumber(missionConfigFile >> ""Licenses"" >> ""MoonshineL"" >> ""price""))] call life_fnc_numberText],life_fnc_buyLicense,""MoonshineL"",0,false,false,"""",' !license_civ_MoonshineL && playerSide == civilian '];this addAction [ ""Process Whiskey"", { [[[""rye"",1],[""yeast"",1],[""waterbottle"",1]],""license_civ_WhiskeyL"",50000,[[""whiskey"",1],[""AItem:>"",3]]] spawn life_fnc_dynprocess; } ]; this addAction[format[""%1 ($%2)"",localize (getText(missionConfigFile >> ""Licenses"" >> ""WhiskeyL"" >> ""displayName"")), [(getNumber(missionConfigFile >> ""Licenses"" >> ""WhiskeyL"" >> ""price""))] call life_fnc_numberText],life_fnc_buyLicense,""WhiskeyL"",0,false,false,"""",' !license_civ_WhiskeyL && playerSide == civilian '];
Brauerei | Neue Einheit platzieren und folgendes in das Init-Feld hinzufügen
this allowDamage false; this enableSimulation false; this addAction [ ""Brew Beer"", { [[[""hops"",1],[""yeast"",1],[""waterbottle"",1]],""license_civ_liquor"",50000,[[""beerp"",1],[""AItem:>"",3]]] spawn life_fnc_dynprocess; } ]; this addAction[format[""%1 ($%2)"",localize (getText(missionConfigFile >> ""Licenses"" >> ""liquor"" >> ""displayName"")), [(getNumber(missionConfigFile >> ""Licenses"" >> ""liquor"" >> ""price""))] call life_fnc_numberText],life_fnc_buyLicense,""liquor"",0,false,false,"""",' !license_civ_liquor && playerSide == civilian ']; this addAction [ ""Mix Apple juice"", { [[[""apple"",1],[""waterbottle"",1]],""license_civ_liquor"",50000,[[""applej"",1],[""AItem:>"",2]]] spawn life_fnc_dynprocess; } ]; this addAction[format[""%1 ($%2)"",localize (getText(missionConfigFile >> ""Licenses"" >> ""liquor"" >> ""displayName"")), [(getNumber(missionConfigFile >> ""Licenses"" >> ""liquor"" >> ""price""))] call life_fnc_numberText],life_fnc_buyLicense,""liquor"",0,false,false,"""",' !license_civ_liquor && playerSide == civilian '];
Abfüller | Neue Einheit platzieren und folgendes in das Init-Feld hinzufügen
this allowDamage false; this enableSimulation false; this addAction [ ""Bottle Beer"", { [[[""beerp"",1],[""bottles"",1]],""license_civ_bottler"",50000,[[""bottledBeer"",1],[""AItem:>"",2]]] spawn life_fnc_dynprocess; } ]; this addAction[format[""%1 ($%2)"",localize (getText(missionConfigFile >> ""Licenses"" >> ""bottler"" >> ""displayName"")), [(getNumber(missionConfigFile >> ""Licenses"" >> ""bottler"" >> ""price""))] call life_fnc_numberText],life_fnc_buyLicense,""bottler"",0,false,false,"""",' !license_civ_bottler && playerSide == civilian '];this addAction [ ""Bottle Whiskey"", { [[[""whiskey"",1],[""bottles"",1]],""license_civ_bottler"",50000,[[""bottledwhiskey"",1],[""AItem:>"",2]]] spawn life_fnc_dynprocess; } ]; this addAction[format[""%1 ($%2)"",localize (getText(missionConfigFile >> ""Licenses"" >> ""bottler"" >> ""displayName"")), [(getNumber(missionConfigFile >> ""Licenses"" >> ""bottler"" >> ""price""))] call life_fnc_numberText],life_fnc_buyLicense,""bottler"",0,false,false,"""",' !license_civ_bottler && playerSide == civilian '];this addAction [ ""Bottle Moonshine"", { [[[""moonshine"",1],[""bottles"",1]],""license_civ_bottler"",50000,[[""bottledshine"",1],[""AItem:>"",2]]] spawn life_fnc_dynprocess; } ]; this addAction[format[""%1 ($%2)"",localize (getText(missionConfigFile >> ""Licenses"" >> ""bottler"" >> ""displayName"")), [(getNumber(missionConfigFile >> ""Licenses"" >> ""bottler"" >> ""price""))] call life_fnc_numberText],life_fnc_buyLicense,""bottler"",0,false,false,"""",' !license_civ_bottler && playerSide == civilian '];this addAction [ ""Bottle Apple juice"", { [[[""applej"",1],[""bottles"",1]],""license_civ_bottler"",50000,[[""bottledapplej"",1],[""AItem:>"",2]]] spawn life_fnc_dynprocess; } ]; this addAction[format[""%1 ($%2)"",localize (getText(missionConfigFile >> ""Licenses"" >> ""bottler"" >> ""displayName"")), [(getNumber(missionConfigFile >> ""Licenses"" >> ""bottler"" >> ""price""))] call life_fnc_numberText],life_fnc_buyLicense,""bottler"",0,false,false,"""",' !license_civ_bottler && playerSide == civilian '];
Mr. Moonshine | Neue Einheit platzieren und folgendes in das Init-Feld hinzufügen
this allowDamage false; this enableSimulation false; this addAction["Mr.Moonshine",life_fnc_virt_menu,"mrmoonshine"];
Kneipe/Bar | Neue Einheit platzieren und folgendes in das Init-Feld hinzufügen
this allowDamage false; this enableSimulation false; this addAction["Barkeeper",life_fnc_virt_menu,"alkbar"];
Ressourcen erstellen im Missioneditor
3 Marker einfügen | yeast_1, rye_1 und hops_1
Sucht euch ein Feld auf der Map und platziert einen Marker darauf. Dort könnt Ihr anschließend die Ressource abbauen.
In das Feld Name schreibt ihr nun yeast_1 für Hefe.
Im Feld Text steht der Name, welcher auf der Map angezeigt wird. Auf dem Bild ist es z.B. Hefe.
Das gleiche wiederholt ihr für Roggen und Hopfen. Dazu tragt ihr bei Name rye_1 für Roggen ein und bei dem dritten Marker nehmt ihr hops_1 für Hopfen.
Wenn Ihr schon dabei seid, platziert auch noch die Marker für Brennerei, Brauerei, Abfüller, Mr. Moonshine und die Kneipe/Bar.
Anschließend müßt Ihr die Missionsdatei abspeichern & und den Editor schließen.
Missionsordner öffnen und Dateien bearbeiten.
Nachfolgende Dateien bearbeiten
config_master.hpp | In die class VirtualItems einfügen
VITEMMACRO(bottledshine, "STR_Item_BottledShine", "bottledshine", 2, -1, 15000, true, 10, "")
VITEMMACRO(bottledwhiskey, "STR_Item_BottledWhiskey", "bottledWhiskey", 2, -1, 7000, false, 10, "")
VITEMMACRO(bottledBeer, "STR_Item_BottledBeer", "bottledbeer", 2, -1, 5500, false, 10, "")
VITEMMACRO(bottledapplej, "STR_Item_bottledapplej", "bottledapplej", 2, -1, 2000, false, 10, "")
VITEMMACRO(moonshine, "STR_Item_Moonshine", "moonshine", 2, -1, -1, true, -1, "")
VITEMMACRO(whiskey, "STR_Item_Whiskey", "whiskey", 2, 5000, -1, false, -1, "")
VITEMMACRO(beerp, "STR_Item_Beerp", "beerp", 2, 5000, -1, false, -1, "")
VITEMMACRO(mash, "STR_Item_Mash", "mash", 4, -1, -1, true, -1, "")
VITEMMACRO(rye, "STR_Item_Rye", "rye", 2, -1, -1, false, -1, "")
VITEMMACRO(hops, "STR_Item_Hops", "hops", 2, -1, -1, false, -1, "")
VITEMMACRO(yeast, "STR_Item_Yeast", "yeast", 2, -1, -1, false, -1, "")
VITEMMACRO(cornmeal, "STR_Item_Cornmeal", "cornmeal", 2, 500, 200, false, -1, "")
VITEMMACRO(bottles, "STR_Item_Bottles", "bottles", 2, 100, 75, false, -1, "")
VITEMMACRO(applej, "STR_Item_applej", "applej", 2, 100, 75, false, -1, "")
Alles anzeigen
config_master.hpp | In die class Licenses einfügen
LICENSEMACRO(MoonshineL,"STR_License_MoonshineL","MoonshineL",50000,true,"civ")
LICENSEMACRO(liquor,"STR_License_Liquor","liquor",100000,false,"civ")
LICENSEMACRO(bottler,"STR_License_Bottler","bottler",100000,false,"civ")
LICENSEMACRO(mashL,"STR_License_MashL","mashL",50000,true,"civ")
LICENSEMACRO(whiskeyL,"STR_License_whiskeyL","whiskeyL",50000,false,"civ")
LICENSEMACRO(applejL,"STR_License_applejL","applejL",50000,false,"civ")
config_master.hpp | In die class VirtualShops einfügen
class mrmoonshine {
name = "STR_Shops_MRMoonshine";
items[] = { "bottledshine" };
};
class alkbar {
name = "STR_Shops_alkbar";
items[] = { "bottledBeer", "bottledwhiskey", "bottledapplej" };
};
Alles anzeigen
Stringtable.xml
<Key ID="STR_MISC_AlreadyDrinking">
<Original>You are already drinking some booze</Original>
<German>Du trinkst bereits etwas!</German>
</Key>
<Key ID="STR_MISC_WestIndNoNo">
<Original>No drinking on duty</Original>
<German>Du darfst im Dienst kein Alkohol trinken!</German>
</Key>
<Key ID="STR_MISC_DrunkBlackout">
<Original>No have passed out</Original>
<German>Du hast einen Blackout!</German>
</Key>
<Key ID="STR_MISC_DrunkBlackout1">
<Original>What the hell happened to me?</Original>
<German>Was zum Teufel ist mit mir passiert?!</German>
</Key>
Alles anzeigen
<Key ID="STR_Item_Bottles">
<Original>Glass Bottles</Original>
<German>Glasflasche</German>
</Key>
<Key ID="STR_Item_BottledShine">
<Original>Bottled Moonshine</Original>
<German>abgefüllter Moonshine</German>
</Key>
<Key ID="STR_Item_BottledWhiskey">
<Original>Bottled Whiskey</Original>
<German>abgefüllter Whiskey</German>
</Key>
<Key ID="STR_Item_BottledBeer">
<Original>Bottled Beer</Original>
<German>abgefülltes Bier</German>
</Key>
<Key ID="STR_Item_BottledApplej">
<Original>Bottled Apple juice</Original>
<German>abgefüllter Apfelsaft</German>
</Key>
<Key ID="STR_Item_Moonshine">
<Original>Moonshine</Original>
<German>Moonshine</German>
</Key>
<Key ID="STR_Item_Whiskey">
<Original>Distilled Whiskey</Original>
<German>Destillierter Whiskey</German>
</Key>
<Key ID="STR_Item_Beerp">
<Original>Fermented Beer</Original>
<German>gebrautes Bier</German>
</Key>
<Key ID="STR_Item_Mash">
<Original>Mash</Original>
<German>Mash</German>
</Key>
<Key ID="STR_Item_Rye">
<Original>Rye</Original>
<German>Roggen</German>
</Key>
<Key ID="STR_Item_Hops">
<Original>Hops</Original>
<German>Hopfen</German>
</Key>
<Key ID="STR_Item_Yeast">
<Original>Yeast</Original>
<German>Hefe</German>
</Key>
<Key ID="STR_Item_Cornmeal">
<Original>Cornmeal Grain</Original>
<German>Getreidemehl</German>
</Key>
<Key ID="STR_Item_Applej">
<Original>Apple juice</Original>
<German>Apfelsaft</German>
</Key>
Alles anzeigen
<Key ID="STR_License_MashL">
<Original>Mash License</Original>
<German>Mash-Lizenz</German>
</Key>
<Key ID="STR_License_Liquor">
<Original>Liquor License</Original>
<German>Alkohol-Lizenz</German>
</Key>
<Key ID="STR_License_Bottler">
<Original>Bottling License</Original>
<German>Abfüller-Lizenz</German>
</Key>
<Key ID="STR_License_MoonshineL">
<Original>Moonshine License</Original>
<German>Moonshine-Lizenz</German>
</Key>
<Key ID="STR_License_whiskeyL">
<Original>Whiskey License</Original>
<German>Whiskey-Lizenz</German>
</Key>
Alles anzeigen
<Key ID="STR_Shops_MRMoonshine">
<Original>MR. Moonshine</Original>
<German>MR. Moonshine</German>
</Key>
<Key ID="STR_Shops_alkbar">
<Original>Pub</Original>
<German>Bar</German>
</Key>
<Key ID="STR_pInAct_Breathalyzer">
<Original>Breathalyzer</Original>
<German>Alkoholtest</German>
</Key>
<Key ID="STR_Crime_390">
<Original>Public Intoxication</Original>
<German>Trinken in der Oeffentlichkeit</German>
<French>Public Intoxication</French>
<Italian>Public Intoxication</Italian>
<Portuguese>Public Intoxication</Portuguese>
</Key>
core/Configuration.sqf | bei Backend Variables einfügen
*****************************
****** Backend Variables ****
*****************************
*/
life_drink = 0; //Moonshine
core/config/fn_varToStr.sqf | bei Virtual Inventory Items einfügen
case "life_inv_bottledshine": {"bottledshine"};
case "life_inv_bottledwhiskey": {"bottledwhiskey"};
case "life_inv_bottledBeer": {"bottledBeer"};
case "life_inv_moonshine": {"moonshine"};
case "life_inv_whiskey": {"whiskey"};
case "life_inv_beerp": {"beerp"};
case "life_inv_mash": {"mash"};
case "life_inv_rye": {"rye"};
case "life_inv_hops": {"hops"};
case "life_inv_yeast": {"yeast"};
case "life_inv_cornmeal": {"cornmeal"};
case "life_inv_bottles": {"bottles"};
case "life_inv_applej": {"applej"};
Alles anzeigen
core/config/fn_varToStr.sqf | bei License Block einfügen
case "license_civ_MoonshineL": {(localize "STR_License_MoonshineL")};
case "license_civ_liquor": {(localize "STR_License_liquor")};
case "license_civ_bottler": {(localize "STR_License_Bottler")};
case "license_civ_mashL": {(localize "STR_License_mashL")};
case "license_civ_whiskeyL": {(localize "STR_License_whiskeyL")};
core/config/fn_varHandle.sqf | in Case 0
case "bottledshine": {"life_inv_bottledshine"};
case "bottledwhiskey": {"life_inv_bottledwhiskey"};
case "bottledBeer": {"life_inv_bottledBeer"};
case "bottledapplej": {"life_inv_bottledapplej"};
case "moonshine": {"life_inv_moonshine"};
case "whiskey": {"life_inv_whiskey"};
case "beerp": {"life_inv_beerp"};
case "mash": {"life_inv_mash"};
case "rye": {"life_inv_rye"};
case "hops": {"life_inv_hops"};
case "yeast": {"life_inv_yeast"};
case "cornmeal": {"life_inv_cornmeal"};
case "bottles": {"life_inv_bottles"};
case "applej": {"life_inv_applej"};
Alles anzeigen
core/config/fn_varHandle.sqf | in Case 1
case "life_inv_bottledshine": {"bottledshine"};
case "life_inv_bottledwhiskey": {"bottledwhiskey"};
case "life_inv_bottledBeer": {"bottledBeer"};
case "life_inv_bottledapplej": {"bottledapplej"};
case "life_inv_moonshine": {"moonshine"};
case "life_inv_whiskey": {"whiskey"};
case "life_inv_beerp": {"beerp"};
case "life_inv_mash": {"mash"};
case "life_inv_rye": {"rye"};
case "life_inv_hops": {"hops"};
case "life_inv_yeast": {"yeast"};
case "life_inv_cornmeal": {"cornmeal"};
case "life_inv_bottles": {"bottles"};
case "life_inv_applej": {"applej"};
Alles anzeigen
core/actions/fn_gather.sqf | in _resourceZones und switch(true) do { ACHTUNG!!! Nicht kopieren lesen & ändern
Spoiler anzeigen
in der Zeile _resourceZones = ["apple_1", etc.
folgendes am Ende einfügen ,"rye_1","hops_1","yeast_1"
sollte dann in etwa so aussehen:
_resourceZones = ["apple_1","apple_2","apple_3","apple_4","peaches_1","peaches_2","peaches_3","peaches_4","heroin_1","cocaine_1","weed_1","rye_1","hops_1","yeast_1"];
weiter unten sucht Ihr nach: case (_zone in ["weed_1"]): {_gather = ["cannabis",1];};
direkt darunter fügt ihr folgendes ein:
case (_zone in ["rye_1"]): {_gather = ["rye",2];}; //Moonshine
case (_zone in ["yeast_1"]): {_gather = ["yeast",2];}; //Moonshine
case (_zone in ["hops_1"]): {_gather = ["hops",2];}; //Moonshine
sollte dann in etwa so aussehen:
//Get the resource that will be gathered from the zone name...
switch(true) do {
case (_zone in ["apple_1","apple_2","apple_3","apple_4"]): {_gather = ["apple",3];};
case (_zone in ["peaches_1","peaches_2","peaches_3","peaches_4"]): {_gather = ["peach",3];};
case (_zone in ["heroin_1"]): {_gather = ["heroin_unprocessed",1];};
case (_zone in ["cocaine_1"]): {_gather = ["cocaine_unprocessed",1];};
case (_zone in ["weed_1"]): {_gather = ["cannabis",1];};
case (_zone in ["rye_1"]): {_gather = ["rye",2];}; //Moonshine
case (_zone in ["yeast_1"]): {_gather = ["yeast",2];}; //Moonshine
case (_zone in ["hops_1"]): {_gather = ["hops",2];}; //Moonshine
default {""};
};
core/pmenu/fn_useItem.sqf ,"bottledapplej" hinzufügen
Spoiler anzeigen
switch (true) do { case (_item in ["waterBottle","coffee","redgull","bottledapplej"]): {
nach dem Case Lockpick folgendes hinzufügen
Spoiler anzeigen
case (_item =="bottledwhiskey"): {
if(playerSide in [west,independet]) exitWith {hint localize "STR_MSC_WestIndNoNo";};
if((player getVariable ["inDrink", FALSE])) exitWith {hint localize "STR_MISC_AlreadyDrinking";};
if(([false,_item,1] call life_fnc_handleInv))then
{
life_thirst = 100;
if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),1)) then {player setFatigue 0;};
if(isNil "life_drink") then {life_drink = 0;};
life_drink = life_drink + 0.06;
if (life_drink < 0.07) exitWith {};
[] spawn life_fnc_drinkwhiskey;
};
};
case (_item =="bottledshine"): {
if(playerSide in [west,independet]) exitWith {hint localize "STR_MSC_WestIndNoNo";};
if((player getVariable ["inDrink", FALSE])) exitWith {hint localize "STR_MISC_AlreadyDrinking";};
if(([false,_item,1] call life_fnc_handleInv))then
{
life_thirst = 100;
if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),1)) then {player setFatigue 0;};
if(isNil "life_drink") then {life_drink = 0;};
life_drink = life_drink + 0.08;
if (life_drink < 0.09) exitWith {};
[] spawn life_fnc_drinkmoonshine;
};
};
case (_item =="bottledbeer"): {
if(playerSide in [west,independet]) exitWith {hint localize "STR_MSC_WestIndNoNo";};
if((player getVariable ["inDrink", FALSE])) exitWith {hint localize "STR_MISC_AlreadyDrinking";};
if(([false,_item,1] call life_fnc_handleInv))then
{
life_thirst = 100;
if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),1)) then {player setFatigue 0;};
if(isNil "life_drink") then {life_drink = 0;};
life_drink = life_drink + 0.02;
if (life_drink < 0.06) exitWith {};
[] spawn life_fnc_drinkbeer;
};
};
sollte dann so aussehen
Spoiler anzeigen
case (EQUAL(_item,"lockpick")): {
[] spawn life_fnc_lockpick;
};
case (_item =="bottledwhiskey"): {
if(playerSide in [west,independet]) exitWith {hint localize "STR_MSC_WestIndNoNo";};
if((player getVariable ["inDrink", FALSE])) exitWith {hint localize "STR_MISC_AlreadyDrinking";};
if(([false,_item,1] call life_fnc_handleInv))then
{
life_thirst = 100;
if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),1)) then {player setFatigue 0;};
if(isNil "life_drink") then {life_drink = 0;};
life_drink = life_drink + 0.06;
if (life_drink < 0.07) exitWith {};
[] spawn life_fnc_drinkwhiskey;
};
};
case (_item =="bottledshine"): {
if(playerSide in [west,independet]) exitWith {hint localize "STR_MSC_WestIndNoNo";};
if((player getVariable ["inDrink", FALSE])) exitWith {hint localize "STR_MISC_AlreadyDrinking";};
if(([false,_item,1] call life_fnc_handleInv))then
{
life_thirst = 100;
if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),1)) then {player setFatigue 0;};
if(isNil "life_drink") then {life_drink = 0;};
life_drink = life_drink + 0.08;
if (life_drink < 0.09) exitWith {};
[] spawn life_fnc_drinkmoonshine;
};
};
case (_item =="bottledbeer"): {
if(playerSide in [west,independet]) exitWith {hint localize "STR_MSC_WestIndNoNo";};
if((player getVariable ["inDrink", FALSE])) exitWith {hint localize "STR_MISC_AlreadyDrinking";};
if(([false,_item,1] call life_fnc_handleInv))then
{
life_thirst = 100;
if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),1)) then {player setFatigue 0;};
if(isNil "life_drink") then {life_drink = 0;};
life_drink = life_drink + 0.02;
if (life_drink < 0.06) exitWith {};
[] spawn life_fnc_drinkbeer;
};
};
function.h in class Actions hinzufügen
Spoiler anzeigen
class dynprocess {};
function.h in class Cop hinzufügen
Spoiler anzeigen
class breathalyzer {};
function.h in class Items hinzufügen
Spoiler anzeigen
class drinkbeer {};
class drinkmoonshine {};
class drinkwhiskey {};
dialog/pInteraction.h die class ButtonNine in die class pInteraction_Menu / class controls hinzufügen
Spoiler anzeigen
class ButtonNine : life_RscButtonMenu
{
idc = 37458;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "$STR_pInAct_Breathalyzer";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.47;
w = 0.24; h = 0.038;
};
Die class pInteraction_Menu sollte dann in etwa so aussehen
Spoiler anzeigen
class pInteraction_Menu
{
idd = 37400;
movingEnabled = false;
enableSimulation = true;
class controlsBackground
{
class RscTitleBackground:life_RscText
{
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
idc = -1;
x = BGX;
y = BGY;
w = BGW;
h = (1 / 25);
};
class MainBackground : life_RscText {
idc = -1;
colorBackground[] = {0,0,0,0.7};
x = BGX;
y = BGY + (11 / 250);
w = BGW;
h = 0.6 - (22 / 250);
};
class Title : life_RscTitle {
colorBackground[] = {0,0,0,0};
idc = 37401;
text = "$STR_pInAct_Title";
x = BGX;
y = BGY;
w = BGW;
h = (1 / 25);
};
};
class controls
{
class ButtonClose : life_RscButtonMenu
{
idc = -1;
//shortcuts[] = {0x00050000 + 2};
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;";
x = BGX;
y = 0.8 - (1 / 25);
w = (6.25 / 40);
h = (1 / 25);
};
class ButtonOne : life_RscButtonMenu
{
idc = 37450;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.07;
w = 0.24;
h = 0.038;
};
class ButtonTwo : life_RscButtonMenu
{
idc = 37451;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.12;
w = 0.24;
h = 0.038;
};
class ButtonThree : life_RscButtonMenu
{
idc = 37452;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.17;
w = 0.24;
h = 0.038;
};
class ButtonFour : life_RscButtonMenu
{
idc = 37453;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.22;
w = 0.24;
h = 0.038;
};
class ButtonFive : life_RscButtonMenu
{
idc = 37454;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.27;
w = 0.24;
h = 0.038;
};
class ButtonSix : life_RscButtonMenu
{
idc = 37455;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.32;
w = 0.24;
h = 0.038;
};
class ButtonSeven : life_RscButtonMenu
{
idc = 37456;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.37;
w = 0.24;
h = 0.038;
};
class ButtonNine : life_RscButtonMenu
{
idc = 37458;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "$STR_pInAct_Breathalyzer";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.47;
w = 0.24;
h = 0.038;
};
};
};
core/cop/fn_copInteractionsMenu.sqf (Achtung: nicht kopieren!! lesen & erweitern)
Spoiler anzeigen
#define Btn9 37458 //neu alktest <-hinzufügen
Dann Private erweitern ,"_Btn6","_Btn7","_Btn8","_Btn9"
sucht nach dem folgenden Absatz und erweitert ihn mit _Btn9 (nur das Rote)
if(!isPlayer _curTarget && side _curTarget == civilian) exitWith {closeDialog 0;}; //Bad side check?
_display = findDisplay 37400;
_Btn1 = _display displayCtrl Btn1;
_Btn2 = _display displayCtrl Btn2;
_Btn3 = _display displayCtrl Btn3;
_Btn4 = _display displayCtrl Btn4;
_Btn5 = _display displayCtrl Btn5;
_Btn6 = _display displayCtrl Btn6;
_Btn7 = _display displayCtrl Btn7;
_Btn9 = _display displayCtrl Btn9; //neu Alktest
life_pInact_curTarget = _curTarget;
Ganz unten am Ende fügt Ihr jetzt noch folgendes ein.
//Set Alktest
Button_Btn9 ctrlSetText localize "STR_pInAct_Breathalyzer";
_Btn9 buttonSetAction "[[player],""life_fnc_breathalyzer"",life_pInact_curTaget,FALSE] spawn life_fnc_MP;closeDialog 0";
core/civilian/fn_jail.sqf überlife_is_arrested = true; hinzufügen
Spoiler anzeigen
if(life_inv_mash > 0) then {[false,"mash",life_inv_mash] call life_fnc_handleInv;}; //Moonshine
if(life_inv_moonshine > 0) then {[false,"moonshine",life_inv_moonshine] call life_fnc_handleInv;}; //Moonshine
if(life_inv_bottledshine > 0) then {[false,"bottledshine",life_inv_bottledshine] call life_fnc_handleInv;}; //Moonshine
core/pmenu/fn_p_openMenu.sqf
in case civilian und case independet folgendes einfügen.
Spoiler anzeigen
ctrlShow[37458,false]; //Alktest
core/fn_survival.sqf
sucht nach
//Setup the time-based variables.
_foodTime = time;
_waterTime = time;
_walkDis = 0;
und fügt folgendes darüber ein.
Spoiler anzeigen
[] spawn
{
while {true} do
{
waitUntil {(life_drink > 0)};
while{(life_drink > 0)} do {
if(life_drink > 0.08) then {
"radialBlur" ppEffectEnable true;
"radialBlur" ppEffectAdjust[0.08, 0,0.35,0.37];
"radialblur" ppEffectCommit 3;
sleep 240;
life_drink = life_drink - 0.02;
} else {
"radialBlur" ppEffectEnable true;
"radialBlur" ppEffectAdjust[0.05, 0,0.36,0.38];
"radialBlur" ppEffectCommit 1;
sleep 180;
life_drink = life_drink - 0.02;
};
};
"radialBlur" ppEffectAdjust [0,0,0,0];
"radialblur" ppEffectCommit 5;
"radialblur" ppEffectEnable false;
life_drink = 0;
};
};
Nachfolgende Dateien neu erstellen
core/action/fn_dynprocess.sqf
Spoiler anzeigen
#include <macro.h>
/*
BY OPTIX aka https://nodezone.net/www.steamcommunity.com/id/ryanthett
THIS HEADER HAS TO BE LEFT UNCHANGED UNDER ALL CIRCUMSTANCES!
CHANGING ANYTHING OF THE SCRIPT DOESN'T MAKE IT YOURS!
*/
private ["_currentPos","_itemsBenoetigtArray","_lizenzBenoetigt","_lizenzKaufkosten","_produkt","_lizenzBoolean","_weiter","_itemHatAnzahlArray","_itemMussAnzahlArray","_indexAktuell","_itemMaximal","_minWert","_indexAktuellEnde","_anzahlMaxVerarbeiten"];
// SONDERFÄLLE PRÜFEN
if (isServer) exitWith {};
if (vehicle player != player) then {hint "Du kannst nicht aus dem Fahrzeug verarbeiten!"};
if (life_is_processing) exitWith {hint "Du verarbeitest bereits etwas!"};
if(vehicle player != player) exitwith {hint format["Du befindest dich in einem Fahrzeug und kannst deshalb nichts verarbeiten!"]};
// AB JETZT VERARBEITET DER SPIELER
life_is_processing = true;
// DEKLARIEREN DER BENÖTIGEN VARIABELN UND AUFRUFEN DER ÜBERGEBENEN PARAMETER
_currentPos = position player;
_itemsBenoetigtArray = [_this,0,[],[[]]] call BIS_fnc_param;
_lizenzBenoetigt = [_this,1,"",[""]] call BIS_fnc_param;
_lizenzKaufkosten = [_this,2,0,[0]] call BIS_fnc_param;
_produkt = [_this,3,[],[[]]] call BIS_fnc_param;
_lizenzBoolean = false;
// LIZENZ PRÜFEN, WENN NICHT VORHANDEN KAUF VERSUCHEN
call compile format ["_lizenzBoolean = %1",_lizenzBenoetigt];
_nah = false;
if (!_lizenzBoolean) then {
if (CASH>=_lizenzKaufkosten) then {
CASH = CASH - _lizenzKaufkosten;
call compile format ["%1 = true",_lizenzBenoetigt];
hint format ["Du hast eine Lizenz fuer %1 Dollar gekauft und kannst nun verarbeiten!",_lizenzKaufkosten];
} else {
hint format ["Leider hast du nicht %1 Dollar dabei, um eine Lizenz zu erwerben!",_lizenzKaufkosten];
if (true) exitWith {life_is_processing = false;5 cutText ["","PLAIN"];_nah=true};
};
};
if (_nah) exitWith {life_is_processing = false;5 cutText ["","PLAIN"]};
// PRÜFEN, OB ITEMS VORHANDEN SIND
_nah = false;
{
_itemsBenoetigtAktuell = _x;
_itemName = _itemsBenoetigtAktuell select 0;
_itemAnzahlBenoetigt = _itemsBenoetigtAktuell select 1;
call compile format ["itemAnzahlHat = life_inv_%1",_itemName];
if (_itemAnzahlBenoetigt>itemAnzahlHat) then {_nah = true};
} forEach _itemsBenoetigtArray;
if (_nah) exitWith {life_is_processing = false;5 cutText ["","PLAIN"];hint "Du hast nicht genuegend Items dabei!"};
// PROGRESSBAR SCHALTEN
disableSerialization;
5 cutRsc ["life_progress","PLAIN"];
_ui = uiNameSpace getVariable "life_progress";
_progress = _ui displayCtrl 38201;
_pgText = _ui displayCtrl 38202;
_pgText ctrlSetText format["%2 (1%1)...","%","Verarbeite..."];
_progress progressSetPosition 0.01;
_cP = 0.01;
_nah=false;
while{true} do
{
sleep 0.3;
_cP = _cP + 0.01;
if (_cp<=1) then { _progress progressSetPosition _cP; };
_pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%","Verarbeite..."];
if(_cP >= 1) exitWith {};
if(player distance _currentPos > 10) exitWith {hint "Du hast dich zu weit entfernt!";life_is_processing = false;5 cutText ["","PLAIN"];_nah=true};
};
if (_nah) exitWith {life_is_processing = false;5 cutText ["","PLAIN"]};
// VERARBEITUNGSANZAHL BERECHNEN -> MATHE FTW
_itemHatAnzahlArray = [];
{
_itemsBenoetigtAktuell = _x;
_itemName = _itemsBenoetigtAktuell select 0;
call compile format ["_itemHatAnzahlArray = _itemHatAnzahlArray + [life_inv_%1]",_itemName];
} forEach _itemsBenoetigtArray;
_itemMussAnzahlArray = [];
{
_itemsBenoetigtAktuell = _x;
_itemAnzahlBenoetigt = _itemsBenoetigtAktuell select 1;
call compile format ["_itemMussAnzahlArray = _itemMussAnzahlArray + [%1]",_itemAnzahlBenoetigt];
} forEach _itemsBenoetigtArray;
_indexAktuell = -1;
_itemMaximal = [];
{
_indexAktuell = _indexAktuell + 1;
_itemMaximal = _itemMaximal + [(floor ((_itemHatAnzahlArray select _indexAktuell)/(_itemMussAnzahlArray select _indexAktuell)))];
} forEach _itemHatAnzahlArray;
_minWert = _itemMaximal select 0;
_indexAktuellEnde = 0;
{
_indexAktuellEnde = _indexAktuellEnde + 1;
if (_x<_minWert) then {_minWert=_x};
} forEach _itemMaximal;
_anzahlMaxVerarbeiten = _minWert;
// ITEMS ENTZIEHEN
{
_itemsBenoetigtAktuell = _x;
[false,_itemsBenoetigtAktuell select 0,((_itemsBenoetigtAktuell select 1)*_anzahlMaxVerarbeiten)] call life_fnc_handleInv;
} forEach _itemsBenoetigtArray;
// ITEMS ADDEN
{
[true,_x select 0,((_x select 1)*_anzahlMaxVerarbeiten)] call life_fnc_handleInv;
} forEach _produkt;
//_toLog = format ["4|%1 (%2) hat %3 Mal %4 durch verarbeiten erhalten.", name player,getPlayerUID player,_anzahlMaxVerarbeiten,_produkt];
//[[_toLog],"Arma3Log"] call life_fnc_MP;
life_is_processing = false;
5 cutText ["","PLAIN"];
core/cop/fn_breathalyzer.sqf
Spoiler anzeigen
/*
File: fn_breathalyzer.sqf
Author: midgetgrimm
Description:
Allows Cops breathalyze Player
*/
private["_cop","_drinky"];
_cop = [_this,0,objNull,[objNull]] call BIS_fnc_param;
if(isNull _cop) exitWith {};
_drinky = life_drink;
if(_drinky > 0.07) then {
[[1,format["Alkoholtest: %1 \n\n Promille: %2 \n\n Das ist zuviel! ",name player,[_drinky] call life_fnc_numberText]],"life_fnc_broadcast",_cop,false] spawn life_fnc_MP;
};
else
{};
core/items/fn_drinkbeer.sqf
Spoiler anzeigen
/*
File: fn_drinkbeer.sqf
Author: midgetgrimm
*/
closeDialog 0;
hintSilent parseText format["Your BAC is now<br/> <t size='1.4'><t color='#FF0000'>%1</t></t>",[life_drink] call life_fnc_numberText];
sleep 4;
"chromAbberation" ppEffectEnable true; //Fehlerhaft?? Chrom
"radialBlur" ppEffectEnable true;
enableCamShake true;
player setVariable["inDrink",true,true];
for "_i" from 0 to 59 do
{
if(life_drink > 0.12) then {
"chromAberration" ppEffectAdjust[0.16,random 0.16, true];
"chromAberration" ppEffectCommit 1;
"radialBlur" ppEffectAdjust [random 0.05,random 0.05,0.3,0.3];
"radialBlur" ppEffectCommit 1;
addcamShake[random 4, 2, random 4];
sleep 1;
} else {
"chromAberration" ppEffectAdjust[0.05,random 0.05, true];
"chromAberration" ppEffectCommit 1;
"radialBlur" ppEffectAdjust [random 0.03,random 0.03,0.4,0.4];
"radialBlur" ppEffectCommit 1;
addcamShake[random 3, 1, random 3];
sleep 1;
};
};
if (life_drink > 0.22) then {
titleText [localize "STR_MISC_DrunkBlackOut","BLACK OUT"];
player playMoveNow "Incapacitated";
//titleText[localize "STR_MISC_DrunkBlackOut","BLACK IN"];
sleep 15;
removeUniform player;removeVest player;
player playMoveNow "AinjPpneMstpSnonWrf1Dnon_rolltoback";
sleep 10;
life_drink = 0;
titleText[localize "STR_MISC_DrunkBlackOut1","PLAIN"];
player playMoveNow "amovppnemstpsraswrf1dnon";
[[0,format[localize "STR_MISC_StPubIntox",profilName]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP;
[[getPlayerUID player,profilName, "390"],"life_fnc_wantedAdd",false,false] spawn life_fnc_MP;
};
//Stop effects
player setVariable["inDrink",false,true];
"chromAberration" ppEffectAdjust [0,0,true];
"chromAberration" ppEffectCommit 5;
"radialBlur" ppEffectAdjust [0,0,0,0];
"radialBlur" ppEffectCommit 5;
sleep 6;
//Deaktivate ppEffects
//"chromAberration" ppEffectEnable false;
//"radialBlur" ppEffectEnable false;
resetCamShake;
if(life_drink != 0) then {life_drink = life_drink - 0.02;};
core/items/fn_drinkmoonshine.sqf
Spoiler anzeigen
/*
File: fn_drinkmoonshine.sqf
Author: midgetgrimm
*/
closeDialog 0;
profilName = name player;
hintSilent parseText format["Your BAC is now<br/> <t size='1.4'><t color='#FF0000'>%1</t></t>",[life_drink] call life_fnc_numberText];
sleep 4;
"chromAbberation" ppEffectEnable true; //Fehlerhaft?? Chrom
"radialBlur" ppEffectEnable true;
//"wetDistortion" ppEffectEnable true;
enableCamShake true;
player setVariable["inDrink",true,true];
for "_i" from 0 to 89 do
{
if(life_drink > 0.15) then {
"chromAberration" ppEffectAdjust [random 0.07,random 0.07, true];
"chromAberration" ppEffectCommit 1;
"radialBlur" ppEffectAdjust [random 0.04, 0.09,0.25, 0.29];
"radialBlur" ppEffectCommit 1;
addcamShake[random 4, 2, random 4];
sleep 1;
} else {
"chromAberration" ppEffectAdjust[0.03,random 0.03, true];
"chromAberration" ppEffectCommit 1;
"radialBlur" ppEffectAdjust [random 0.03,random 0.03,0.43,0.43];
"radialBlur" ppEffectCommit 1;
addcamShake[random 4, 2, random 4];
sleep 1;
};
};
if (life_drink > 0.22) then {
titleText [localize "STR_MISC_DrunkBlackOut","BLACK OUT"];
// player setPos (getMarkerPos "drunk_1"); // Teleport zum marker
player playMoveNow "Incapacitated";
//titleText[localize "STR_MISC_DrunkBlackOut","BLACK IN"];
sleep 15;
removeUniform player;
removeVest player;
removeBackpackGlobal player;
removeAllWeapons player;
player playMoveNow "AinjPpneMstpSnonWrf1Dnon_rolltoback";
sleep 10;
life_drink = 0;
titleText[localize "STR_MISC_DrunkBlackOut1","PLAIN"];
player playMoveNow "amovppnemstpsraswrf1dnon";
[[2,"STR_MISC_StPubIntox",true,[profileName]],"life_fnc_broadcast",true,false] call life_fnc_MP; //neu
// [[0,format[localize "STR_MISC_StPubIntox",profilName]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP;
[[getPlayerUID player,profilName, "390"],"life_fnc_wantedAdd",false,false] spawn life_fnc_MP;
player switchmove "";
};
//Stop effects
player setVariable["inDrink",false,true];
"chromAberration" ppEffectAdjust [0,0,true];
"chromAberration" ppEffectCommit 5;
"radialBlur" ppEffectAdjust [0,0,0,0];
"radialBlur" ppEffectCommit 5;
sleep 6;
//Deaktivate ppEffects
"chromAberration" ppEffectEnable false;
"radialBlur" ppEffectEnable false;
resetCamShake;
if(life_drink != 0) then {life_drink = life_drink - 0.02;};
core/items/fn_drinkwhiskey.sqf
Spoiler anzeigen
/*
File: fn_drinkwhiskey.sqf
Author: midgetgrimm
*/
closeDialog 0;
hintSilent parseText format["Your BAC is now<br/> <t size='1.4'><t color='#FF0000'>%1</t></t>",[life_drink] call life_fnc_numberText];
sleep 4;
"chromAbberation" ppEffectEnable true; //Fehlerhaft?? Chrom
"radialBlur" ppEffectEnable true;
"colorCorrections" ppEffectEnable true;
enableCamShake true;
player setVariable["inDrink",true,true];
for "_i" from 0 to 89 do
{
if(life_drink > 0.12) then {
"chromAberration" ppEffectAdjust[0,random 0.15, false];
"chromAberration" ppEffectCommit 1;
"radialBlur" ppEffectAdjust [random 0.1,random 0.1,0.3,0.3];
"radialBlur" ppEffectCommit 1;
"colorCorrections" ppEffectAdjust[ 0.44, 0.76, 0.7, [0.1, -0.57, 0, 0.05], [1.8, 1.3, 0.3, 0.7],[0.2, 0.59, 0.11, 0]];
"colorCorrections" ppEffectCommit 1;
addcamShake[random 4, 2, random 4];
sleep 1;
} else {
"chromAberration" ppEffectAdjust[0.05,random 0.05, true];
"chromAberration" ppEffectCommit 1;
"radialBlur" ppEffectAdjust [random 0.01,random 0.01,0.5,0.5];
"radialBlur" ppEffectCommit 1;
addcamShake[random 4, 2, random 4];
sleep 1;
};
};
if (life_drink > 0.22) then {
titleText [localize "STR_MISC_DrunkBlackOut","BLACK OUT"];
player playMoveNow "Incapacitated";
titleText[localize "STR_MISC_DrunkBlackOut","BLACK IN"];
sleep 15;
removeUniform player;removeVest player;
player playMoveNow "AinjPpneMstpSnonWrf1Dnon_rolltoback";
sleep 10;
life_drink = 0;
titleText[localize "STR_MISC_DrunkBlackOut1","PLAIN"];
player playMoveNow "amovppnemstpsraswrf1dnon";
[[0,format[localize "STR_MISC_StPubIntox",profilName]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP;
[[getPlayerUID player,profilName, "390"],"life_fnc_wantedAdd",false,false] spawn life_fnc_MP;
};
//Stop effects
player setVariable["inDrink",false,true];
"chromAberration" ppEffectAdjust [0,0,true];
"chromAberration" ppEffectCommit 5;
"colorCorrections" ppEffectAdjust[ 1, 1, 9, [0, 0, 0, 0],[1.8, 1.8, 0.3, 0.7],[0.2, 0.59, 0.11, 0]];
"colorCorrections" ppEffectCommit 5;
"radialBlur" ppEffectAdjust [0,0,0,0];
"radialBlur" ppEffectCommit 5;
sleep 6;
//Deaktivate ppEffects
"chromAberration" ppEffectEnable false;
"radialBlur" ppEffectEnable false;
"colorCorrections" ppEffectEnable false;
resetCamShake;
if(life_drink != 0) then {life_drink = life_drink - 0.02;};
Life_Server Part
Glückwunsch, Ihr habt es gleich geschafft. Zum Abschluss noch die Änderung am Life_Server.
@life_server\addons\life_server\Functions\WantedSystem\fn_wantedAdd.sqf case 390 hinzufügen
Spoiler anzeigen
case "390": {_x = "STR_Crime_390"};
So das war alles , viel Spaß mit dem Script. Bei mir läuft es aktuell ohne Fehler.