MechSlayer
Member-
Content Count
90 -
Joined
-
Last visited
-
Medals
Everything posted by MechSlayer
-
Add all objects from arrays into a crate
MechSlayer replied to MechSlayer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The function it's serverside, but it's called locally. Anyway I found the main mistake, I typed "copmlie" instead of "compile" on the functions compiler (Strange that only this was affected). Thanks all for the help. -
Add all objects from arrays into a crate
MechSlayer replied to MechSlayer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
They're automatically added by iniDBI2 (Ignored when reading data) -
Add all objects from arrays into a crate
MechSlayer replied to MechSlayer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No .rpt errors, the function loads fine, here are the arrays: [76561198133987227] Nombre=""Mech"" Objetos="["OPTRE_Ins_ER_uniform_GAgreen","OPTRE_INS_UNSC_vest2","G_Aviator","sl_phone_1","ItemMap"]" Mochilas="["sl_client_c_carryall_2"]" Armas="["hlc_rifle_Bushmaster300","launch_O_Vorona_green_F","OPTRE_M6C"]" Cargadores="["OPTRE_12Rnd_127x40_Mag","29rnd_300BLK_STANAG","29rnd_300BLK_STANAG","OPTRE_12Rnd_127x40_Mag","OPTRE_12Rnd_127x40_Mag"]" _Objetos it's Objetos, ExternalS_fnc_iniCajaCargar reads it then saves it in "ObjetosCaja" with setVariable -
Add all objects from arrays into a crate
MechSlayer replied to MechSlayer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok, i made it read all arrays separate but i got another problem. The forEach won't work _Caja = nearestObjects [player, ["B_supplyCrate_F"], 7]; _Caja = _Caja select 0; [player,_Caja] remoteExecCall ["ExternalS_fnc_iniCajaCargar", 2]; sleep 1; _Objetos = player getVariable "ObjetosCaja"; hint "test"; //STOPS HERE { _Caja addItemCargoGlobal [_x,1]; } forEach _Objetos; hint "test2"; ["Sistema", "Objetos cargados", false] spawn HRP_fnc_Notifications; _Armas = player getVariable "ArmasCaja"; { _Caja addWeaponCargoGlobal [_x,1]; } forEach _Armas; ["Sistema", "Armas cargadas", false] spawn HRP_fnc_Notifications; _Mochilas = player getVariable "MochilasCaja"; { _Caja addBackpackCargoGlobal [_x,1]; } forEach _Mochilas; ["Sistema", "Mochilas cargadas", false] spawn HRP_fnc_Notifications; _Cargadores = player getVariable "CargadoresCaja"; { _Caja addMagazineCargoGlobal [_x,1]; } forEach _Cargadores; ["Sistema", "Cargadores cargados", false] spawn HRP_fnc_Notifications; The script stops working on //STOP HERE (I get the first hint but not the second) the script that retrieve the data works fine too ([player,_Caja] remoteExecCall ["ExternalS_fnc_iniCajaCargar", 2];) here's the code for that params ["_Jugador","_Caja"]; _UID = getPlayerUID _Jugador; _BD = ["new", "CargoCasas"] call OO_INIDBI; _Objetos = ["read", [_UID,"Objetos"]] call _BD; _Armas = ["read", [_UID,"Armas"]] call _BD; _Cargadores = ["read", [_UID,"Cargadores"]] call _BD; _Mochilas = ["read", [_UID,"Mochilas"]] call _BD; _Jugador setVariable ["ObjetosCaja", _Objetos, true]; _Jugador setVariable ["ArmasCaja", _Armas, true]; _Jugador setVariable ["CargadoresCaja", _Cargadores, true]; _Jugador setVariable ["MochilasCaja", _Mochilas, true]; Got any idea what could it be? -
How can I make that when a player joins the server it enters directly into the game withou passing trough the lobby?
-
Thanks
-
Another dialog opens after closeDialog
MechSlayer posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Dialog .hpp class dialogo { idd = -1; class controlsBackground { class Foto: RscPicture { idc = 1200; text = "#(argb,8,8,3)color(1,1,1,1)"; x = 0.276875 * safezoneW + safezoneX; y = 0.262 * safezoneH + safezoneY; w = 0.065625 * safezoneW; h = 0.112 * safezoneH; }; }; class controls { class nombreNPC: RscText { idc = 1000; x = 0.276875 * safezoneW + safezoneX; y = 0.388 * safezoneH + safezoneY; w = 0.065625 * safezoneW; h = 0.028 * safezoneH; colorBackground[] = {-1,-1,-1,0.25}; }; class Texto: RscText { idc = 1001; x = 0.381875 * safezoneW + safezoneX; y = 0.262 * safezoneH + safezoneY; w = 0.28875 * safezoneW; h = 0.35 * safezoneH; colorBackground[] = {-1,-1,-1,0.5}; }; class Boton1: RscButton { idc = 1600; x = 0.381875 * safezoneW + safezoneX; y = 0.626 * safezoneH + safezoneY; w = 0.28875 * safezoneW; h = 0.028 * safezoneH; }; class Boton2: RscButton { idc = 1601; x = 0.381875 * safezoneW + safezoneX; y = 0.668 * safezoneH + safezoneY; w = 0.28875 * safezoneW; h = 0.028 * safezoneH; }; }; }; The script that opens and close the dialog: createDialog "dialogo"; ctrlSetText [1200, "perfil.paa"]; ctrlSetText [1000, "NOMBRE"]; ctrlSetText [1001, "TEXTO TEXTO TEXTO TEXTO TEXTO"]; ctrlSetText [1600, "1. OPCION 1"]; buttonSetAction[1600, "closeDialog 0; createDialog 'dialogo'; [] spawn accion1;"]; ctrlSetText [1601, "2. OPCION 2"]; buttonSetAction[1601, "closeDialog 0; createDialog 'dialogo'; [] spawn accion2;"]; accion1 = { createDialog "dialogo"; ctrlSetText [1200, "perfil.paa"]; ctrlSetText [1000, "NOMBRE"]; ctrlSetText [1001, "TEXTO2 TEXTO2 TEXTO2 TEXTO2 TEXTO2 TEXTO2"]; ctrlSetText [1600, "OPCION1"]; buttonSetAction[1600, "closeDialog 0; closeDialog 0; hint 'Comando ejecutado';"]; }; accion2 = { createDialog "dialogo"; ctrlSetText [1200, "perfil.paa"]; ctrlSetText [1000, "NOMBRE"]; ctrlSetText [1001, "TEXTO3 TEXTO3 TEXTO3 TEXTO3 TEXTO3 TEXTO3"]; ctrlSetText [1600, "OPCION1"]; buttonSetAction[1600, "closeDialog 0; closeDialog 0; hint 'Comando ejecutado2';"]; }; So I open the dialog and select one option then it opens another dialog and close the previous one. But when I select another option it closes the dialog, make the action and open another dialog. Is there something wrong? -
Is it possible to disable or hide the interactos for objects? Like "Get in" for cars or "Pick up" for dropped items
-
Disable interactions
MechSlayer replied to MechSlayer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I checked it but i can't what i'm searching (Removing the interactions "Get in", "Inventory" from the cursorObject vehicle) -
Is it possible to get the animations of a vehicle using the debug console?
-
Enable collision for attached objects?
MechSlayer posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
How can I enable collision for attached objects? -
Change position of an attached object
MechSlayer posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
How can I get and change the position of an attached object? (I mean for example: _object attachTo [player, [0,0,0]]; the "[0,0,0]" position not the getPos position) -
Change position of an attached object
MechSlayer replied to MechSlayer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I know that but i need to get the position of the object when it's attached. Like getPos. -
I have this testing script [] spawn { b = 0; while {!isNull objectParent player} do {b = b + 1; hint str b; sleep 1;}; }; How can I resume the while loop when the player get's back in the vehicle?
-
How can I limit the player's vehicle speed without setVelocity??
-
Call function that it's inside another function
MechSlayer posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Function1 = { Function2 ={ }; }; Is it possible to call Function2 if it's inside Function1 ?? -
Hey, i have this code: HRP_fnc_hackearCasino = { params["_Ordenador"]; ["Sistema", "Desactivando alarmas...", true] spawn HRP_fnc_Notifications; sleep 60; if ((player distance _Ordenador) > 3) then {systemChat "La alarma del casino está sonando!!"; systemChat "La alarma del casino está sonando!!"; systemChat "La alarma del casino está sonando!!"; _Ordenador say3D "Alarm";} {_x setVariable ["hackeable", false, true];} forEach allPlayers; _Ordenador setVariable ["hackeable", false, true]; ["Sistema", "Alarmas desactivadas", true] spawn HRP_fnc_Notifications; }; It works fine without the "if player distance" but when i run it with that it gives me compilation error. Can someone help me?
-
Running it on the server but is clientside
-
Hey, i'd like to create and modify a database with inidbi without putting the code inside initServer.sqf. I tried using remoteExec but it won't work. Here's my code: iniPlayerLocal.sqf _Nombre = name player; _BD = ["new", _Nombre] call OO_INIDBI; [_BD, _Nombre] call Mech_fnc_login; fn_login.sqf _BD = (_this select 0); _Nombre = (_this select 1); [["write", ["test", "test", "test"]], _BD] remoteExec ["call", 2, true];
-
inidbi with remoteExec?
MechSlayer replied to MechSlayer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That didn't work. The server won't create the database -
Hey, I have a dialog that opens in the target player (You execute the createDialog and the player see it) but i don't know how to use ctrlSetText with that
-
How can I make an object invisible if the players are too far away?
-
Hey, i'd like to create markers from initServer, but it doesn't work. How can I do? if (DArcadia isEqualTo "Ocupado") then { _MarcadorArcadia = createMarker ["ZonaArcadia", [7655.75,6335.19,0]]; _MarcadorArcadia setMarkerShape "ELLIPSE"; _MarcadorArcadia setMarkerSize [200,200]; _MarcadorArcadia setMarkerAlpha 100; ["eos\OpenMe.sqf"] remoteExec ["execVM", 0, true]; } else { deleteVehicle autonomoArcadia; _BanderaArcadia = createMarker ["", [7655.75,6335.19,0]]; _BanderaArcadia setMarkerShape "ICON"; _BanderaArcadia setMarkerType "hd_flag"; _BanderaArcadia setMarkerColor "ColorGreen"; }
-
Create marker from initServer
MechSlayer replied to MechSlayer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nevermind, fiexd it the initServer.sqf : [] spawn { //Zonas// //Zonas// BD = ["new", "Zonas"] call OO_INIDBI; DArcadia = ["read", ["Estado", "Arcadia"]] call BD; DBagango = ["read", ["Estado", "Bagango"]] call BD; DCayo = ["read", ["Estado", "Cayo"]] call BD; DCorazol = ["read", ["Estado", "Corazol"]] call BD; DIguana = ["read", ["Estado", "Iguana"]] call BD; DObregan = ["read", ["Estado", "Obregan"]] call BD; DOrtego = ["read", ["Estado", "Ortego"]] call BD; DSomato = ["read", ["Estado", "Somato"]] call BD; DTiberia = ["read", ["Estado", "Tiberia"]] call BD; [Ares_fnc_sspawners] remoteExec ["call", 0, true]; ArcadiaLiberado = { ["write", ["Estado", "Arcadia", "Liberado"]] call BD; }; BagangoLiberado = { ["write", ["Estado", "Bagango", "Liberado"]] call BD; }; CayoLiberado = { ["write", ["Estado", "Cayo", "Liberado"]] call BD; }; CorazolLiberado = { ["write", ["Estado", "Corazol", "Liberado"]] call BD; }; IguanaLiberado = { ["write", ["Estado", "Iguana", "Liberado"]] call BD; }; ObreganLiberado = { ["write", ["Estado", "Obregan", "Liberado"]] call BD; }; OrtegoLiberado = { ["write", ["Estado", "Ortego", "Liberado"]] call BD; }; SomatoLiberado = { ["write", ["Estado", "Somato", "Liberado"]] call BD; }; TiberiaLiberado = { ["write", ["Estado", "Tiberia", "Liberado"]] call BD; }; }; and the sspawners.sqf: if (DArcadia isEqualTo "Ocupado") then { MarcadorArcadia = createMarker ["ZonaArcadia", [7655.75,6335.19,0]]; MarcadorArcadia setMarkerShape "ELLIPSE"; MarcadorArcadia setMarkerSize [200,200]; MarcadorArcadia setMarkerAlpha 100; execVM "eos\OpenMe.sqf"; } else { deleteVehicle autonomoArcadia; BanderaArcadia = createMarker ["", [7655.75,6335.19,0]]; BanderaArcadia setMarkerShape "ICON"; BanderaArcadia setMarkerType "hd_flag"; BanderaArcadia setMarkerColor "ColorGreen"; }; -
Create RscButton if variable is true
MechSlayer posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
class taximetro: RscButton { idc = 1600; onMouseButtonClick = "closeDialog 1; createDialog 'interfazTaximetro'; ctrlSetText [1001, format ['%1', Dinero]];"; text = "Taximetro"; //--- ToDo: Localize; x = 0.040674 * safezoneW + safezoneX; y = 0.90607 * safezoneH + safezoneY; w = 0.0787416 * safezoneW; h = 0.0420073 * safezoneH; }; I want this to be created only if a condition is true. How can i make it?