Erzengel

Weaponjam and Supply on smoke

14 posts in this topic

@Erzengel I've had a chance to try the weapon jamming today but it doesn't seem to work. I even bumped the jam rate up to 50% just to test it out but guns never jam, regardless of fire mode. 

Any ideas?

Share this post


Link to post
Share on other sites
On 5.6.2018 at 2:53 PM, Cillo said:

@Erzengel I've had a chance to try the weapon jamming today but it doesn't seem to work. I even bumped the jam rate up to 50% just to test it out but guns never jam, regardless of fire mode. 

Any ideas?

do you use infistar ? i allready gave the script so some guys before and the ones that had problems mostlikly had infistar running but with out any markings in the rpt i cant tell :D

Share this post


Link to post
Share on other sites
Advertisement
I got the weapon jam part working by doing the following steps.

################
   initPlayerLocal.sqf
################
//WeaponJamming
KK_fnc_playerWeaponMulfunction = compile preprocessFileLineNumbers "jam.sqf";
 
#######
  jam.sqf
#######
waitUntil {!isNull findDisplay 46};

player addAction ["", {
			playSound3D ['a3\sounds_f\weapons\Other\dry9.wss', _this select 0];
}, "", 0, false, true, "DefaultAction", "isNil 'allowFire'"];

allowFire = true;

KK_fnc_playerWeaponMulfunction = {
	_frame = diag_frameno;
	_wep = currentWeapon _this;
	_ammo = _this ammo _wep;
	if (_ammo > 0) then {
	allowFire = nil;
	_this setAmmo [_wep, 0];
	waitUntil {_frame < diag_frameno};
	_this setAmmo [_wep, _ammo];
	["ErrorTitleOnly", ["Your weapon jammed!"]] call ExileClient_gui_toaster_addTemplateToast;
	menu = (findDisplay 46) displayAddEventHandler ["KeyDown", "if ((_this select 1) in actionKeys ""ReloadMagazine"") then {allowFire = true;}"];
	};
};

 

###################################
  ExileClient_object_player_bambiStateBegin.sqf
     (You have to make a customcode override)
                      -> Add this below line 19

###################################

player addAction ["", {
			playSound3D ['a3\sounds_f\weapons\Other\dry9.wss', _this select 0];
	}, "", 0, false, true, "DefaultAction", "isNil 'allowFire'"];
	menu = (findDisplay 46) displayAddEventHandler ["KeyDown", "if ((_this select 1) in actionKeys ""ReloadMagazine"") then {allowFire = true;}"];

 

###################################
ExileClient_object_player_event_onFired.sqf
 (You have to make a customcode override)
                  -> Add this below line 91
###################################
if (random 1 < 0.0033) then {
            player spawn KK_fnc_playerWeaponMulfunction
            };
To adjust the jamming chance to adjust this -> "random 1 < 0.0033" for example to "random 1 < 0.008" for higher jamming chances.
 
Edited by El Rabito

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.