yenene 10 Posted March 11, 2014 (edited) Problem is I run a server with permanent world saved to database and I don't want the few ammo stashes I've included on the map to contain hundreds of weapons and ammo because a lot of players join the server. I want a precise number of stuff spawned, players will deal and kill each other for that stuff if they want it. If eveybody has everything, it's just pointless to fight to get other people's stuff. Not to mention the lag caused by such routines and the tons of stuff players will leave behind them because it won't fit in the crates after 90 players joined and left the server... For people that play with a few friends on LAN or small internet games that's not a problem but for real server owners that manage 50-60 players online 24/7, it's a pain in the a$#@%#$%^!! Now trying to make a map with starting ammo crates is pointless. So the problem is we can't really chose what we include in the crates/vehicles on a map we built. That's pretty stupid, some missions require players to care about the lack of weapons/ammo. Edited March 11, 2014 by yenene Share this post Link to post Share on other sites
KC Grimes 79 Posted March 12, 2014 For people that play with a few friends on LAN or small internet games that's not a problem but for real server owners that manage 50-60 players online 24/7, it's a pain in the a$#@%#$%^!! That said, you're focusing too much on the fact that what you currently have "doesn't work". You're not looking at the bigger picture in an attempt to find a solution, which is quite literally in front of you. The inability to control whats in the crate? My friend, you can still put whatever you want in the crate, and remove whatever you don't want in the crate. The difference is you can no longer add something on one machine so only that one machine can see it. Everybody doesn't have to have everything, that was merely an example of mine, which I followed with the suggestion of making a dynamic mission that actually limits the possibilities of weapons. Making a map with starting ammo crates is the same as it was before, again, the only difference being is that whatever is seen in it is seen on all machines. If anything, this will result in LESS weapons/magazines/items on the map, because even though technically those locally spawned items are local in the ammo box, they become global as soon as they hit the player's inventory or the ground. BI made a good move, it was just without warning nor information, resulting in a bit of a scare. Market crash. I assure you, "REAL server owner", that whatever you are trying to achieve can still be accomplished. Just step back and look at it from a different angle. Or, shoot me a PM or reply here with what you're trying to accomplish and I'll be happy to help. Share this post Link to post Share on other sites
PSYKO_nz 44 Posted March 12, 2014 (edited) im a server owner and the whole thing pissed me off a lot too, but I put my head down and my ass up and got to work on making it work, and like Grimes said its actually better this way, a lot more controllable and far better to it loading on each client, this means that now you add 50FAK's to a box there will only be 50, spawned by the server so ultimately its far better for servers to have it done this way!! Again Grimes is right some warning would have been very bloody nice! so with that said here's what you do to make it work follow these instructions, I know its going to take some extra work but its worth it... load each ammo box by a script and make the script only execute for the server... ill do it in steps so anybody with the same issue will be able to follow follow these instructions 1) open note pad - save it as what ever you want it call it .sqf (eg. Loadbox.sqf or loadbox2.sqf or pistols.sqf) 2) put this in the first line of it. if (isServer) then { 3) enter your instructions for the ammo box WITH GLOBAL (eg. clearWeaponCargoGlobal loadbox; or loadbox addMagazinecargoGlobal ["SmokeShell", 20];) 4) once there all entered finish the sqf with. }; 5) save the .sqf and put it into your mission folder OR inside a folder inside your mission folder 6) open ArmA3, go to edit your mission, go to the ammo box you want to have the custom load then put in the init for the box: NULL=[]execVM ""loadbox.sqf""; - if the .sqf is in the mission folder ----------OR------------ NULL=[]execVM ""foldername\loadbox.sqf""; - if its in a folder in your mission folder 7) name the ammo box accordingly (eg. Loadbox or Loadbox1 or pistols) 8) your done, upload it to server and test... 9)repeat for each ammo box you want to have a custom load in NOTE: this will not work in single player as there is no server. But when there is a server only the server will run the load and only ONCE when the server initialises. there for regardless who comes on and when they come on the ammo box will only have the stuff you told it to have, and if some one takes something from it it will not regenerate when another player comes on. effectively it will solve the problem of restricting the ammo box to what you want to happen. have tested it numerous times and it works perfectly. with no issues, aside from the pain in the ass fact that were having to do it if you've already got the instructions ready to go then its a copy, paste and tweak job here's how mine looks Ammo box Name: Example Ammo box init: NULL=[]execVM ""Ammoboxes\Example.sqf""; Loadbox.sqf if (isServer) then { sleep 10; clearWeaponCargoGlobal Example; clearMagazineCargoGlobal Example; clearItemCargoGlobal Example; clearBackpackCargoGlobal Example; sleep 2; Example addMagazinecargoGlobal ["HandGrenade", 20]; Example addweaponcargoGlobal ["ACRE_PRC148", 10]; Example additemcargoGlobal ["U_B_GhillieSuit", 2]; Example additemcargoGlobal ["firstaidkit", 50]; }; Hint "Ammobox Loaded"; (this is just for testing, I take the hint out before I finish the editing) hopefully everyone can understand this, ive tried to make it as easy as possible and as general as possible so anyone having the problem can understand and do it, regardless of there skill level hope this helps :) Edited March 12, 2014 by PSYKO_phoenix Share this post Link to post Share on other sites
KC Grimes 79 Posted March 12, 2014 Phoenix's method is one of many. Here's the way I've had it, which, by the way, was unaffected by the change. Grimes' Crate Filler Script Share this post Link to post Share on other sites
Tarmak 0 Posted April 28, 2014 hi guys, i use this type of script too and i have a question about it. When you're ingame, you're open your personnal weapon box and you take a weapon, but you realize you don't really need. So you try to pick your weapon in your box, but impossible it's red !!! like it was full. Maybe someone has found a solution ? Share this post Link to post Share on other sites
KC Grimes 79 Posted April 28, 2014 hi guys, i use this type of script too and i have a question about it.When you're ingame, you're open your personnal weapon box and you take a weapon, but you realize you don't really need. So you try to pick your weapon in your box, but impossible it's red !!! like it was full. Maybe someone has found a solution ? All crates have a capacity. When people add items to crates via script, you surpass the capacity, allowing you to fill the crate over the max. However, a unit ingame would not be able to do this. Share this post Link to post Share on other sites
Tarmak 0 Posted April 28, 2014 wow nice it's logic ! thanks a lot Grimes :) Share this post Link to post Share on other sites