Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/15/2019 in all areas

  1. 1 point
    Thanks for the aimbot script 😂
  2. 0 points
    SEATBELTS handledamage: by Snipes mad dialog, eventHandlers, addaction, etc: by Repentz This script allows you to put on/take off your seatbelt when inside a vehicle, I have also fixed the problem of the seatbelt not disabling when exiting your vehicle Currently, the seatbelt reduces crash damage by 50%, I would put in an ejection function, but arma 3 desync leads to the script thinking you have crashed and ejecting you. Let's begin Go into core/Configuration.sqf, place this in the variables: life_seatbelt = false; Next, let's go into core/setupActions.sqf, place this at the very bottom to enable for all sides: life_actions pushBack (player addAction["<t color = '#D660D6'>Put on Seatbelt</t>",life_fnc_seatbelt,"",7,false,false,"",' !life_seatbelt && vehicle player != player ']); life_actions pushBack (player addAction["<t color = '#D660D6'>Remove Seatbelt</t>",life_fnc_seatbelt,"",7,false,false,"",' life_seatbelt && vehicle player != player ']); Go into core/functions/handleDamage.sqf, place this near the bottom before hudUpdate if ((vehicle _unit) isKindOf "Car" && (isNull _source || _source isEqualTo _unit)) then { _damage = if (life_seatbelt) then { _damage / 2 } else { _damage}; }; Create a file in core/functions called fn_seatBelt.sqf: /* //--By Repentz for altisLifeRPG */ #include "..\..\script_macros.hpp" /* fn_seatBelt.sqf */ //playSound "seatbelt"; //--Enable this to play a sound when you put your seatbelt on if(!life_seatbelt) then { life_seatbelt = true; } else { life_seatbelt = false; }; //[] call life_fnc_hudUpdate; //--Enable this if you are putting a hud option to display when your seatbelt is on. Go into functions.hpp in main directory, find functions section, add this: class seatbelt {}; Go into initPlayerLocal in your main directory, add this after "if (LIFE_SETTINGS(getNumber,"spyGlass_toggle") isEqualTo 1) then {[] execVM "SpyGlass\fn_initSpy.sqf";};" if (hasInterface) then { player addEventHandler ["GetOutMan", { life_seatbelt = false; //[] call life_fnc_hudUpdate; //--Enable if you are putting a hud option to display when your seatbelt is on }]; }; if (hasInterface) then { player addEventHandler ["GetInMan", { life_seatbelt = false; //[] call life_fnc_hudUpdate; //--Enable if you are putting a hud option to display when your seatbelt is on }]; }; Optional: If you want to have a icon display when you're inside your vehicle, and your seatbelt is on or off, put this in your hud_stats.hpp: #define IDC_LIFE_BAR_SeatBelt 4203 then LIFE_BAR_SeatBelt then class LIFE_BAR_SeatBelt: Life_RscPicture { idc = IDC_LIFE_BAR_SeatBelt; text = ""; x = 0.952292 * safezoneW + safezoneX; y = 0.664333 * safezoneH + safezoneY; w = 0.0331042 * safezoneW; h = 0.0589743 * safezoneH; }; This is still for optional icon display, go into hudUpdate: #define IDC_LIFE_BAR_SeatBelt 4203 then if(!isNil "life_seatbelt") then { if ( vehicle player != player ) then { if(life_seatbelt) then { LIFEctrl(IDC_LIFE_BAR_SeatBelt) ctrlSetText "rg_client\HUD\seatbeltOn.paa"; } else { LIFEctrl(IDC_LIFE_BAR_SeatBelt) ctrlSetText "rg_client\HUD\seatbeltOff.paa"; }; } else { LIFEctrl(IDC_LIFE_BAR_SeatBelt) ctrlSetText ""; }; }; You will have to find your own icons, sounds, and position the icon wherever you wish if you want these features, also remember for the seatbelt sound to call it in description.ext as a new sound. Done.
  3. 0 points
×
×
  • Create New...