Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/14/2020 in all areas

  1. Cheers, I came from Native-Network and want to share this Tutorial for ya. I ever read time by time that there is some trouble with inserting the 4th Fraction. Well this Tutorial worked for 100%. If there will be a post with "...dont run at 5.0" or " Player sending Request UID to Server " then please repeat the steps or stop your addiction to Crystal Meth. Well lets begin: Script : Insert 4th Fraction of Altis Life Version: Altis Life 5.0 Diffyculty : Harder then my Cock - Please look where you must insert the Codes. Open your Config_Master.hpp and insert : bank_adac = 3000; //Bank Opfor paycheck_adac = 300; //Paycheck Opfor Open your core/init.sqf and complete : case east: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_adac"); }; case east: { //Initialize Adac and blah _handle = [] spawn life_fnc_initAdac; waitUntil {scriptDone _handle}; }; Open /core/shops/fn_atmmenu.sqf case east: {_type = "Adac"}; Open /core/session/fn_updaterequest.sqf _flag = switch(playerSide) do {case west: {"cop"}; case civilian: {"civ"}; case independent: {"med"}; case east: {"adac"};}; Open /core/session/fn_requestreceived.sqf case east: { CONST(life_adacLevel,(_this select 7)); CONST(life_coplevel,0); if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then { life_hunger = ((_this select 9) select 0); life_thirst = ((_this select 9) select 1); }; }; Open /core/session/fn_updatePartial.sqf _flag = switch(playerSide) do {case west: {"cop"}; case civilian: {"civ"}; case independent: {"med"}; case east: {"adac"};}; Open /core/medical/fn_respawned.sqf //Load gear for a 'new life' case east: { _handle = [] spawn life_fnc_adacLoadout; } Open your /Functions.hpp Under Class Master Directory class initAdac {}; and complete the class with: class Adac { file = "core\adac"; class adacLoadout {}; class adacMarkers {}; }; Open /dialog/function/fn_spawnpointcfg.sqf case east: {"Adac"}; Open Config_Spawnpoints.hpp class adac { class Kavala { displayName = "Adac HQ"; spawnMarker = "adac_spawn_1"; icon = "\a3\ui_f\data\map\MapControl\watertower_ca.paa"; conditions = ""; }; Open /core/pmenu/fn_p_updatemenu.sqf _side = switch (playerSide) do {case west:{"cop"}; case civilian:{"civ"}; case independent:{"med"};case east:{"adac"};}; Open /core/functions/fn_playerskins.sqf case east: { if (uniform player isEqualTo "U_Rangemaster") then { player setObjectTextureGlobal [0, "textures\medic_uniform.jpg"]; }; }; Open /Core/pmenu/fn_cellphone.sqf case east: {"adac"}; Create a file named "fn_initadac.sqf" and place in in your core #include "..\script_macros.hpp" /* File: fn_initAdac.sqf Author: Bryan "Tonic" Boardwine Description: Initializes the adac.. */ private["_end"]; player addRating 99999999; waitUntil {!(isNull (findDisplay 46))}; //Hier wird geblacklisted if ((FETCH_CONST(life_adacLevel)) < 1 && (FETCH_CONST(life_adminlevel) isEqualTo 0)) exitWith { ["Notwhitelisted",FALSE,TRUE] call BIS_fnc_endMission; sleep 35; }; [] call life_fnc_spawnMenu; waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done. Create a path and folder like : /core/adac Create a File named "fn_adacloadout.sqf" #include "..\..\script_macros.hpp" /* File: fn_adacLoadout.sqf Author: Bryan "Tonic" Boardwine Edited by: Kuchenplatte Description: Loads the medic out with the default gear. */ private ["_handle"]; _handle = [] spawn life_fnc_stripDownPlayer; waitUntil {scriptDone _handle}; player addUniform "U_Rangemaster"; player addItem "FirstAidKit"; player addItem "Toolkit"; player linkItem "ItemMap"; player linkItem "ItemCompass"; player linkItem "ItemWatch"; [] call life_fnc_playerSkins; [] call life_fnc_saveGear; Create a file named "fn_adacmarkers.sqf" /* File: fn_adacMarkers.sqf Author: - Description: Marks adac on the map for other adac. Only initializes when the actual map is open. */ private["_markers","_adac"]; _markers = []; _adac = []; sleep 0.5; if(visibleMap) then { {if(side _x == east) then {_adac pushBack _x;}} foreach playableUnits; //Fetch list of adac / opfor //Create markers { if(_x != player) then { _marker = createMarkerLocal [format["%1_marker",_x],visiblePosition _x]; _marker setMarkerColorLocal "ColorOPFOR"; _marker setMarkerTypeLocal "Mil_dot"; _marker setMarkerTextLocal format["%1", _x getVariable["realname",name _x]]; _markers pushBack [_marker,_x]; }; } foreach _adac; while {visibleMap} do { { private["_marker","_unit"]; _marker = _x select 0; _unit = _x select 1; if(!isNil "_unit" && !isNull _unit) then { _marker setMarkerPosLocal (visiblePosition _unit); }; } foreach _markers; if(!visibleMap) exitWith {}; sleep 0.02; }; {deleteMarkerLocal (_x select 0);} foreach _markers; _markers = []; _adac = []; }; Whooop! This was the Mission Step...your balls are sweating? No? Okay letz go to @Life_Server Open your Life_Server/init.sqf and complete the following: life_adacLevel = 0; life_radio_east = radioChannelCreate [[0, 0.95, 1, 0.8], "Side Channel", "%UNIT_NAME", []]; Open your "fn_insertRequest.sqf" //Prepare the query statement.. _query = format ["INSERT INTO players (pid, name, cash, bankacc, aliases, cop_licenses, med_licenses, civ_licenses, civ_gear, cop_gear, med_gear, adac_gear, adac_licenses) VALUES('%1', '%2', '%3', '%4', '%5','""[]""','""[]""','""[]""','""[]""','""[]""','""[]""','""[]""','""[]""')", _uid, _name, _money, _bank, _alias ]; Open your "fn_queryRequest.sqf" and complete it with: //East case east: {format["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, adac_licenses, adaclevel, adac_gear, adac_stats, playtime FROM players WHERE pid='%1'",_uid];}; case east: { //Pa* * e Stats _new = [(_queryResult select 9)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _queryResult set[9,_new]; //Playtime _new = [(_queryResult select 10)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _index = TON_fnc_playtime_values_request find [_uid, _new]; if (_index != -1) then { TON_fnc_playtime_values_request set[_index,-1]; TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1]; TON_fnc_playtime_values_request pushBack [_uid, _new]; } else { TON_fnc_playtime_values_request pushBack [_uid, _new]; }; [_uid,_new select 1] call TON_fnc_setPlayTime; }; Open your "fn_updateRequest.sqf" and complete it with : case east: {_playtime_update set[1,_playtime];}; case east: {_query = format["UPDATE players SET name='%1', cash='%2', bankacc='%3', adac_licenses='%4', adac_gear='%5', adac_stats='%6', playtime='%7' WHERE pid='%8'",_name,_cash,_bank,_licenses,_gear,_stats,_playtime_update,_uid];}; Open your "fn_updatePartial.sqf" and complete it with : case east: {_query = format["UPDATE players SET adac_licenses='%1' WHERE pid='%2'",_value,_uid];}; case east: {_query = format["UPDATE players SET adac_gear='%1' WHERE pid='%2'",_value,_uid];}; Open your "fn_getVehicles.sqf" case east: {"adac"}; Open your "fn_vehiclecreate.sqf" case east: {"adac"}; Open your "fn_spawn_vehicle.sqf" if ((_vInfo select 1) isEqualTo "adac" && (_vInfo select 2) isEqualTo "C_Offroad_01_F") then { [_vehicle,"adac_offroad",true] remoteExecCall ["life_fnc_vehicleAnimate",_unit]; }; Wooohooo , i think we are done...eh..no wait..we need the part of mission.sqm : Spawn : adac_spawn_1 Variable: adac1 ADAC Whitelist 1 MYSQL ALTER TABLE `players` ADD (`adac_licenses` TEXT NOT NULL); ALTER TABLE `players` ADD (`adac_gear` TEXT NOT NULL); ALTER TABLE `players` ADD (`adaclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0'); ALTER TABLE `players` ADD (`adac_stats` VARCHAR(11) NOT NULL DEFAULT '"[100,100]"'); Enjoy it! Best Regards Kuchenplatte
    1 point
  2. Hi guys, my english is not so good sorry. 1.Go into your database and run this code on your sql console. ALTER TABLE `players` ADD COLUMN `example_level` ENUM('0','1','2','3') NOT NULL DEFAULT '0' COLLATE 'latin1_swedish_ci'; 2.Go into life_server\Functions\MySQL\fn_queryRequest.sqf Now, I will add new level to civilian, you can add new level to other sides. Find this code at "fn_queryRequest.sqf" case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime FROM players WHERE pid='%1'",_uid];}; Then, add "example_level" to end. Like this, case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime, example_level FROM players WHERE pid='%1'",_uid];}; Our level is 13rd in query command, this is important for us. Go into your "core\session\fn_requestReceived.sqf" and find "case civilian:" case civilian: { life_is_arrested = _this select 7; CONST(life_coplevel, 0); CONST(life_medicLevel, 0); life_houses = _this select (_count - 3); if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then { life_hunger = ((_this select 9) select 0); life_thirst = ((_this select 9) select 1); player setDamage ((_this select 9) select 2); }; And add "example_level" under medic_level.I wrote "_this select 13" because "example_level" in 13rd place in my "fn_queryRequest.sqf" If you add your new level to other sides, you must write that to the side of you wrote. Like this, case civilian: { life_is_arrested = _this select 7; CONST(life_coplevel, 0); CONST(life_medicLevel, 0); CONST(life_examplelevel,(_this select 13)); life_houses = _this select (_count - 3); if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then { life_hunger = ((_this select 9) select 0); life_thirst = ((_this select 9) select 1); player setDamage ((_this select 9) select 2); }; Finally you can use your level at other scripts. Example, if ((FETCH_CONST(life_examplelevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then { ["NotWhitelisted",false,true] call BIS_fnc_endMission; sleep 35; };
    1 point
  3. NEW LIFE RULE TIMER Credits to Ciaran for original creation of the script This script will display a timer when a player dies that will carry on to their next life, it will last a defined amount of time and will disappear if you are revived. https://gyazo.com/6a126c8ef164998b826a582a68f85367 INSTRUCTIONS Create a .Sqf file called fn_newLifeRule Place the file into your core\medical folder Place this code into the newly created file: /* New Life Rule Timer Released to AltisLifeRPG.com Credits to Ciaran for original creation of the script */ private["_uiDisp","_time","_timer"]; if(playerSide isEqualTo west) exitWith {}; if(playerSide isEqualTo independent) exitWith {}; disableSerialization; 7 cutRsc ["life_nlrtimer","PLAIN"]; _uiDisp = uiNamespace getVariable "life_nlrtimer"; _timer = _uiDisp displayCtrl 38301; _time = time + (10 * 60); life_nlrtimer_running = true; while {true} do { if(isNull _uiDisp) then { 7 cutRsc ["life_nlrtimer","PLAIN"]; _uiDisp = uiNamespace getVariable "life_nlrtimer"; _timer = _uiDisp displayCtrl 38301; }; if(round(_time - time) < 1) exitWith {}; if(life_nlrtimer_stop) exitWith {life_nlrtimer_stop = false;}; _timer ctrlSetText format["NLR: %1",[(_time - time),"MM:SS"] call BIS_fnc_secondsToString]; sleep 0.1; }; life_nlrtimer_running = false; 7 cutText["","PLAIN"]; Go into your functions.hpp in main directory Find class Medical_System { Place this as one of the classes below: class newLifeRule {}; Save and exit Functions.hpp Go into core, open up configuration.sqf Add these two under backend variables where all the other checks are life_nlrtimer_running = false; life_nlrtimer_stop = false; Go into core\medical\fn_revived.sqf and add this to the bottom: life_nlrtimer_stop = true; Save the file and close it Go into core\medical\fn_onPlayerKilled.sqf Find [] spawn life_fnc_deathScreen; Place this code right below it: //Credits to Ciaran for original creation of the script if(life_nlrtimer_running) then { life_nlrtimer_stop = true; waitUntil {!life_nlrtimer_running}; }; [] spawn life_fnc_newLifeRule; Save and exit this file Go into your dialog folder, open progress.hpp At the very bottom, place this code: //Credits to Ciaran for original creation of the script class life_nlrtimer { name = "life_nlrtimer"; idd = 38300; fadeIn = 1; duration = 99999999999; fadeout = 1; movingEnable = 0; onLoad = "uiNamespace setVariable['life_nlrtimer',_this select 0]"; objects[] = {}; class controlsBackground { class TimerIcon : life_RscPicture { idc = -1; text = "\a3\ui_f\data\IGUI\RscTitles\MPProgress\timer_ca.paa"; x = 0.00499997 * safezoneW + safezoneX; y = 0.291 * safezoneH + safezoneY; w = 0.04; h = 0.045; }; class TimerText : life_RscText { colorBackground[] = {0,0,0,0}; idc = 38301; text = ""; x = 0.0204688 * safezoneW + safezoneX; y = 0.2778 * safezoneH + safezoneY; w = 0.09125 * safezoneW; h = 0.055 * safezoneH; }; }; }; Save and exit this file, setup is complete. Let me know if there are any issues.
    1 point
  4. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Difficulty: Easy Publish by: suffer4real Source AltisLifeRPG.com cache -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- hello, Here is a tutorial on how to add ear plugs to your server. Difficulty: Copy & Paste _____________________________________________________________________________________________________________________________________ 1. Navigate to your mission's root and enter core then functions. Open up fn_keyHandler.sqf and paste in the following: case 207: { if(_shift) then { switch (player getVariable["Earplugs",0]) do { case 0: {hintSilent "Ear Plugs 90%"; 1 fadeSound 0.1; player setVariable ["Earplugs", 10]; }; case 10: {hintSilent "Ear Plugs 60%"; 1 fadeSound 0.4; player setVariable ["Earplugs", 40]; }; case 40: {hintSilent "Ear Plugs 30%"; 1 fadeSound 0.7; player setVariable ["Earplugs", 70]; }; case 70: {hintSilent "Ear Plugs Removed"; 1 fadeSound 1; player setVariable ["Earplugs", 0]; }; }; }; }; 1.5. Make sure that your formatting is correct otherwise you will experience some problems... 2. ReCompile your .pbo and restart your server
    1 point
  5. Here is mine updated for carry weight as well.
    1 point
  6. Change this in config master /* Vehicle Purchase Prices */ vehicle_purchase_multiplier_CIVILIAN = 1; //Civilian Vehicle Buy Price = Config_Vehicle price * multiplier vehicle_purchase_multiplier_COP = .0; //Cop Vehicle Buy Price = Config_Vehicle price * multiplier vehicle_purchase_multiplier_MEDIC = .0; //Medic Vehicle Buy Price = Config_Vehicle price * multiplier vehicle_purchase_multiplier_OPFOR = -1; // -- NOT IN USE -- Simply left in for east support. /* Vehicle Rental Prices */ vehicle_rental_multiplier_CIVILIAN = .10; //Civilian Vehicle Rental Price = Config_Vehicle price * multiplier vehicle_rental_multiplier_COP = 0; //Cop Vehicle Rental Price = Config_Vehicle price * multiplier vehicle_rental_multiplier_MEDIC = 0; //Medic Vehicle Rental Price = Config_Vehicle price * multiplier vehicle_rental_multiplier_OPFOR = -1; // -- NOT IN USE -- Simply left in for east support. /* Vehicle Sell Prices */ vehicle_sell_multiplier_CIVILIAN = .4; //Civilian Vehicle Garage Sell Price = Vehicle Buy Price * multiplier vehicle_sell_multiplier_COP = 0; //Cop Vehicle Garage Sell Price = Vehicle Buy Price * multiplier vehicle_sell_multiplier_MEDIC = 0; //Medic Vehicle Garage Sell Price = Vehicle Buy Price * multiplier vehicle_sell_multiplier_OPFOR = -1; // -- NOT IN USE -- Simply left in for east support.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.