Jump to content
Sign in to follow this  
alleycat

clearweaponcargoglobal failing on ded server

Recommended Posts

Why the fuck cant this shit work.

Using clearweaponcargoglobal on a serverside script that as ever obvious, fails to do its job on a dedicated server. The weapons which are supposed to be cleared are still listed but players can not pick them up.

_loot  = createVehicle ["TKBasicAmmunitionBox_EP1", (_x buildingpos _spawnlocs), [], 0, "can_collide"];
clearweaponcargoglobal _loot;
clearmagazinecargoglobal _loot;
_loot setpos [_posx,_posy,(_posz)];
_loot addWeaponCargoGlobal ["MetisLauncher",1];

if (isServer) then {
execVM "loot_spawn.sqf" ;//calls the above script
};

Share this post


Link to post
Share on other sites

Usually it takes a little time to initialize the contents of an ammobox. Have you tried putting a small sleep between the create vehicle and the clearWeaponCargoGlobal?

Share this post


Link to post
Share on other sites

Actuall the problem was that the "export to multiplayer" option was broken. It never copied the updated map to the mp folder until I rebooted the game.

Usually it takes a little time to initialize the contents of an ammobox. Have you tried putting a small sleep between the create vehicle and the clearWeaponCargoGlobal?

I noticed this when joining a dedicated server as the first player, when pressing ready in briefing it appears to delay for a few seconds before the game actually starts. Is that the server waiting to process the init. sqf before letting players in?

Share this post


Link to post
Share on other sites

Yes, I also meet the same problem, clearGlobal didn't work. Anybody know a solution??

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  

×