Jump to content
Sign in to follow this  
narrowsoul

Ammobox items not showing up on server

Recommended Posts

I'm trying to get some basic items in an ammobox, and it works in preview but not when playing on our server (leading to an embarrassing Saturday op since I only tested if it would load on the server, and did the rest of my testing in preview)

Here is what I added to the init field of the ammobox, according to a couple of tutorials online.

clearItemCargo this;

clearMagazineCargo this;

clearWeaponCargo this;

this addWeaponCargo ["rhs_weap_rpg7",2];

this addWeaponCargo ["rhs_weap_fgm148",1];

this addWeaponCargo ["rhs_weap_m249_pip_L_para",1];

this addWeaponCargo ["rhs_weap_M320",2];

this addMagazineCargo ["rhs_rpg7_PG7VL_mag",12];

this addMagazineCargo ["rhs_fgm148_magazine_AT",6];

this addMagazineCargo ["rhs_200rnd_556x45_M_SAW",25];

this addMagazineCargo ["rhs_mag_30Rnd_556x45_M855A1_Stanag",60];

this addMagazineCargo ["rhs_mag_M433_HEDP",20];

this addMagazineCargo ["rhs_mag_M441_HE",20];

this addMagazineCargo ["DemoCharge_Remote_Mag",10];

this addMagazineCargo ["SatchelCharge_Remote_Mag",10];

this addMagazineCargo ["HandGrenade",20];

this addMagazineCargo ["SmokeShellRed",20];

this addMagazineCargo ["SmokeShellGreen",20];

this addMagazineCargo ["SmokeShellYellow",20];

this addMagazineCargo ["Laserbatteries",2];

this addMagazineCargo ["SmokeShellPurple",20];

this addMagazineCargo ["SmokeShell",20];

this additemcargo ["ALIVE_Tablet",1];

this additemcargo ["rhsusf_acc_ELCAN",1];

this additemcargo ["rhsusf_acc_eotech_552",4];

Again, it worked beautifully during the preview, and now I'm stuck. Any help will be rewarded with +1 internet and my undying gratitude!

Share this post


Link to post
Share on other sites

You need to use the global versions of these commands for a dedicated server

https://community.bistudio.com/wiki/addMagazineCargoGlobal

ie:

clearItemCargoGlobal

clearMagazineCargoGlobal

clearWeaponCargoGlobal

addMagazineCargoGlobal

addItemCargoGlobal

...and so on

Your other option is to have each client load their own ammobox contents but I assume that's not what you're looking for and want the box contents to be 'global' for everyone to see.

Edited by SavageCDN

Share this post


Link to post
Share on other sites

You are my hero! Thanks, from myself, and by extension from my group that will now be able to play a mission with items other than the loadout I give them. (I took away their virtual inventory because they spent 30 mins dicking around on it :p)

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  

×