Author: eagledude4
Author Website:

Requirements: Community Base Addons

Version: 1.0

Short description: A More compact/scripter friendly Holster Script

Date: 2013-02-25 21:31


Comments: (0)
Rating:



 

Holster Script

by
eagledude4


Description:
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 can is more intuitive.

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

This is my first release so constructive criticism is appreciated!


Installation / Usage:
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;
To Holster:
["Holster"] call ED_Holster;
To Unholster:
["Unholster"] call ED_Holster;

Example:
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;


Forum topic:
- BI forums



- Community Base Addons




Enable javascript to be able to download from Armaholic please!



Tags: Holster