Jump to content
Sign in to follow this  
Diaverso Carrasco

custom Loadout in gui

Recommended Posts

I am creating a menu, to load custom Loadout.

But, when I give it to equip the Loadout, it doesn't do it.

 

Image of the gui who believes

ohExVX6.jpeg

 

Video example of how the menu works

 

These are the files I am using

//Description.ext
#include "scripts\defines.hpp"
#include "scripts\arsenal\menu.hpp"
//menu.hpp
//--Importante añadir esto antes--//
class listas
{
	idd = 2025;
	movingenable=false;
	onload = "[] spawn {execVM 'scripts\arsenal\ListBox.sqf';};";
	class controls
	{

class RscPicture_1200: RscPicture
{
	idc = 1200;
    text = "imagen\fondoext.paa"; //--- ToDo: Localize;
	x = 5.58794e-009;
	y = -2.23517e-008;
	w = 1;
	h = 1;
};
class RscListbox_1500: RscListbox
{
	idc = 456;
	x = 0.025;
	y = 0.14;
	w = 0.275;
	h = 0.7;
};
class RscText_1000: RscText
{
	idc = 1000;
	text = "Recluta"; //--- ToDo: Localize;
	x = 0.1125;
	y = 0.08;
	w = 0.0875;
	h = 0.04;
};
class RscListbox_1501: RscListbox
{
	idc = 1501;
	x = 0.35;
	y = 0.14;
	w = 0.275;
	h = 0.7;
};
class RscText_1001: RscText
{
	idc = 1001;
	text = "Soldados"; //--- ToDo: Localize;
	x = 0.45;
	y = 0.08;
	w = 0.0875;
	h = 0.04;
};
class RscListbox_1502: RscListbox
{
	idc = 1502;
	x = 0.6875;
	y = 0.14;
	w = 0.275;
	h = 0.7;
};
class RscText_1002: RscText
{
	idc = 1002;
	text = "Extras"; //--- ToDo: Localize;
	x = 0.7875;
	y = 0.08;
	w = 0.0875;
	h = 0.04;
};
class RscButton_1600: RscButton
{
	idc = 1600;
	text = "Equipar"; //--- ToDo: Localize;
	x = 0.3625;
	y = 0.86;
	w = 0.2625;
	h = 0.1;
    tooltip = "Seleciona una equipacion y presioname"; //--- ToDo: Localize;
	action = "[] spawn {execVM 'scripts\arsenal\listboxAction.sqf';};";
};
};
};
//ListBox.sqf

disableSerialization;

_display = findDisplay 2025; 

_listBox = _display displayCtrl 456; 

_listbox lbAdd "Fusilero";
_listBox lbAdd "Portador Municion (Vacio)";
_listBox lbAdd "Portador Municion (Municion)"; 
_listBox lbAdd "Portador Municion (Medico)"; 
_listBox lbAdd "Portador Municion (Explosivos)"; 
_listBox lbAdd "Portador Municion (AT)"; 
_listBox lbAdd "Granadero Basico"; 
_listBox lbAdd "Ametrallador Basico";
_listBox lbAdd "AT Basico";
_listBox lbAdd "AA Basico";
_listBox lbAdd "Ingeniero";
_listBox lbAdd "Operador de Radio";
_listBox lbAdd "Tirador Basico (SCAR-H)";
_listBox lbAdd "Tirador Basico (HK417 DLC)";
//listboxAction.sqf


_selectedIndex = lbCurSel 456;
if(_selectedIndex == 0) exitWith
{
        [player] execVM "scripts\arsenal\equipaciones\fusilerobasico.cpp";
        closeDialog 0;
};
if(_selectedIndex == 1) exitWith
{
        [player] execVM "scripts\arsenal\equipaciones\portadormunicionvacio.sqf";
         closeDialog 0;
};

if(_selectedIndex == 2) exitWith
{
        [player] execVM "scripts\arsenal\equipaciones\teleportmap.sqf";
        closeDialog 0;
};

if(_selectedIndex == 3) exitWith
{
        [player] execVM "scripts\arsenal\equipaciones\teleportmap.sqf";
        closeDialog 0;
};

if(_selectedIndex == 4) exitWith
{
        [player] execVM "scripts\arsenal\equipaciones\teleportmap.sqf";
        closeDialog 0;
};

if(_selectedIndex == 5) exitWith
{
        [player] execVM "scripts\arsenal\equipaciones\teleportmap.sqf";
        closeDialog 0;
};

if(_selectedIndex == 6) exitWith
{
        [player] execVM "scripts\arsenal\equipaciones\teleportmap.sqf";
        closeDialog 0;
};

if(_selectedIndex == 7) exitWith
{
        [player] execVM "scripts\arsenal\equipaciones\teleportmap.sqf";
        closeDialog 0;
};






//portadormunicionvacio.sqf


comment "Exported from Arsenal by Sld. Diaverso Carrasco";

comment "Remove existing items";
removeAllWeapons player;
removeAllItems player;
removeAllAssignedItems player;
removeUniform player;
removeVest player;
removeBackpack player;
removeHeadgear player;
removeGoggles player;

comment "Add weapons";
player addWeapon "rhs_weap_m4";
player addPrimaryWeaponItem "rhsusf_acc_compm4";
player addPrimaryWeaponItem "30Rnd_556x45_Stanag_red";

comment "Add containers";
player forceAddUniform "sph_w_uniforme";
player addVest "sph_w_chaleco_a";
player addBackpack "sph_w_mochila_big";

comment "Add items to containers";
for "_i" from 1 to 3 do {player addItemToUniform "ACE_epinephrine";};
for "_i" from 1 to 2 do {player addItemToUniform "ACE_splint";};
player addItemToUniform "ACE_Flashlight_XL50";
for "_i" from 1 to 2 do {player addItemToUniform "ACE_morphine";};
player addItemToUniform "ACE_EarPlugs";
for "_i" from 1 to 4 do {player addItemToUniform "ACE_tourniquet";};
for "_i" from 1 to 20 do {player addItemToUniform "ACE_fieldDressing";};
player addItemToUniform "ACE_IR_Strobe_Item";
player addItemToUniform "ACE_SpraypaintGreen";
player addItemToVest "rhsusf_acc_nt4_black";
player addItemToVest "ACE_EntrenchingTool";
for "_i" from 1 to 5 do {player addItemToVest "ACE_CableTie";};
for "_i" from 1 to 3 do {player addItemToVest "30Rnd_556x45_Stanag_red";};
for "_i" from 1 to 2 do {player addItemToVest "30Rnd_556x45_Stanag_Tracer_Red";};
for "_i" from 1 to 3 do {player addItemToVest "HandGrenade";};
for "_i" from 1 to 6 do {player addItemToVest "SmokeShell";};
for "_i" from 1 to 2 do {player addItemToVest "SmokeShellBlue";};
player addItemToBackpack "SAS_BoonieHat_W";
player addHeadgear "sph_w_casco_a";
player addGoggles "USP_OAKLEY_SI2";

comment "Add items";
player linkItem "ItemMap";
player linkItem "ItemCompass";
player linkItem "TFAR_microdagr";
player linkItem "TFAR_rf7800str_3";
player linkItem "ItemAndroid";
player linkItem "ACE_NVG_Wide_Black";

How can I fix it so that it equips the Loadout?

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  

×