Jump to content
Sign in to follow this  
SD_BOB

Spawning Custom Ammo Crates

Recommended Posts

Hey guys, i'm trying to spawn an ammo crate with custom content globally on a dedi server, but having some issues.

This is the current script, which is called from an action placed onto an object in the mission:-

if !(isDedicated) then {

_this = _this select 0;
_this = "TKOrdnanceBox_EP1" createVehicle (getMarkerPos "tboxspawn");

clearWeaponCargo _this;
clearMagazineCargo _this;

_this addweaponcargo ["M240",1];
_this addweaponcargo ["ACE_M240G_M145",1];
_this addweaponcargo ["ACE_TAC50_SD",1];
_this addweaponcargo ["M136",5];
_this addweaponcargo ["ACE_M136_CSRS",5]; 
_this addweaponcargo ["ACE_Earplugs",10];
_this addweaponcargo ["Laserdesignator",2];
_this addweaponcargo ["ACE_Rangefinder_OD",2];
_this addweaponcargo ["Binocular",2];
_this addweaponcargo ["NVGoggles",2];
_this addweaponcargo ["JAVELIN",4];
_this addweaponcargo ["STINGER",1];
_this addweaponcargo ["ACE_Spottingscope",1];
_this addweaponcargo ["ACE_Wirecutter",1];
_this addweaponcargo ["ACE_Javelin_CLU",1],




//AMMO//


_this addmagazinecargo ["ACE_Battery_Rangefinder",2];
_this addmagazinecargo ["Smokeshell",20];
_this addmagazinecargo ["200Rnd_556x45_M249",10];
_this addmagazinecargo ["ACE_200Rnd_556x45_T_M249",10];
_this addmagazinecargo ["ACE_5Rnd_127x99_S_TAC50",10];
_this addmagazinecargo ["ACE_5Rnd_127x99_T_TAC50",10];
_this addmagazinecargo ["100Rnd_762x51_M240",50];
_this addmagazinecargo ["1Rnd_HE_M203",50];
_this addmagazinecargo ["1Rnd_Smoke_M203",5];
_this addmagazinecargo ["Pipebomb",10];
_this addmagazinecargo ["Laserbatteries",2];
_this addmagazinecargo ["STINGER",2];
_this addmagazinecargo ["ACE_CLAYMORE_M",10];
_this addmagazinecargo ["HANDGRENADE_WEST",20];			
_this addmagazinecargo ["SMOKESHELLGREEN",10];
_this addmagazinecargo ["SMOKESHELLRED",10];
_this addmagazinecargo ["ace_flashbang",10];
_this addmagazinecargo ["ACE_IRStrobe",10];
_this addmagazinecargo ["ACE_KNICKLICHT_IR",10];
_this addmagazinecargo ["ACE_KNICKLICHT_B",10];
_this addmagazinecargo ["ACE_VS17Panel_M",2];




//medical supplies//

_this addmagazinecargo ["ACE_BANDAGE",20];
_this addmagazinecargo ["ACE_LARGEBANDAGE",10];
_this addmagazinecargo ["ACE_TOURNIQUET",10];
_this addmagazinecargo ["ACE_MORPHINE",20];
_this addmagazinecargo ["ACE_EPINEPHRINE",20];
_this addmagazinecargo ["ACE_SPLINT",10];
_this addmagazinecargo ["ACE_IV",10];
_this addmagazinecargo ["ACE_PLASMA",10];
};

This creates the box fine, but only the player who called the script ca see the custom contents. Other players just see the default box contents...

Obviously the box itself is being created globally, but the contents just local to the player.

Can anyone provide assistance to get this working correctly for a dedicated enviroment?

Thankyou in advance.

Share this post


Link to post
Share on other sites

You have to use the global commands instead:

clearWeaponCargoGlobal
clearMagazineCargoGlobal
addWeaponCargoGlobal
addMagazineCargoGlobal

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  

×