1. Dashboard
  2. Forum
    1. Unerledigte Themen
  3. Downloads
  4. Galerie
    1. Alben
  5. Toolbox
    1. Passwort Generator
    2. Portchecker
  6. Mitglieder
    1. Mitgliedersuche
    2. Benutzer online
    3. Trophäen
    4. Team
Mo: 19 Mai 2025
  • Anmelden oder registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Forum
  • Dateien
  • Seiten
  • Bilder
  • Erweiterte Suche

Schön, dass du den Weg zu NodeZone.net gefunden hast! Aktuell bist du nicht angemeldet und kannst deshalb nur eingeschränkt auf unsere Community zugreifen. Um alle Funktionen freizuschalten, spannende Inhalte zu entdecken und dich aktiv einzubringen, registriere dich jetzt kostenlos oder melde dich mit deinem Account an.

Anmelden oder registrieren
    1. Nodezone.net Community
    2. Forum
    3. Gameserver & Hosting
    4. ArmA Series - ArmA 3 / Reforger
    5. Tutorials & Releases

    [Tutorial] Handy Akku einfügen

      • Altis Life
    • Noldy
    • 9. August 2015 um 03:05
    • Noldy
      Amateur
      Reaktionen
      100
      Trophäen
      11
      Beiträge
      166
      • 9. August 2015 um 03:05
      • #1

      Hallo,
      Mein erstes Tutorial hier.

      In diesem Tutorial zeige ich euch, wie ihr unter eurem leben Icon eine Batterie einfügt.

      !!Wenn ihr das SQL Smartphone habt, dann fügt die dateien wie normal in der Anleitung ein und ändert eine datei nach folgendem Post ab:!!

      Only 4 GG User

      [hide]

      fn_callCellPhone.sqf

      Spoiler anzeigen

      /*
      Cell Phone Battery script by KampfKuerbisHD
      */

      if(life_battery < 2) exitWith {hint "Deine Batterie ist leer."};
      createDialog "Life_my_smartphone";

      !!Das Rot markierte bitte vollständig ersetzen.!!

      (Das Rot geschriebene hinzufügen/ersetzen)

      Dann legen wir mal los

      1. core\functions\fn_hudUpdate.sqf

      Spoiler anzeigen

      /*
      /*
      File: fn_hudUpdate.sqf
      Author: Bryan "Tonic" Boardwine

      Description:
      Updates the HUD when it needs to.
      */
      private["_ui","_food","_water","_health","_battery"];
      disableSerialization;

      _ui = uiNameSpace getVariable ["playerHUD",displayNull];
      if(isNull _ui) then {[] call life_fnc_hudSetup;};
      _food = _ui displayCtrl 23500;
      _water = _ui displayCtrl 23510;
      _health = _ui displayCtrl 23515;
      _battery = _ui displayCtrl 23520;

      //Update food
      _food ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.548];
      _food ctrlSetText format["%1", life_hunger];
      _food ctrlCommit 0;
      //Update Water
      _water ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.502];
      _water ctrlSetText format["%1", life_thirst];
      _water ctrlCommit 0;
      //Update Health
      _health ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.456];
      _health ctrlSetText format["%1", round((1 - (damage player)) * 100)];
      _health ctrlCommit 0;
      //Update battery
      _battery ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.410];
      _battery ctrlSetText format["%1", life_battery];
      _battery ctrlCommit 0;

      2. core\init_survival.sqf

      Spoiler anzeigen

      [] spawn {
      private["_fnc_food","_fnc_water","_fnc_battery"];
      _fnc_food =
      {
      if(life_hunger < 2) then {player setDamage 1; hint "Du bist verhungert.";}
      else
      {
      life_hunger = life_hunger - 10;
      [] call life_fnc_hudUpdate;
      if(life_hunger < 2) then {player setDamage 1; hint "Du bist verhungert.";};
      switch(life_hunger) do {
      case 30: {hint "Du hast eine Weile nichts gegessen, du solltest schnell etwas finden!";};
      case 20: {hint "Du hast angefangen zu verhungern, du musst etwas zu essen finden ansonsten wirst du sterben.";};
      case 10: {hint "Du wirst nun zu Tode hungern, du wirst sehr bald sterben, falls du nichts essen solltest";player setFatigue 1;};
      };
      };
      };

      _fnc_water =
      {
      if(life_thirst < 2) then {player setDamage 1; hint "Du bist Ausgetrocknet.";}
      else
      {
      life_thirst = life_thirst - 10;
      [] call life_fnc_hudUpdate;
      if(life_thirst < 2) then {player setDamage 1; hint "Du bist Ausgetrocknet.";};
      switch(life_thirst) do
      {
      case 30: {hint "Du hast eine Weile nichts getrunken, du solltest bald etwas finden.";};
      case 20: {hint "Du hast eine lange Zeit nichts getrunken, du solltest bald etwas zu trinken finden oder du wirst wegen Austrocknung sterben."; player setFatigue 1;};
      case 10: {hint "Du leidest unter schwerer Austrocknung, du solltest schnell etwas trinken!"; player setFatigue 1;};
      };
      };
      };

      _fnc_battery =
      {
      if(life_battery < 2) then {hint "Your battery is empty.";}
      else
      {
      life_battery = life_battery - 5;
      [] call life_fnc_hudUpdate;
      if(life_battery < 2) then {hint "Your battery is empty.";};
      switch(life_battery) do
      {
      case 30: {hint "Message if is battery 30%. (you can remove this line)";};
      case 20: {hint "Message if is battery 20%. (you can remove this line)";};
      case 10: {hint "Message if is battery 10%. (you can remove this line)";};
      };
      };
      };

      while{true} do
      {
      sleep 600;
      [] call _fnc_water;
      sleep 10;
      [] call _fnc_battery;
      sleep 250;
      [] call _fnc_food;
      };
      };

      3. dialog\player_sys.sqf

      Spoiler anzeigen

      #define playersys_DIALOG 2001
      #define money_text 2002
      #define water_text 2003
      #define food_text 2004
      #define item_list 2005
      #define player_list 2006
      #define money_value 2007
      #define rogue_text 2008
      #define carry_weight 2009
      #define item_edit 2010
      #define battery_text 2011

      4. dialog\player_inv.hpp und suche "class ButtonCell"

      Spoiler anzeigen

      class ButtonCell : Life_RscButtonMenu {
      idc = 2014;
      text = "$STR_PM_CellPhone";
      onButtonClick = "[] call life_fnc_callCellPhone";
      x = 0.42 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH));
      y = 0.8 - (1 / 25);
      w = (6.25 / 40);
      h = (1 / 25);
      };

      5. dialog\ui.hpp

      Spoiler anzeigen

      class playerHUD
      {
      idd=-1;
      movingEnable=0;
      fadein=0;
      duration = 99999999999999999999999999999999999999999999;
      fadeout=0;
      name="playerHUD";
      onLoad="uiNamespace setVariable ['playerHUD',_this select 0]";
      objects[]={};

      class controlsBackground
      {
      class foodHIcon : life_RscPicture
      {

      idc = -1;
      text = "icons\food.paa";
      x = safeZoneX+safeZoneW-0.115; y = safeZoneY+safeZoneH-0.54;
      w = 0.03; h = 0.04;
      };

      class waterHIcon : life_RscPicture
      {

      idc = -1;
      text = "icons\water.paa";
      x = safeZoneX+safeZoneW-0.12; y = safeZoneY+safeZoneH-0.50;
      w = 0.04; h = 0.04;
      };

      class healthHIcon : life_RscPicture
      {

      idc = -1;
      text = "icons\health.paa";
      x = safeZoneX+safeZoneW-0.11; y = safeZoneY+safeZoneH-0.445;
      w = 0.02; h = 0.03;
      };

      class batteryHIcon : life_RscPicture
      {

      idc = -1;
      text = "icons\battery.paa";
      x = safeZoneX+safeZoneW-0.11; y = safeZoneY+safeZoneH-0.40;
      w = 0.02; h = 0.03;
      };
      };

      class controls
      {
      class foodtext
      {
      type=0;
      idc=23500;
      style=0;
      x=-1;
      y=-1;
      w=0.3;
      h=0.05;
      sizeEx=0.03;
      size=1;
      font="PuristaSemibold";
      colorBackground[]={0,0,0,0};
      colorText[] = { 1 , 1 , 1 , 1 };
      shadow=true;
      text="";
      };

      class watertext
      {
      type=0;
      idc=23510;
      style=0;
      x=-1;
      y=-1;
      w=0.3;
      h=0.05;
      sizeEx=0.03;
      size=1;
      font="PuristaSemibold";
      colorBackground[]={0,0,0,0};
      colorText[] = { 1 , 1 , 1 , 1 };
      shadow=true;
      text="";
      };

      class healthtext
      {
      type=0;
      idc=23515;
      style=0;
      x=-1;
      y=-1;
      w=0.3;
      h=0.05;
      sizeEx=0.03;
      size=1;
      font="PuristaSemibold";
      colorBackground[]={0,0,0,0};
      colorText[] = { 1 , 1 , 1 , 1 };
      shadow=true;
      text="";
      };

      class batterytext
      {
      type=0;
      idc=23520;
      style=0;
      x=-1;
      y=-1;
      w=0.3;
      h=0.05;
      sizeEx=0.03;
      size=1;
      font="PuristaSemibold";
      colorBackground[]={0,0,0,0};
      colorText[] = { 1 , 1 , 1 , 1 };
      shadow=true;
      text="";
      };
      };
      };

      6. core\configuration.sqf

      Spoiler anzeigen

      #include <macro.h>
      /*
      Master Life Configuration File
      This file is to setup variables for the client, there are still other configuration files in the system

      *****************************
      ****** Backend Variables *****
      *****************************
      */
      life_query_time = time;
      life_action_delay = time;
      life_trunk_vehicle = Objnull;
      life_session_completed = false;
      life_garage_store = false;
      life_session_tries = 0;
      life_net_dropped = false;
      life_hit_explosive = false;
      life_siren_active = false;
      life_clothing_filter = 0;
      life_clothing_uniform = -1;
      life_redgull_effect = time;
      life_is_processing = false;
      life_bail_paid = false;
      life_impound_inuse = false;
      life_action_inUse = false;
      life_spikestrip = ObjNull;
      life_respawn_timer = 35;
      life_has_insurance = false;
      life_knockout = false;
      life_interrupted = false;
      //Uniform price (0),Hat Price (1),Glasses Price (2),Vest Price (3),Backpack Price (4)
      life_clothing_purchase = [-1,-1,-1,-1,-1];
      /*
      *****************************
      ****** Weight Variables *****
      *****************************
      */
      life_maxWeight = 24; //Identifies the max carrying weight (gets adjusted throughout game when wearing different types of clothing).
      life_maxWeightT = 24; //Static variable representing the players max carrying weight on start.
      life_carryWeight = 0; //Represents the players current inventory weight (MUST START AT 0).

      /*
      *****************************
      ****** Food Variables *******
      *****************************
      */
      life_eat_Salema = 40;
      life_eat_Ornate = 20;
      life_eat_Mackerel = 20;
      life_eat_Tuna = 100;
      life_eat_Mullet = 30;
      life_eat_CatShark = 60;
      life_eat_Rabbit = 20;
      life_eat_Apple = 5;
      life_eat_turtlesoup = 62;
      life_eat_donuts = 30;

      /*
      *****************************
      ****** Life Variables *******
      *****************************
      */
      life_net_dropped = false;
      life_hit_explosive = false;
      life_siren_active = false;
      life_bank_fail = false;
      life_use_atm = true;
      life_is_arrested = false;
      life_delivery_in_progress = false;
      life_action_in_use = false;
      life_thirst = 100;
      life_hunger = 100;
      life_battery = 50;
      life_paycheck_period = 5;
      life_cash = 0;
      life_impound_car = 350;
      life_impound_boat = 250;
      life_impound_air = 850;
      life_istazed = false;
      life_my_gang = ObjNull;

      [...]

      7. Functions.h und finde "class Functions"

      Spoiler anzeigen

      class Functions
      {
      file = "core\functions";
      class calWeightDiff {};
      class fetchCfgDetails {};
      class handleInv {};
      class hudSetup {};
      class hudUpdate {};
      class fetchGear{};
      class tazeSound {};
      class animSync {};
      class simDisable {};
      class keyHandler {};
      class dropItems {};
      class handleDamage {};
      class numberText {};
      class handleItem {};
      class accType {};
      class onPlayerDisconnect {};
      class onDeath {};
      class onRespawn {};
      class receiveItem {};
      class giveDiff {};
      class receiveMoney {};
      class playerTags {};
      class clearVehicleAmmo {};
      class pulloutVeh {};
      class nearUnits {};
      class fedSuccess {};
      class actionKeyHandler {};
      class autoSave {};
      class TBHreloader {};
      class updateCash {};
      class vehicleGarage {};
      class holsterHandgun {};
      class CarLockSound {};
      class CarUnlockSound {};
      class callCellPhone {};
      };

      Nun ist der Batterie Script fertig.

      Jetzt fügen wir noch die Batterie in den Markt.

      1. core\config\fn_varHandle.sqf
      Adde bei "case 0":

      Spoiler anzeigen

      case "battery": {"life_inv_battery"};


      Adde bei "case 1":

      Spoiler anzeigen

      case "life_inv_battery": {"battery"};

      2. core\config\fn_itemWeight.sqf
      Adde:

      Spoiler anzeigen

      case "battery": {1};

      3. core\config\fn_varToStr.sqf
      Adde

      Spoiler anzeigen

      case "life_inv_battery": {"Cell Phone Battery"};

      4. core\configuration.sqf
      Adde bei "life_inv_items" das:

      Spoiler anzeigen

      "life_inv_battery"


      Adde in "sell_array" das:

      Spoiler anzeigen

      ["battery",750]


      Adde in "buy_array" das:

      Spoiler anzeigen

      ["battery",1500]

      5. core\config\fn_virt_shops.sqf
      Adde in "case "market"" das:

      Spoiler anzeigen

      {["Altis Market",["battery"]]};


      Das ganze müsste da so aussehen ungefär

      Spoiler anzeigen

      case "market": {["Altis Market",["water","rabbit","redgull","tbacon","lockpick","battery","pickaxe","axt","fuelF","pfandflasche","openkokos","storage2"]]};

      6. core\pmenu\useItem.sqf
      Adde das hinzu

      Spoiler anzeigen

      case (_item == "battery"):
      {
      if(([false,_item,1] call life_fnc_handleInv)) then
      {
      life_battery = 100;
      hint "Your battery is full now.";
      };
      };

      Bitte achtet gut, das wenn ihr wo was hinzufügt auf die komas (,) zu achten.
      Das letzte darf nie ein (,) haben, jedoch obendrüber alle.

      Das war es schon. Nun hat euer Handy einen Akku.

      Sollte der Akku mal leer sein, könnt ihr das Handy nicht mehr benutzen bis ihr im Markt eine neue Batterie kauft. ^^

      Original Thread: (English) [HOWTO] Add Cell Phone Battery [3.1.2 / 3.1.3] - Editing Docs - Altis Life RPG

      Im anhang habe ich noch 2 sachen eingefügt, die ihr in euer FTP laden müsst.
      Das Icon, und die fn_callCellPhone.sqf.

      Wenn probleme auftretten helfe ich euch gerne.

      MfG
      Noldy

      Dateien

      Cell Phone Battery.zip 2,76 kB – 175 Downloads

    • MauGi_LP
      Fortgeschrittener
      Reaktionen
      57
      Trophäen
      9
      Beiträge
      374
      • 7. November 2017 um 22:39
      • #2
      Zitat von Noldy

      Hallo,
      Mein erstes Tutorial hier.

      In diesem Tutorial zeige ich euch, wie ihr unter eurem leben Icon eine Batterie einfügt.

      !!Wenn ihr das SQL Smartphone habt, dann fügt die dateien wie normal in der Anleitung ein und ändert eine datei nach folgendem Post ab:!!

      Only 4 GG User

      [hide]

      fn_callCellPhone.sqf

      Spoiler anzeigen

      /*
      Cell Phone Battery script by KampfKuerbisHD
      */

      if(life_battery < 2) exitWith {hint "Deine Batterie ist leer."};
      createDialog "Life_my_smartphone";

      !!Das Rot markierte bitte vollständig ersetzen.!!

      unbenannt2229bx52.jpg

      (Das Rot geschriebene hinzufügen/ersetzen)

      Dann legen wir mal los

      1. core\functions\fn_hudUpdate.sqf

      Spoiler anzeigen

      /*
      /*
      File: fn_hudUpdate.sqf
      Author: Bryan "Tonic" Boardwine

      Description:
      Updates the HUD when it needs to.
      */
      private["_ui","_food","_water","_health","_battery"];
      disableSerialization;

      _ui = uiNameSpace getVariable ["playerHUD",displayNull];
      if(isNull _ui) then {[] call life_fnc_hudSetup;};
      _food = _ui displayCtrl 23500;
      _water = _ui displayCtrl 23510;
      _health = _ui displayCtrl 23515;
      _battery = _ui displayCtrl 23520;

      //Update food
      _food ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.548];
      _food ctrlSetText format["%1", life_hunger];
      _food ctrlCommit 0;
      //Update Water
      _water ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.502];
      _water ctrlSetText format["%1", life_thirst];
      _water ctrlCommit 0;
      //Update Health
      _health ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.456];
      _health ctrlSetText format["%1", round((1 - (damage player)) * 100)];
      _health ctrlCommit 0;
      //Update battery
      _battery ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.410];
      _battery ctrlSetText format["%1", life_battery];
      _battery ctrlCommit 0;

      2. core\init_survival.sqf

      Spoiler anzeigen

      [] spawn {
      private["_fnc_food","_fnc_water","_fnc_battery"];
      _fnc_food =
      {
      if(life_hunger < 2) then {player setDamage 1; hint "Du bist verhungert.";}
      else
      {
      life_hunger = life_hunger - 10;
      [] call life_fnc_hudUpdate;
      if(life_hunger < 2) then {player setDamage 1; hint "Du bist verhungert.";};
      switch(life_hunger) do {
      case 30: {hint "Du hast eine Weile nichts gegessen, du solltest schnell etwas finden!";};
      case 20: {hint "Du hast angefangen zu verhungern, du musst etwas zu essen finden ansonsten wirst du sterben.";};
      case 10: {hint "Du wirst nun zu Tode hungern, du wirst sehr bald sterben, falls du nichts essen solltest";player setFatigue 1;};
      };
      };
      };

      _fnc_water =
      {
      if(life_thirst < 2) then {player setDamage 1; hint "Du bist Ausgetrocknet.";}
      else
      {
      life_thirst = life_thirst - 10;
      [] call life_fnc_hudUpdate;
      if(life_thirst < 2) then {player setDamage 1; hint "Du bist Ausgetrocknet.";};
      switch(life_thirst) do
      {
      case 30: {hint "Du hast eine Weile nichts getrunken, du solltest bald etwas finden.";};
      case 20: {hint "Du hast eine lange Zeit nichts getrunken, du solltest bald etwas zu trinken finden oder du wirst wegen Austrocknung sterben."; player setFatigue 1;};
      case 10: {hint "Du leidest unter schwerer Austrocknung, du solltest schnell etwas trinken!"; player setFatigue 1;};
      };
      };
      };

      _fnc_battery =
      {
      if(life_battery < 2) then {hint "Your battery is empty.";}
      else
      {
      life_battery = life_battery - 5;
      [] call life_fnc_hudUpdate;
      if(life_battery < 2) then {hint "Your battery is empty.";};
      switch(life_battery) do
      {
      case 30: {hint "Message if is battery 30%. (you can remove this line)";};
      case 20: {hint "Message if is battery 20%. (you can remove this line)";};
      case 10: {hint "Message if is battery 10%. (you can remove this line)";};
      };
      };
      };

      while{true} do
      {
      sleep 600;
      [] call _fnc_water;
      sleep 10;
      [] call _fnc_battery;
      sleep 250;
      [] call _fnc_food;
      };
      };

      3. dialog\player_sys.sqf

      Spoiler anzeigen

      #define playersys_DIALOG 2001
      #define money_text 2002
      #define water_text 2003
      #define food_text 2004
      #define item_list 2005
      #define player_list 2006
      #define money_value 2007
      #define rogue_text 2008
      #define carry_weight 2009
      #define item_edit 2010
      #define battery_text 2011

      4. dialog\player_inv.hpp und suche "class ButtonCell"

      Spoiler anzeigen

      class ButtonCell : Life_RscButtonMenu {
      idc = 2014;
      text = "$STR_PM_CellPhone";
      onButtonClick = "[] call life_fnc_callCellPhone";
      x = 0.42 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH));
      y = 0.8 - (1 / 25);
      w = (6.25 / 40);
      h = (1 / 25);
      };

      5. dialog\ui.hpp

      Spoiler anzeigen

      class playerHUD
      {
      idd=-1;
      movingEnable=0;
      fadein=0;
      duration = 99999999999999999999999999999999999999999999;
      fadeout=0;
      name="playerHUD";
      onLoad="uiNamespace setVariable ['playerHUD',_this select 0]";
      objects[]={};

      class controlsBackground
      {
      class foodHIcon : life_RscPicture
      {

      idc = -1;
      text = "icons\food.paa";
      x = safeZoneX+safeZoneW-0.115; y = safeZoneY+safeZoneH-0.54;
      w = 0.03; h = 0.04;
      };

      class waterHIcon : life_RscPicture
      {

      idc = -1;
      text = "icons\water.paa";
      x = safeZoneX+safeZoneW-0.12; y = safeZoneY+safeZoneH-0.50;
      w = 0.04; h = 0.04;
      };

      class healthHIcon : life_RscPicture
      {

      idc = -1;
      text = "icons\health.paa";
      x = safeZoneX+safeZoneW-0.11; y = safeZoneY+safeZoneH-0.445;
      w = 0.02; h = 0.03;
      };

      class batteryHIcon : life_RscPicture
      {

      idc = -1;
      text = "icons\battery.paa";
      x = safeZoneX+safeZoneW-0.11; y = safeZoneY+safeZoneH-0.40;
      w = 0.02; h = 0.03;
      };
      };

      class controls
      {
      class foodtext
      {
      type=0;
      idc=23500;
      style=0;
      x=-1;
      y=-1;
      w=0.3;
      h=0.05;
      sizeEx=0.03;
      size=1;
      font="PuristaSemibold";
      colorBackground[]={0,0,0,0};
      colorText[] = { 1 , 1 , 1 , 1 };
      shadow=true;
      text="";
      };

      class watertext
      {
      type=0;
      idc=23510;
      style=0;
      x=-1;
      y=-1;
      w=0.3;
      h=0.05;
      sizeEx=0.03;
      size=1;
      font="PuristaSemibold";
      colorBackground[]={0,0,0,0};
      colorText[] = { 1 , 1 , 1 , 1 };
      shadow=true;
      text="";
      };

      class healthtext
      {
      type=0;
      idc=23515;
      style=0;
      x=-1;
      y=-1;
      w=0.3;
      h=0.05;
      sizeEx=0.03;
      size=1;
      font="PuristaSemibold";
      colorBackground[]={0,0,0,0};
      colorText[] = { 1 , 1 , 1 , 1 };
      shadow=true;
      text="";
      };

      class batterytext
      {
      type=0;
      idc=23520;
      style=0;
      x=-1;
      y=-1;
      w=0.3;
      h=0.05;
      sizeEx=0.03;
      size=1;
      font="PuristaSemibold";
      colorBackground[]={0,0,0,0};
      colorText[] = { 1 , 1 , 1 , 1 };
      shadow=true;
      text="";
      };
      };
      };

      6. core\configuration.sqf

      Spoiler anzeigen

      #include <macro.h>
      /*
      Master Life Configuration File
      This file is to setup variables for the client, there are still other configuration files in the system

      *****************************
      ****** Backend Variables *****
      *****************************
      */
      life_query_time = time;
      life_action_delay = time;
      life_trunk_vehicle = Objnull;
      life_session_completed = false;
      life_garage_store = false;
      life_session_tries = 0;
      life_net_dropped = false;
      life_hit_explosive = false;
      life_siren_active = false;
      life_clothing_filter = 0;
      life_clothing_uniform = -1;
      life_redgull_effect = time;
      life_is_processing = false;
      life_bail_paid = false;
      life_impound_inuse = false;
      life_action_inUse = false;
      life_spikestrip = ObjNull;
      life_respawn_timer = 35;
      life_has_insurance = false;
      life_knockout = false;
      life_interrupted = false;
      //Uniform price (0),Hat Price (1),Glasses Price (2),Vest Price (3),Backpack Price (4)
      life_clothing_purchase = [-1,-1,-1,-1,-1];
      /*
      *****************************
      ****** Weight Variables *****
      *****************************
      */
      life_maxWeight = 24; //Identifies the max carrying weight (gets adjusted throughout game when wearing different types of clothing).
      life_maxWeightT = 24; //Static variable representing the players max carrying weight on start.
      life_carryWeight = 0; //Represents the players current inventory weight (MUST START AT 0).

      /*
      *****************************
      ****** Food Variables *******
      *****************************
      */
      life_eat_Salema = 40;
      life_eat_Ornate = 20;
      life_eat_Mackerel = 20;
      life_eat_Tuna = 100;
      life_eat_Mullet = 30;
      life_eat_CatShark = 60;
      life_eat_Rabbit = 20;
      life_eat_Apple = 5;
      life_eat_turtlesoup = 62;
      life_eat_donuts = 30;

      /*
      *****************************
      ****** Life Variables *******
      *****************************
      */
      life_net_dropped = false;
      life_hit_explosive = false;
      life_siren_active = false;
      life_bank_fail = false;
      life_use_atm = true;
      life_is_arrested = false;
      life_delivery_in_progress = false;
      life_action_in_use = false;
      life_thirst = 100;
      life_hunger = 100;
      life_battery = 50;
      life_paycheck_period = 5;
      life_cash = 0;
      life_impound_car = 350;
      life_impound_boat = 250;
      life_impound_air = 850;
      life_istazed = false;
      life_my_gang = ObjNull;

      [...]

      7. Functions.h und finde "class Functions"

      Spoiler anzeigen

      class Functions
      {
      file = "core\functions";
      class calWeightDiff {};
      class fetchCfgDetails {};
      class handleInv {};
      class hudSetup {};
      class hudUpdate {};
      class fetchGear{};
      class tazeSound {};
      class animSync {};
      class simDisable {};
      class keyHandler {};
      class dropItems {};
      class handleDamage {};
      class numberText {};
      class handleItem {};
      class accType {};
      class onPlayerDisconnect {};
      class onDeath {};
      class onRespawn {};
      class receiveItem {};
      class giveDiff {};
      class receiveMoney {};
      class playerTags {};
      class clearVehicleAmmo {};
      class pulloutVeh {};
      class nearUnits {};
      class fedSuccess {};
      class actionKeyHandler {};
      class autoSave {};
      class TBHreloader {};
      class updateCash {};
      class vehicleGarage {};
      class holsterHandgun {};
      class CarLockSound {};
      class CarUnlockSound {};
      class callCellPhone {};
      };

      Nun ist der Batterie Script fertig.

      Jetzt fügen wir noch die Batterie in den Markt.

      1. core\config\fn_varHandle.sqf
      Adde bei "case 0":

      Spoiler anzeigen

      case "battery": {"life_inv_battery"};


      Adde bei "case 1":

      Spoiler anzeigen

      case "life_inv_battery": {"battery"};

      2. core\config\fn_itemWeight.sqf
      Adde:

      Spoiler anzeigen

      case "battery": {1};

      3. core\config\fn_varToStr.sqf
      Adde

      Spoiler anzeigen

      case "life_inv_battery": {"Cell Phone Battery"};

      4. core\configuration.sqf
      Adde bei "life_inv_items" das:

      Spoiler anzeigen

      "life_inv_battery"


      Adde in "sell_array" das:

      Spoiler anzeigen

      ["battery",750]


      Adde in "buy_array" das:

      Spoiler anzeigen

      ["battery",1500]

      5. core\config\fn_virt_shops.sqf
      Adde in "case "market"" das:

      Spoiler anzeigen

      {["Altis Market",["battery"]]};


      Das ganze müsste da so aussehen ungefär

      Spoiler anzeigen

      case "market": {["Altis Market",["water","rabbit","redgull","tbacon","lockpick","battery","pickaxe","axt","fuelF","pfandflasche","openkokos","storage2"]]};

      6. core\pmenu\useItem.sqf
      Adde das hinzu

      Spoiler anzeigen

      case (_item == "battery"):
      {
      if(([false,_item,1] call life_fnc_handleInv)) then
      {
      life_battery = 100;
      hint "Your battery is full now.";
      };
      };

      Bitte achtet gut, das wenn ihr wo was hinzufügt auf die komas (,) zu achten.
      Das letzte darf nie ein (,) haben, jedoch obendrüber alle.

      Das war es schon. Nun hat euer Handy einen Akku.

      Sollte der Akku mal leer sein, könnt ihr das Handy nicht mehr benutzen bis ihr im Markt eine neue Batterie kauft. ^^

      Original Thread: (English) [HOWTO] Add Cell Phone Battery [3.1.2 / 3.1.3] - Editing Docs - Altis Life RPG

      Im anhang habe ich noch 2 sachen eingefügt, die ihr in euer FTP laden müsst.
      Das Icon, und die fn_callCellPhone.sqf.

      Wenn probleme auftretten helfe ich euch gerne.

      MfG
      Noldy

      Alles anzeigen

      sry für meine inkompitenz aber ist das jetzt für das normale oder für das SQL smartphone und wenn es für das SQL ist das muss ich erstzen?

    • Brizi Jaeger
      Profi
      Reaktionen
      291
      Trophäen
      11
      Beiträge
      1.025
      • 7. November 2017 um 22:43
      • #3

      wäre eig nur so dann halt :

      Code
      /*
      Cell Phone Battery script by KampfKuerbisHD // http://www.youtube.com/kampfkuerbishd
      */
      
      if(life_battery < 2) exitWith {hint "Your battery is empty."};
      createDialog ""Life_my_smartphone"";
    • lordbrs
      Fortgeschrittener
      Reaktionen
      18
      Trophäen
      9
      Beiträge
      307
      • 15. Januar 2018 um 18:31
      • #4

      Nettes Tutorial aber vielleicht wäre es sinnvoll auch Angaben zu machen mit welcher Version das ganze funktioniert, mit der V5.0 geht es nicht.

      Es ist immer doof wenn man mitten im Tutorial darauf kommt das dieses NICHT für die eigene Version geeignet ist und man wieder mal Zeit für unbrauchbares vergeudet hat.

      Das TuT ist zwar sehr nett aufgebaut, jedoch bitte um Angabe von Versionen für die Zukunft, Danke und Gutes Gelingen weiterhin.

      LG

    • Matthias Burns
      Fortgeschrittener
      Reaktionen
      167
      Trophäen
      10
      Beiträge
      317
      Dateien
      1
      Bilder
      31
      • 15. Januar 2018 um 18:36
      • #5
      Zitat von lordbrs

      Nettes Tutorial aber vielleicht wäre es sinnvoll auch Angaben zu machen mit welcher Version das ganze funktioniert, mit der V5.0 geht es nicht.

      Es ist immer doof wenn man mitten im Tutorial darauf kommt das dieses NICHT für die eigene Version geeignet ist und man wieder mal Zeit für unbrauchbares vergeudet hat.

      Das TuT ist zwar sehr nett aufgebaut, jedoch bitte um Angabe von Versionen für die Zukunft, Danke und Gutes Gelingen weiterhin.

      LG

      Wenn ich mich nicht irre, war dieses Tutorial vor der Neuen Forenfunktion (Labels und so ^^)...

      Denke das es dann keiner editiert hat.
      Ich würde einfach mal behaupten, das es nur unter der 3.1.48 so funktioniert.
      Für andere Versionen musst du es umschreiben.

    Registrieren oder Einloggen

    Du bist noch kein Mitglied von Native-Servers.com? Registriere dich kostenlos und werde Teil einer großartigen Community!

    Benutzerkonto erstellen

    Tags

    • handy
    • akku
    • handyakku
    • handy akku

    Wichtige Links & Informationen

    Server & Hosting-Ressourcen

      Server Administration & Hosting Basics

      Windows Server Support & Guides

      Linux Server Configuration & Help

      Setting up TeamSpeak 3 & VoIP Servers

      Domains & Web Hosting for Beginners & Professionals

      Cloud Hosting, Docker & Kubernetes Tutorials

    Gameserver & Modding-Ressourcen

      ArmA 3 Tutorials & Script Collection

      Renting & Operating Gameservers

      DayZ Server Management & Help

      FiveM (GTA V) Server & Script Development

      Rust Server Modding & Administration

      Setting up & Optimizing ARK Survival Servers

    NodeZone.net – Deine Community für Gameserver, Server-Hosting & Modding

      NodeZone.net ist dein Forum für Gameserver-Hosting, Rootserver, vServer, Webhosting und Modding. Seit 2015 bietet unsere Community eine zentrale Anlaufstelle für Server-Admins, Gamer und Technikbegeisterte, die sich über Server-Management, Hosting-Lösungen und Spielemodding austauschen möchten.


      Ob Anleitungen für eigene Gameserver, Hilfe bei Root- und vServer-Konfigurationen oder Tipps zu Modding & Scripting – bei uns findest du fundiertes Wissen und praxisnahe Tutorials. Mit einer stetig wachsenden Community findest du hier Antworten auf deine Fragen, Projektpartner und Gleichgesinnte für deine Gaming- und Serverprojekte. Schließe dich NodeZone.net an und werde Teil einer aktiven Community rund um Server-Hosting, Gameserver-Management und Modding-Ressourcen.

    Wer jetzt nicht teilt ist selber Schuld:
    1. Nutzungsbestimmungen
    2. Datenschutzerklärung
    3. Impressum
    4. Urheberrechts- oder Lizenzverstoß melden
  • Trimax Design coded & layout by Gino Zantarelli 2023-2025©
    Community-Software: WoltLab Suite™