Jump to content

Diaverso Carrasco

Member
  • Content Count

    24
  • Joined

  • Last visited

  • Medals

Posts posted by Diaverso Carrasco


  1. 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?


  2. I am trying to start a server on linux.
    But I have the problem that I have files in uppercase

     

    This is what the directory contains

    9PQAXUZ.png

     

    If I run these commands inside the directory, I get this

    find . -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;
    find "$PWD" -type f -name '*.pbo' -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;
    find "$PWD" -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;

    XKdAWAH.png

     

    If I meter inside any @

    and inside the addons folder and run the command again, I get the same error


  3. Hi, I'm trying to create a mod for a 3 weapon clan.

    This mod would change the images and button of the 3 squares in the center.

    dhBF9RQ.jpeg

     

    1º - Spotlight2

    2º - Spotlight

    3º - Spotlight3

    But with the script I found, only the one in the middle works for me.

    This is the script I am using:

    class CfgPatches {
        class amp_spotlight {
            units[] = {};
            weapons[] = {};
            requiredVersion = 0.6;
            requiredAddons[] = {};
            version = 1.0;
            versionStr = 2.0;
            versionAr[] = {2, 0};
            author = "diaverso";
        };
    };
    
    class RscStandardDisplay;
    class RscDisplayMain: RscStandardDisplay
    {
    	class Spotlight
    	{
    		class server1
    		{
    			text = "Centro"; // Text displayed on the square button, converted to upper-case
    			textIsQuote = 0; // 1 to add quotation marks around the text
    			//picture = "\amp_spotlight\button.paa"; // Square picture, ideally 512x512
    			//video = "\a3\Ui_f\Video\spotlight_1_Apex.ogv"; // Video played on mouse hover
    			//action = "0 = [_this, 'your.domain.here', '2302', 'yourpasshere'] execVM '\amp_spotlight\joinServer.sqf';";
    			action = "0 = [_this, '85.190.155.165', '2302', ''] execVM '\amp_spotlight\joinServer.sqf';";
    			actionText = "Centro"; // Text displayed in top left corner of on-hover white frame
    			condition = "true"; // Condition for showing the spotlight
    		};
    	};
    	class Spotlight2
    	{
    		class server2
    		{
    			text = "Test Izquierda"; // Text displayed on the square button, converted to upper-case
    			textIsQuote = 0; // 1 to add quotation marks around the text
    			//picture = "\amp_spotlight\button.paa"; // Square picture, ideally 512x512
    			//video = "\a3\Ui_f\Video\spotlight_1_Apex.ogv"; // Video played on mouse hover
    			//action = "0 = [_this, 'your.domain.here', '2302', 'yourpasshere'] execVM '\amp_spotlight\joinServer.sqf';";
    			action = "0 = [_this, '85.190.155.165', '2302', ''] execVM '\amp_spotlight\joinServer.sqf';";
    			actionText = "Test Izquierda"; // Text displayed in top left corner of on-hover white frame
    			condition = "true"; // Condition for showing the spotlight
    		};
    	};
    	class Spotlight3
    	{
    		class server3
    		{
    			text = "Test Derecha"; // Text displayed on the square button, converted to upper-case
    			textIsQuote = 0; // 1 to add quotation marks around the text
    			//picture = "\amp_spotlight\button.paa"; // Square picture, ideally 512x512
    			//video = "\a3\Ui_f\Video\spotlight_1_Apex.ogv"; // Video played on mouse hover
    			//action = "0 = [_this, 'your.domain.here', '2302', 'yourpasshere'] execVM '\amp_spotlight\joinServer.sqf';";
    			action = "0 = [_this, '85.190.155.165', '2302', ''] execVM '\amp_spotlight\joinServer.sqf';";
    			actionText = "Test Drecha"; // Text displayed in top left corner of on-hover white frame
    			condition = "true"; // Condition for showing the spotlight
    		};
    	};
    };

    In configuration viewer, inside "RscDispalyMain" there are those parameters.

    cseqLba.png

     

    But it doesn't work for me, it just loads the "Spotlight"

     

    How can I make it all work?


  4. I am trying to make an addAction call a script and display the script for everyone on the server.

    I am trying with these 2 scripts:

    0 = this addAction ["Vehiculoos Quietos", "Examenes\AT\mision1.sqf"];
    [monitor,["Vehiculos en movimiento2","Examenes\AT\mision1.sqf"]] remoteExec ['addAction',0,monitor];

    When you click to run the script, it only runs the person who gives it, instead of everyone.

    This is what it contains mision1.sqf

    hintSilent parseText format["<t size='1' font='Zeppelin33' color='#ff0000'>Cargando Examen Vehiculos quietos!</t>"];
    sleep 2;
    hint "Puedes utilizar 1 misil por Vehiculo. Tienes 4 Vehiculos";
    sleep 5;
    hint "Examen empieza en 5s";
    sleep 2;
    hint "Examen empieza en 3s";
    sleep 1;
    hint "Examen empieza en 2s";
    sleep 1;
    hint "Examen empieza en 1s";
    sleep 1;
    hintSilent parseText format["<t size='1' font='Zeppelin33' color='#ff0000'>COMIENZA EL EXAMEN!</t>"];
    sleep 1;
    _veh1 = "rhs_uaz_open_vmf" createVehicle [9716.91,4424.07,0];
    _veh2 = "rhs_uaz_vmf" createVehicle [9856.53,4259.5,0];
    _veh3 = "rhs_tigr_vmf" createVehicle [9791.37,4427.55,1.90735e-006];
    _veh4 = "rhs_gaz66_ammo_vmf" createVehicle [9760.5,4256.07,0];
    sleep 80;

    Is there a way to make it work?

    Thank you


  5. Hi, I am trying to update my own mod to the workshop and it is giving me this error.

    HOiImdy.png

     

    I deduced that it could be by the name of GrupodeAsalto-Base.

    But by changing it and putting it GrupodeAsalto Base, Nor does it leave me and it gives me an error.

     

    Did you open a solution, so that you can update it so that people don't have to download it all over again?

    Thanks.

     


  6. I have an init.sqf that contains this code:

    if ((!isServer) && (player != player)) then {waitUntil {player == player};};
    nul = [-1] execVM "AL_intro\intro.sqf";

    and inside intro.sqf I have this:

    execVM "scripts\animation\animation1\avionnegro.sqf";
    sleep 17;
    playsound "arrancapu";
    sleep 3;
    execVM "scripts\animation\animation1\coche1.sqf";
    _firstshot = [cam1, cam2, car1, 20, 0.3, 0.1, false, 0, 0, 0,FALSE] execVM "AL_intro\camera_work.sqf";
    waitUntil {scriptdone _firstshot};
    _secondshot = [cam3, cam4, car1, 25, 1, 1, false, 0, 0, 0,FALSE] execVM "AL_intro\camera_work.sqf";
    waitUntil {scriptdone _secondshot};
    execVM "scripts\animation\animation2\coche2.sqf";
    sleep 3.2;
    __thirdshot = [cam6, cam7, car2, 30, 1, 1, false, 0, 0, 0,FALSE] execVM "AL_intro\camera_work.sqf";
    waitUntil {scriptdone __thirdshot};
    _fourshot = [cam8, cam9, car2, 20, 1, 1, false, 0, 0, 0,FALSE] execVM "AL_intro\camera_work.sqf";
    waitUntil {scriptdone _fourshot};
    _fiveshot = [cam10, cam11, car2, 25, 1, 1, false, 0, 0, 0,TRUE] execVM "AL_intro\camera_work.sqf";
    waitUntil {scriptdone _fiveshot};

    and drive1.sqf is where is the script that I put at the beginning


  7. Hi, I'm writing a script for a mission.

    The script is for an ia to drive a car to the marker.

    When I play the mission locally and multiplayer on my pc, it works perfectly.

    But, when running it on a dedicated server. The script does not work.

    This is the script:

    civ1 doMove (getMarkerPos "Marker1");
    execVM "scripts\animation\animation1\charla1.sqf";
    sleep 20;
    civ1 doMove (getMarkerPos "Marker2");
    sleep 30;
    civ1 doMove (getMarkerPos "Marker3");
    deleteVehicle civ1;
    deleteVehicle car1;
    deleteVehicle civ2;
    deleteVehicle civ3;

    How could I make it move to the marker?

    Thanks for the help


  8. Hi, I'm trying to create a script for a cinematic.

    The cinematic consists of spawning a plane and making it advance through the airport without taking off.

    This is the script I have at the moment:

    _grp1 = [[4639.55,5413.66,0], civilian, ["C_Plane_Civil_01_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
    _grp1 addWaypoint [[5145.62,5814.23,0], 0];
    sleep 10;
    _grp1 addWaypoint [[5077.51,5868.84,0], 0];

    Currently the plane is spawning in the air instead of on the ground.


  9. On 8/25/2020 at 2:09 AM, wogz187 said:

    @Diaverso Carrasco,

    Sorry. I said, "Marker", I should have said "Helper". Specifically  objects-->signs-->helpers, pick your favourite flavor of arrow!

    The script did work but since the position was invalid (would need getmarkerpos) you went to default locationNull.

    
    Check this out,

      Hide contents

    We can replace the default "_loc" with "player", this way an invalid location will result in no move, 

    
    
    you_fnc_teleport=
    { params [["_caller", player], ["_loc", player]];
    
    	titleText ["Teleporting", "BLACK FADED", 0.2];
    	playsound ["Orange_PeriodSwitch_Pre_01", true];
    sleep 0.5;
    	_caller setPos (getPos (_loc));
    	titleCut ["", "BLACK IN", 5];
    };

    Here's a button to call the function,

    
    
    you_useTeleport=[ player, "Use Teleport",   
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",   
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",   
    "isNull objectParent player", "alive player", {}, {}, {
    
    	[player, helper_1] spawn you_fnc_teleport;
    
    }, {}, [], 2, 0, false, true] call BIS_fnc_holdActionAdd; 

    Paste all of the above into init.sqf or the Editor Init Dialog.

    Have fun!

     

    Thanks 🙂

    • Like 1

  10. 13 hours ago, wogz187 said:

    @Diaverso Carrasco,

    Here's a very simple teleport script, 

      Hide contents
    
    
    you_simpleTeleport=
    { params [["_caller"], ["_loc"]];
    _caller setpos (getpos _loc);
    };
    
    //[player, formation] call you_simpleTeleport;

     


    and a slightly better one,
     

      Hide contents
    
    
    you_fnc_teleport=
    { params [["_caller", player], ["_location", locationNull]];
    
    	titleText ["Teleporting", "BLACK FADED", 0.2];
    	playsound ["Orange_PeriodSwitch_Pre_01", true];
    sleep 0.5;
    	_caller setPos (getPos (_location));
    	titleCut ["", "BLACK IN", 5];
    };
    
    //[player, formation] spawn you_fnc_teleport;


    No need to call a .sqf just paste the function into your init file and call (spawn) any time.

    Have fun!

    Init.sqf

    you_fnc_teleport=
    { params [["_caller", player], ["formacion", locationNull]];
    
    	titleText ["Teletrasnportando", "BLACK FADED", 0.2];
    	playsound ["Orange_PeriodSwitch_Pre_01", true];
    sleep 0.5;
    	_caller setPos (getPos (formacion));
    	titleCut ["", "BLACK IN", 5];
    };
    
    //[player, formation] spawn you_fnc_teleport;

    I understand that where it says "_location" it has to be changed by variable name?

     

    _selectedIndex = lbCurSel 456;
    
    if(_selectedIndex == 0) exitWith
    {
            hint "Teletransportado a Formacion/Arsenal";
            [player, formation] spawn you_fnc_teleport;
            closeDialog 0;
    };
    
    if(_selectedIndex == 1) exitWith
    {
            hint "";
            closeDialog 0;
    };
    
    if(_selectedIndex == 2) exitWith
    {
            hint "";
            closeDialog 0;
    };
    
    if(_selectedIndex == 3) exitWith
    {
            hint "";
            closeDialog 0;
    };

    Error image:

    eOkqeRS.jpg


  11. I have a setup for a GUI. It works perfectly.

    But, I don't know how to add an sqf call in this script

    _selectedIndex = lbCurSel 456;
    
    if(_selectedIndex == 0) exitWith
    {
            hint "Teleport to Formacion/Arsenal";
            null = [] spawn execVM "formacion_arsenal.sqf";
            closeDialog 0;
    };
    
    if(_selectedIndex == 1) exitWith
    {
            hint "";
            closeDialog 0;
    };
    
    if(_selectedIndex == 2) exitWith
    {
            hint "";
            closeDialog 0;
    };
    
    if(_selectedIndex == 3) exitWith
    {
            hint "";
            closeDialog 0;
    };

    With this script when I interact with the GUI it shows me the hint, but it doesn't load the sqf file

    file sqf:

     _tele = _this select 0;
    _caller = _this select 1;
    
    _caller setPos (getpos (formacion));

    This script has to teleport you to the mark called "formation" but it does nothing


  12. Hi, I'm trying to create a teleportation GUI, to different positions.

     

    have this for the GUI:

    class tele
    {
    	idd = 200; // ID del display
    	onLoad = "[] spawn {execVM 'ListBox';};"; // esto se lanza al cargar
    	
    class controls { // contenido del dialog
    ////////////////////////////////////////////////////////
    // GUI EDITOR OUTPUT START (by Cbo.Diaverso Carrasco, v1.063, #Bomudi)
    ////////////////////////////////////////////////////////
    class tele_picture: RscPicture
    {
    	idc = 1200;
    	text = "#(argb,8,8,3)color(1,1,1,1)";
    	x = 0 * GUI_GRID_W + GUI_GRID_X;
    	y = 0 * GUI_GRID_H + GUI_GRID_Y;
    	w = 40 * GUI_GRID_W;
    	h = 25 * GUI_GRID_H;
    };
    class tele_Listbox: RscListbox
    {
    	idc = 1500;
    	x = 1 * GUI_GRID_W + GUI_GRID_X;
    	y = 4 * GUI_GRID_H + GUI_GRID_Y;
    	w = 9 * GUI_GRID_W;
    	h = 16 * GUI_GRID_H;
    };
    class tele_button: RscButton
    {
    	idc = 1600;
    	text = "Teletransporte"; //--- ToDo: Localize;
    	x = 24.5 * GUI_GRID_W + GUI_GRID_X;
    	y = 6.5 * GUI_GRID_H + GUI_GRID_Y;
    	w = 7 * GUI_GRID_W;
    	h = 3.5 * GUI_GRID_H;
    };
    class tele_cancel: RscButton
    {
    	idc = 1601;
    	text = "Cancelar"; //--- ToDo: Localize;
    	x = 24.5 * GUI_GRID_W + GUI_GRID_X;
    	y = 13.5 * GUI_GRID_H + GUI_GRID_Y;
    	w = 7 * GUI_GRID_W;
    	h = 3.5 * GUI_GRID_H;
    };
    ////////////////////////////////////////////////////////
    // GUI EDITOR OUTPUT END
    ////////////////////////////////////////////////////////
    };
    };

    The ListBox file have to change the names inside the ListBox

    disableSerialization;
    
    _display = findDisplay 200; 
    
    _listBox = _display displayCtrl 1500; 
    
    _listBox lbAdd "Ejemplo1"; 

    Script to teleport

    this addAction{ 
    (_this select 1) setPos (getMarkerPos "formacion/arsenal");
    { _x setPos (getPos (_this select 1)); } forEach units group (_this select 0);
    }];

    The problem I have is that I don't know how to do that every time you select an option from the list and hit the teleport button, it loads the script


  13. Hi, I'm doing a script for a training mission.

    What I want is for a vehicle to be spawned, for a driver to be spawned, and for him to drive until coordinates.

    This is the code I have, and I can't get it to lead to the coordinates.

    hint "Cargando mision Vehiculos en movimiento";
    sleep 2;
    
    _veh1 = "rhsgref_cdf_b_gaz66" createVehicle [1557.3,1711.01,0];
    createVehicleCrew _veh1;
    sleep 5;
    _veh2 = "rhsgref_cdf_b_reg_uaz" createVehicle [1605.63,1670.2,0];
    createVehicleCrew _veh2;
    sleep 5;
    
    hint "Mision 2 Terminada"

    Thanks for the help

×