Author: Cheetah
Author Website: http://www.ofpec.com

Requirements: No addons required

Version: 1.03

Short description:

Date: 2007-10-08 09:55


Comments: (1)
Rating:



 







Holster Script
by
Cheetah


Description:
Ever got to the point where you made an undercover mission and got frustrated because of the lack of an option to hide pistols?
Then use this script to allow the player to holster and unholster his pistol! See below on how to get some output to check if the player has his weapon holstered or not.


Usage:
Activate the main script, gunControl.sqf with:
script = [] execVM "gunControl.sqf";
This code should be put in the init.sqs or any other initialization.

If you want to check if a pistol is hidden, access the boolean found in the saveWeapon array. To make it visible, use the following code:
hint format ["%1",saveWeapon select 1];
If you need the value in a script, use: saveWeapon select 1, and it will return true (holstered) or false (unholstered).

Easy to use in undercover missions, to trigger or not to trigger the alarm. An example is added to show how you can make a unit hostile and not hostile depending on
the weapon draw or hidden.


Credits:

-Thanks Mandoble, for your great advice to bundle it all into a single file!
-Thanks Spooner, for showing how to use the config file to check if a player has a pistol!


Version:
v1.03
- Improved demo mission, now shows how to switch between hostile / friendly status

v1.02
- Improved pistol information gaining (config >> pistolcore)
- Fixed bug where taking a pistol while holstered resulted in problems

v1.01
- Changed three file method to one file, thanks to helpful comments from Mandoble
- Fixed bug concerning additional weapons
- Improved structure/syntax

v1.00
- Release


Forum topic:
- OFPEC.com




Enable javascript to be able to download from Armaholic please!



Tags: No tags