Jump to content

Recommended Posts

 

gf-holster-script-version-10-1_4.png

 

GF Holster Script - Mod 

 

by

 

GEORGE FLOROS [GR]

 

With key interaction

 

 

Description:

GF Holster script , holster your weapon with a key interaction , configurable key bindings.
You are free to do anything but i would like to give me Credits for this!
Simple and easy to use and adapt .
Have Fun !

 


Installation / Usage:

For usage instructions and information of how to use the GF Holster script  , please refer to the included documentation and/or example mission.

Place in your mission the files . There is everything included , in the init.sqf , to copy paste in your mission .

 

 

https://community.bistudio.com/wiki/SQF_syntax
Don't try to open this with the simple notepad.

For everything that is with comment // in front or between /*
means that it is disabled , so there is no need to delete the extra lines.

You can open this ex:
with notepad++
https://notepad-plus-plus.org/

and also use the extra pluggins
(this way will be better , it will give also some certain colours to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

For the Compilation List of my GF Scripts , you can search in:

https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/

 

 

Notes:

Configurable key bindings and notification available.
The key bindings can be found here:
https://community.bistudio.com/wiki/DIK_KeyCodes

 

 

Credits & Thanks:

Thanks to All script contributors
Thanks to everyone who tries to do the best for this game!
Thanks to BIS for such a great platform .
Thanks to BIS Community and BIS Community Forums .
Thanks to Armaholic Community and Forums .

 

 

Changelog:

2.0
Fixed working after save in SP + MP.
There is also a Mod version available.

 

v1.0

 

 

Forum topic:
- Armaholic forums http://www.armaholic.com/forums.php?m=posts&q=39896

 


 

Armaholic

download

GF Holster Script - Mod

 

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

I'm gonna say this again...do you even sleep brother?:drinking2:

 

Thank you again for another useful script .

  • Thanks 1
  • Haha 1

Share this post


Link to post
Share on other sites

This is only for players and not AI? 

I don't understand why boheima never put in the ability for the AI to put weapons on there backs or carry weapons across chest like the animation coming down a the ladder.

 

It would be really nice to have patrols walking around with weapons on back or across chest.

 

Bohemia should hire some of you guys to help put basic functionality in the game. Thank you for what you guys do. Avibird

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
6 hours ago, zagor64bz said:

I'm gonna say this again...do you even sleep brother?:drinking2:

 

Thank you Zagor!

 

I have some stuff , that i want to share!

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, avibird 1 said:

This is only for players and not AI? 

I don't understand why boheima never put in the ability for the AI to put weapons on there backs or carry weapons across chest like the animation coming down a the ladder.

 

Thank you avibird 1 !

 

This script is only for players.

 

It would be nice to have theese features that you are saying , as for the AI , i think there are already some codes for this.

I will check and i'll tell you.!

Share this post


Link to post
Share on other sites

There is something similar in Ace that my unit uses, but that doesn't prohibit the throwing of grenades. Does your script prevents grenades being thrown?

  • Like 1

Share this post


Link to post
Share on other sites
35 minutes ago, Hastyace said:

Does your script prevents grenades being thrown?

 

Hello there Hastyace !

 

While you have your weapons holstered , you can also throw grenades .

 

Tell me something , just for the question , if i remember , in the ace you have to hit the key 9 to holster , right?

Generally , is it possible to change the key binding there ?

Share this post


Link to post
Share on other sites
18 hours ago, GEORGE FLOROS GR said:

While you have your weapons holstered , you can also throw grenades .

 

Ah, too bad, ACE3 will also let you throw a grenade with holstered weapons.

 

18 hours ago, GEORGE FLOROS GR said:

Tell me something , just for the question , if i remember , in the ace you have to hit the key 9 to holster , right?

Generally , is it possible to change the key binding there ?

 

Nope, its 0 (zero) but I believe that binding can be changed. I never did BTW.

 

The idea is have visual conformation that a certain soldier with holstered weapons will not be able to misfire of throw a grenade. That has happened many times while I stood on parade with my digital comrades.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Hastyace said:
20 hours ago, GEORGE FLOROS GR said:

While you have your weapons holstered , you can also throw grenades .

 

Ah, too bad, ACE3 will also let you throw a grenade with holstered weapons.

 

This part is for laughs :f: ,  because ,

 

Hastyace , this is what i said also .

 

You can also throw everything , with your weapons holstered.

 

2 hours ago, Hastyace said:

The idea is have visual conformation that a certain soldier with holstered weapons

 

To understand better , you mean that you want a display in your screen , when you holster - unholster  ,

because i have also this feature available in my script . 

 

There is no misfire , << bug >> trowing the grenade with your weapon holster.

 

Generally , if you want ,  i would like you to write down , your opinions and ideas , to make possible change ,

that would get this script better.

 

Thanks Hastyace !

Share this post


Link to post
Share on other sites
4 hours ago, GEORGE FLOROS GR said:

To understand better , you mean that you want a display in your screen , when you holster - unholster  ,

because i have also this feature available in my script . 

 

Erm, I was describing the way ACE3 handles the visual conformation, because when zero is pressed, the soldier will holster its weapon (carry it on his back). The conformation lies in the fact that everyone can see this particular soldier in no way can use his guns. But ACE3 lets the soldier still use grenades and that is something I would like to see being addressed.

 

So, my idea is that Arma would be a lot safer when a soldier holsters his weapon, he is not able to throw a grenade. The animation that goes with it (the visual conformation) can be the one ACE3 uses (carry the gun on back) or something else. I don't mean a conformation on the players screen.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Hastyace said:

ACE3 uses (carry the gun on back)

 

Ok now i understand what  you were saying about ace , ( I haven't play much with this addon ) .

But still why not to be able to throw  something ?

In real actual life holstering your weapon , leaves your hand free to do anything , so why not to be able?

From my view , i would like to see a real simulation of grabing a grenade , pulling out the pin , keep the arming switch pressed and finally throw , with a certain strengh , on a certain distance and all this in a time equal to reallity.

 

Thanks again  Hastyace !

Share this post


Link to post
Share on other sites

@Hastyace - Isn't that standard A3 behaviour as well? Here is a quick solution (work-around) - if I have understood correctly.

player setVariable ["weaponHolstered", true];
player addMagazine "HandGrenade";
[] spawn
{
	throwKeyEH = (findDisplay 46) displayAddEventHandler ["KeyDown",
	{
		if (param [1] == (actionKeys "Throw" select 0) && player getVariable "weaponHolstered") then // change getVariable to whatever condition you need
		{
			hintSilent "Throw is blocked when your weapon is holstered.";
			true
		} else
		{
			false
		};
	}];
};

NOTE: Keep in mind that this will only block the first set key. You can tweak to loop through all though, pretty easy.

30 minutes ago, GEORGE FLOROS GR said:

But still why not to be able to throw  something ?

@GEORGE FLOROS GR - Maybe because the grenade is thrown in some kind of set position if nothing is in hand. Just guessing but this is one annoying thing imo.

  • Thanks 1

Share this post


Link to post
Share on other sites
7 minutes ago, HazJ said:

if nothing is in hand

i can still throw a grenade.

 

I didn't perfectly understand , if in the ace this action is blocked.

Share this post


Link to post
Share on other sites

This will stop both, at least it should.

  • Like 1

Share this post


Link to post
Share on other sites
8 minutes ago, HazJ said:

This will stop both, at least it should.

 

Thanks!

But .. for me , i don't want to! :f:

Share this post


Link to post
Share on other sites

Maybe make it an option? You have shared it with the community after all. input/suggestions. I am not sure if @Hastyace was referring to this anyway.

  • Thanks 1

Share this post


Link to post
Share on other sites
5 minutes ago, HazJ said:

Maybe make it an option?

 

Sure , i will also incude this , as an option , in the next update !

Because ,there will be guys who want this.

Thank you very much for sharing!

Share this post


Link to post
Share on other sites

Maybe I haven't been clear enough. Picture the situation where a group of soldiers is standing on parade. How bad would it be if one of the soldiers - by accident! - is throwing a grenade (it doesn't matter if the grenade is lethal or non-lethal, it is de interruption that breaks), killing all his comrades?

It is not my intention to stop the throwing of grenades, only in this particular situation.

To look and see that no one is able to throw grenades in that situation, it would be handy to have some sort of visual conformation, while looking at this group of soldiers. One conformation could be the carrying of the weapon on the back. Alas, Ace caters for this but Ace also allows the throwing of grenades, even if the soldiers are not able to shoot. Their weapons are on their back, after al.

 

@HazJ I will pass your code to our missions makers to see if that can be implemented on our missions. Thanks for your work!

  • Like 2

Share this post


Link to post
Share on other sites

any way to turn off the default keybind (Open Menu (Status)) from key 5?

  • Like 1

Share this post


Link to post
Share on other sites

Return false in the KeyDown EH.

... displayAddEventHandler ["KeyDown",
{
	// code
	// code
	// code
	false // This will stop default behaviour
}];

 

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, HazJ said:

Return false in the KeyDown EH.


... displayAddEventHandler ["KeyDown",
{
	// code
	// code
	// code
	false // This will stop default behaviour
}];

 

were should i change?

Quote

(findDisplay 46) displayAddEventHandler ["KeyDown", {
    if(_this select 1 == 0x06) // key 5        DIK_5
    then {
    _Holster_Weapon_ctrl = (_this select 0) displayCtrl 9001;
    if(isNull(_Holster_Weapon_ctrl)) then {
    _Holster_Weapon_ctrl = (_this select 0) ctrlCreate ["RscText", 9001];
    _Holster_Weapon_ctrl ctrlShow false;

   

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, brunohxcx said:

any way to turn off the default keybind (Open Menu (Status)) from key 5?

 

Hello there brunohxcx !

 

Just in order to understand better,

 

do you want just to change the key bind interaction for holstering ?

or you want to disable the game default menu?

 

( when pressing key 5 )

Share this post


Link to post
Share on other sites
1 hour ago, brunohxcx said:

i want to disable the game default menu

 

Do you mean the command menu?

 

You could disable the key interaction ,

 

but have you checked here first?

On 22/5/2017 at 12:28 AM, oukej said:

 

fpGbv3o.jpg

 

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

×