Jump to content
Sign in to follow this  
T.Hanford

Custom ammo boxes not working in multiplayer

Recommended Posts

I have tried changing the contents of ammo crates in the editor, both through the init field and a script.

They both work when i preview the mission in the editor but not when the mission is hosted in multiplayer.

The script almost works, it adds the items I wanted, but it does not remove the default ones, but as i said it does work in the editor.

Is there a way to fix this?

thanks

-Timmyrules

Share this post


Link to post
Share on other sites

Maybe if you told us what was in your init string and / or script then someone could help you?

Share this post


Link to post
Share on other sites

I have an ammobox.sqf in the mission folder that starts with....

if (!isServer) exitWith {};

ClearWeaponCargoGlobal _this;

ClearMagazineCargoGlobal _this;

ClearItemCargoGlobal _this;

ClearBackpackCargoGlobal _this;

Share this post


Link to post
Share on other sites
I have an ammobox.sqf in the mission folder that starts with....

That's what I had.

Here is part of the script that spawns the gear.

As I said in the editor it will work, it removes the default gear and puts in the stuff i want.

But when it's hosted in Multiplayer it only adds the stuff, it doesn't remove the default contents

if (! isServer) exitWith {};

_crate = _this select 0;

while {alive _crate} do

{

clearMagazineCargo _crate;

clearWeaponCargo _crate;

clearItemCargoGlobal _crate;

_crate addMagazineCargoGlobal ["rhs_mag_30Rnd_556x45_Mk318_Stanag", 60];

_crate addMagazineCargoGlobal ["rhs_mag_M441_HE", 20];

_crate addMagazineCargoGlobal ["rhsusf_100Rnd_556x45_M200_soft_pouch", 20];

_crate addMagazineCargoGlobal ["rhs_mag_m67", 20];

_crate addMagazineCargoGlobal ["rhs_mag_m18_green", 10];

_crate addMagazineCargoGlobal ["rhs_mag_m18_red", 10];

Share this post


Link to post
Share on other sites

Because you forgot the Global on clearMagazineCargo etc... you only have right in Item

Share this post


Link to post
Share on other sites
Because you forgot the Global on clearMagazineCargo etc... you only have right in Item

Ok thanks i'll try that :)

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  

×