Jump to content
Sign in to follow this  
1para{god-father}

Loadout Script

Recommended Posts

OK having an issue with a pre-loadout script

For some reason I do not get the MAP, Compass , Radio or watch. It is in my Kit but not in the correct place i.e at the bottom ?

Any idea's ?

_player = _this select 0;
removeallweapons _player;
removeallassigneditems _player;
removeuniform _player;
removevest _player;
removebackpack _player;

_player addvest "V_BandollierB_rgr";

//_player addbackpack "b_kitbag_base";

_player addheadgear "H_Cap_headphones";

_player addGoggles "G_Shades_Black";

_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";

_player addweapon "arifle_MX_GL_F";
_player addPrimaryWeaponItem "acc_pointer_IR";
_player addPrimaryWeaponItem "optic_Arco";

_player adduniform "U_B_CombatUniform_mcam_vest";
_player addmagazine "SmokeShell";
_player addmagazine "SmokeShell";
_player addmagazine "SmokeShell";
_player addmagazine "SmokeShell";
_player addmagazine "SmokeShell";

_player addmagazine "handgrenade";
_player addmagazine "handgrenade";

_player additem "ItemCompass";
_player additem "itemgps";
_player additem "itemmap";
_player additem "itemradio";
_player additem "itemwatch";


Also how do you add to the Vest or Uniform ?

Edited by 1PARA{God-Father}

Share this post


Link to post
Share on other sites

See below

       _player addVest "V_TacVest_khk";
       _player addHeadGear "H_HelmetB_light";
       _player addUniform "U_B_CombatUniform_mcam";
       _player addweapon "ItemMap";
       _player addweapon "ItemWatch";
       _player addweapon "ItemCompass";
       _player addweapon "ItemGPS";
       _player addweapon "ItemRadio";

Edited by BearBison
changed to match OP code from mine

Share this post


Link to post
Share on other sites

You can also replace these eight lines of code:-

_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";
_player addmagazine "30Rnd_65x39_caseless_mag_Tracer";

With this single line

_player addmagazines ["30Rnd_65x39_caseless_mag_Tracer",8];

Same with the smokeshell, handgrenade etc.

Share this post


Link to post
Share on other sites

Is it best to use _player or _this?

Or is there no difference?

Share this post


Link to post
Share on other sites

This is one of my loadout scripts.

Wanted to post it so you can see how to do it right :)

The brackets and code around it is to ensure it only gets executed one time, if not used the script will get executed everytime someone connects, duplicating your items over and over again.

_unit = _this select 0;

if(local _unit) then {

// Remove original equipment
removeallweapons _unit;
removeallassigneditems _unit;
removeallcontainers _unit;


// Add clothing
_unit addUniform "U_B_CombatUniform_mcam";
_unit addHeadgear "H_HelmetB";
_unit addVest "V_PlateCarrier1_cbr";
_unit addBackpack "B_AssaultPack_base";


// Add weapons & grenades
_unit addWeapon "arifle_MX_GL_F";
_unit addPrimaryWeaponitem "optic_Hamr";
_unit addPrimaryWeaponItem "acc_pointer_IR";

_unit addMagazines ["30Rnd_65x39_caseless_mag", 14];
_unit addMagazines ["3Rnd_HE_Grenade_shell", 4];
_unit addMagazines ["3Rnd_SmokeRed_Grenade_shell", 2];
_unit addMagazines ["3Rnd_Smoke_Grenade_shell", 2];

_unit addWeapon "hgun_P07_F";
_unit addMagazines ["30Rnd_9x21_Mag", 3];

_unit addMagazines ["HandGrenade", 3];
_unit addMagazines ["SmokeShellRed", 2];
_unit addMagazines ["SmokeShell", 2];


// Add items
_unit addItem ["FirstAidKit", 3]; 

_unit addWeapon "Binocular";

_unit addItem "muzzle_snds_H"; 
_unit addItem "muzzle_snds_L"; 

_unit addItem "NVGoggles"; 
_unit assignItem "NVGoggles"; 

_unit addItem "ItemRadio"; 
_unit assignItem "ItemRadio"; 

_unit addItem "g_tactical_clear"; 
_unit assignItem "g_tactical_clear"; 

_unit addItem "ItemCompass"; 
_unit assignItem "ItemCompass"; 

_unit addItem "ItemMap"; 
_unit assignItem "ItemMap"; 

_unit addItem "ItemWatch"; 
_unit assignItem "ItemWatch"; 

_unit addItem "ItemGPS"; 
_unit assignItem "ItemGPS";

};

Edited by Byrgesen

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  

×