Jump to content

Photo
- - - - -

Client side ranked ammo-box script


  • Please log in to reply
3 replies to this topic

#1 TG Marksman X

TG Marksman X

    Corporal

  • Members
  • 98 posts

Posted 07 March 2013 - 08:50

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.co...4/local_box.sqf

#2 Foxhound

Foxhound

    Retired Moderator

  • Members
  • 11212 posts

Posted 08 March 2013 - 22:59

Release frontpaged on the Armaholic homepage.

Posted Image
[ALPHA] Client side ranked ammo-box script


Visit Armaholic.com | Visit Carriercommandaholic.com
Posted Image
Public FTP available, just check the Armaholic.com FAQ.

HMM........wonder what it is huh?

#3 TG Marksman X

TG Marksman X

    Corporal

  • Members
  • 98 posts

Posted 09 March 2013 - 03:26

Thanks Foxhound.
Main: i5 3570K | XSPC RASA | RX240 + RX120 | ASRock z77 Extreme4 | 2x 3gb HIS 67950 | 16gb 1600mhz XMS3 | 1TB WD Green | Sandisk 120gb SSD | 850w Silverstone Strider | Fractal Design Arc Mid.
Server: i5 2500K | ASrock Extreme4 | 650w Silverstone Strider | 8gb 1600mhz XMS3 | 7TB WD green's | 120gb Sandisk SSD OS drive | NZXT Tempest | Zalman bay converters | Win7+pimped MCE.

#4 hellstorm77

hellstorm77

    Staff Sergeant

  • Members
  • 384 posts

Posted 11 April 2013 - 22:47

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, 11 April 2013 - 22:50.