Sign in to follow this  
Followers 0
TG Marksman X

Client side ranked ammo-box script

4 posts in this topic

Just a quick modification of a script I use in my missions. Originally written by Demonized for Arma 2, modified by me for Arma 3.

Here's how it works:

In certain multi-player missions, there comes a time where you want to either: restrict which slots have access to which weapons, OR, you have so much crap in an ammobox, and so many players on the server - that it takes forever just to get a magazine out.

This script does both.

Weapon restriction is based on what you name the units.

eg: You could name some rifleman1, rifleman2, etc. and then name some others: grenadier1, grenadier2, and so on.

The rifleman would not be able to see what the grenadiers see, and vice versa.

The script creates an ammo box on a marker, in doing so it is ONLY run on the client. In addition, if you have units that are NOT named in the script, they simply won't see the ammo box.

It's not much, but it's a start. (it's just weapons and ammo at this stage, no items or clothing).

Again, I must credit Demonized, as it was his script that formed the base of mine.

Download Link:

http://dl.dropbox.com/u/98111234/local_box.sqf

Share this post


Link to post
Share on other sites

im just wondering if i could change this to would i have to change if (_this != player) to if (_this != MG) and name the unit MG1, MG2 and so on for each unit same for sniper too?

if (_this != player) exitWith {};  // exit all other clients.
_weapons = []; _magazines = [];

// load available to standard players only.
if (_this in [MG1,MG2,MG3,MG4]) then {

if (_this != player) exitWith {};  // exit all other clients.
_weapons = []; _magazines = [];

// load available to standard players only.
if (_this in [sniper1,sniper2,sniper3,sniper4]) then {

Edited by hellstorm77

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  
Followers 0