Jump to content
Sign in to follow this  
Koni

Adding weapon and magazine problem

Recommended Posts

I don't know whats wrong with this, but it isn't working anymore for some reason.

Adding a weapon to the player using

player addmagazine "8Rnd_9x18_Makarov";

player addweapon "Makarov";

player addmagazine "8Rnd_9x18_Makarov";

player addmagazine "8Rnd_9x18_Makarov";

this has always worked in the past but now it gives the player the weapon, the magazines are there if you look in the gear section, but can't be selected to use in the pistol... just gives the pistol with no ammo showing on playing screen.

Works fine from the init box of the unit but not from a script or trigger.

Any ideas ?

Edited by Koni

Share this post


Link to post
Share on other sites

You have right. in player init it works. But in trigger this not work. You have gun with ammo but you cant reload and shoot. But if you drop Makarow with ammo and pick them from ground then all work. You can reload and shoot.

Share this post


Link to post
Share on other sites

Yeah, seems odd like...

Might use the Celerys holster script instead :)

Share this post


Link to post
Share on other sites

Was testing this and it's very weird. Will not work on the player directly.... as in player addmagazine "8Rnd_9x18_Makarov".... but pass the player to a script and no problems!

private ["_unit"];

// Get the crate parameter given
_unit = _this select 0;

// Remove the stock items from the man
removeAllWeapons _unit;

// Add the gear to the man
{_unit addMagazine "30Rnd_556x45_StanagSD"} foreach [1,2,3,4,5,6];
_unit addweapon "RH_m4sdacog";

{_unit addMagazine "8Rnd_9x18_Makarov"} foreach [1,2,3,4];
_unit addweapon "Makarov";

{_unit addMagazine "HandGrenade_West"} foreach [1,2,3,4];

_unit addmagazine "PipeBomb";
_unit addweapon "Binocular";
_unit addweapon "NVGoggles";
_unit selectweapon "RH_m4sdacog";

EDIT: I just tried this in the players init and it does in fact... work fine there!

removeallweapons this; {this addMagazine "8Rnd_9x18_Makarov"} foreach [1,2,3,4]; this addweapon "Makarov";

Edited by twirly

Share this post


Link to post
Share on other sites

I'll try that , thanks Twirly.

It is strange how certain things in Arma that have worked for so long suddenly stop working for no reason.

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  

×