Jump to content
Sign in to follow this  
eagledude4

[Release] A More compact/scripter friendly Holster Script

Recommended Posts

I made this script because the holster script I was using before (can be found HERE was a bit complicated, unintuitive and an exploit existed where you could duplicate your weapon. This script fixes these issues and is more intuitive.

The functions can be applied through actions, key presses, etc.

Download

Requirements: CBA

Setup:

1. Define the below variables where you initialize your mission:

HasPistol = false;
Holster = false;

2. Preprocess the script where you initialize your mission:

_h = execVM "Functions\FNC_Holster.sqf";
waitUntil {scriptDone _h};
preprocessFile "Functions\FNC_Holster.sqf";

3. Include the below code in a script that loops.

["Check"] call ED_Holster;

How to use:

To Holster:

["Holster"] call ED_Holster;

To Unholster:

["Unholster"] call ED_Holster;

Examples:

1. Spawn with a specific holstered weapon:

Holster = true;
player setVariable ["Pistol", "rh_mp7p", true];

2. Holstering through actions (Requires Holster.sqf):

HolsterAction1 = player addaction ["Holster Pistol","Scripts\Holster.sqf","Holster",1,false,true,"",'HasPistol and !Holster'];
HolsterAction2 = player addaction ["Unholster Pistol","Scripts\Holster.sqf","Unholster",1,false,true,"",'Holster'];

Holster.sqf:

_Sel = _this select 3;
[_Sel] call ED_Holster;

This is my first release so constructive criticism is appreciated!

Edited by eagledude4

Share this post


Link to post
Share on other sites

@Horner:Thanks, I did the script a couple weeks back but I only just decided to release it :P

@Foxhound: Thanks for doing that!! Just some small issues though:

1. In the quote on that first page, the "HERE" doesn't have a link set.

2. On the actual page, issue #1 is present also.

Edited by eagledude4

Share this post


Link to post
Share on other sites

I don´t understand how to install it, would be cool if someone made a video on how to install this script...

 

 

 

 

 

Nvm just realised this was for arma 2....

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×