Jump to content

[XaFlaForo Studios] SeatBelt System [Script]

Recommended Posts

Who we are:
Here at XaFlaForo Studios, we strive for perfection in our work. We work day in, day out, weekdays, weekends, to ensure quality in our products. Over the coming weeks we will be dropping a lot of products in to this forum that are remakes of popular scripts but they will be for free.

Why do we release this stuff for free:
Here at XaFlaForo Studios, our ethos is that Arma scripts should be readily available for the whole community to enjoy, instead of being cast away behind the ever-growing pay wall that we all love to hate. We are proud that we strive to give the community scripts without hiding them behind a paywall for only the most premium, as it bring the community closer together making Arma all that more enjoyable and you can learn from our scripts as they are not obfuscated.

Want free custom work?

How to support us?
Follow me on github - https://github.com/XaFlaForo
Add me on steam - https://steamcommunity.com/id/XaFlaForo

Post Details:
Script Name: Seat Belt
Framework: All
Inspired/Wanted From: Myself

How to download:
        - Base https://github.com/XaFlaForo/AltisLifeScripts/tree/Base-Installation-Pack
        - Files https://github.com/XaFlaForo/Altis-Life-Seatbelt-System

How to install:

STEP 1: Move the seat belts folder to XaFlaForo Folder

STEP 2: Add the following code to Config_Functions.hpp Under tag = "XaFlaForo";

   class Belts {
    file = "XaFlaForo\SeatBelts";
    class seatbeltaction {};
    class seatbeltOff {};
    class seatbeltOn {};

STEP 3: Add the following code to Config_RemoteExec.hpp 

//--- XaFlaForo SeatBelts
player addEventHandler ["GetInMan", {XaFlaForo_seatbelt = false;}];
player addEventHandler ["GetOutMan", {XaFlaForo_seatbelt = false;}];

STEP 4: Add the following code to keyhandler

//--- END KEY 

case 207: { 
if (vehicle player != player) then { 
[] spawn IRT_fnc_seatbeltaction; 

STEP 5: Add the following code to handle_damage

//--- Seatbelt on so take off seatbelt
if ( vehicle _unit isKindOf "Car" && { isNull _source } || { _source isEqualTo _unit } ) then {

    //--- Seatbelt on
    if ( XaFlaForo_seatbalt ) then {

        //--- Divide Damage in Half
        _damage = _damage / 2;

        //--- Damage gotten is less then current damage
        if ( _damage < _currentDamage ) then {

            //--- Set damage to current damage
            _damage = _currentDamage;





  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...