Jump to content

ward1591

Member
  • Content Count

    28
  • Joined

  • Last visited

  • Medals

Everything posted by ward1591

  1. Hi i'm having trouble trying to figure out how to make a GUI that allows you to move around ingame with no mouse. For example like in Wasteland Servers there is the basic HUD with Food and Water & Cash right. Well i Want to make a picture GUI (Just the picture) in the other corner for a logo i made. But when i try to do it my way it appears but it stop me from moving and forces my mouse to come out. I have a basic grasp on GUI editing for Arma 3 but i cant wrap my head around this please help ;_;
  2. ward1591

    GUI Help?

    ;_; Thank god iceman you saved me i would PM you personally since i know personally your a wiz at it but didn't want to bother. THANK YOU!!!
  3. I was wondering from my little scripting experience if this condition within a if statement works? Please be gentle with me everyone lol! if ((getPlayerUID player)in lowAdmins or highAdmins or serverOwners)
  4. So i used this same format on other building doors which have worked but it doesn't seem to work with the cargo tower doors anyone know why? ((nearestObjects [crypticbase1, ["Land_Cargo_Tower_V3_F"], 10]) select 0) setVariable ['bis_disabled_Door_1',1,true]; ((nearestObjects [crypticbase1, ["Land_Cargo_Tower_V3_F"], 10]) select 0) setVariable ['bis_disabled_Door_2',1,true]; ((nearestObjects [crypticbase1, ["Land_Cargo_Tower_V3_F"], 10]) select 0) setVariable ['bis_disabled_Door_3',1,true]; ((nearestObjects [crypticbase1, ["Land_Cargo_Tower_V3_F"], 10]) select 0) setVariable ['bis_disabled_Door_4',1,true];
  5. Hey everyone i simply wanted to see as the title states if this would work? SO here is the situation. What i am trying to do here is have a vheicle which has allready been locked by using this command... _obj setVehicleLock "LOCKED"; To then be locked again upon a server restart... if (_obj setVehicleLock "UNLOCKED") exitWith{ _obj setVehicleLock "LOCKED";};
  6. Okay sorry about that i couldn't really think of anything to title this. Thanks for the feedback MDCC!
  7. Okay so i have a action here i want to set only if player is near objects in a array stated in another script which is run in the init.sqf when the player joins. here is the action sorry if its formatted wrong this is my first try with this thing... ["Lock Door","client\clientEvents\D_lock.sqf",0,0,false,false,"","player distance basedoors < 5"], Below is the array which lists every object i want to use in this action... basedoors = [ pmcb1d1, // PMC Building 1 Door 1 pmcb2d1, // PMC Building 2 Door 1 pmcb2d2 // PMC Building 2 Door 2 ];
  8. ward1591

    Would this work?

    Okay i tested this out on a object in editor this addAction ["kill","kill.sqf","player distance this < 3"]; didnt seem to work?
  9. ward1591

    Would this work?

    Okay got it thank ICEMAN!!! One more question its off topic. How do i force players to be near a object for them to able to see a addAction on it?
  10. ward1591

    Would this work?

    The action is added to the player so i would just use player instead of _target? ---------- Post added at 03:54 ---------- Previous post was at 03:20 ---------- Okay so that didn't work is it because i'm using a gamelogic? Is there anyway i can get this action to work only when the player is near a door?
  11. ward1591

    Would this work?

    pmcb1d1 and the others are gamelogics?
  12. OKAY THANKS MDCC! i couldn't see to figure out how to do it. Sorry dr_strangepete i just got back home so sorry for the late reply!
  13. I am trying to add these two event handlers alongside with a player FIRED event handler which i know works. If anyone can help me with the issue i would most appreciate it THANKS! #define SAFETY_ZONES [["safezone1", 300]] // Syntax: [["marker1", radius1], ["marker2", radius2], ...] #define MESSAGE "Firing/Grenades Disable while in safezone!" if (isDedicated) exitWith {}; waitUntil {!isNull player}; player addEventHandler ["Fired", { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then { deleteVehicle (_this select 6); titleText [MESSAGE, "PLAIN", 3]; }; }]; ///////////////////////////I'M TRYING TO ADD EVERYTHING BELOW!!!////////////////////////////////////////////// LandVehicle addEventHandler ["Fired", { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then { deleteVehicle (_this select 6); titleText [MESSAGE, "PLAIN", 3]; }; }]; air addEventHandler ["Fired", { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then { deleteVehicle (_this select 6); titleText [MESSAGE, "PLAIN", 3]; }; }];
  14. Im not sure if the title is worded correctly but that how i worded. My problem with the script i wrote below is it only seems to check this part... if {true} do { if (player distance pmcb1 < 4) exitWith {}; //PMC Base Building 1 } However, i need to it to also run these too incase someone is near pmcb2d1 & pmcb2d2.... if {true} do { if (player distance pmcb2d1 < 4) exitWith {}; //PMC Base Building 2 Door 1 } if {true} do { if (player distance pmcb2d2 < 4) exitWith {}; //PMC Base Building 2 Door 2 } Below is the entire script for POS check. if {true} do { if (player distance pmcb1 < 4) exitWith {}; //PMC Base Building 1 } if {true} do { if (player distance pmcb2d1 < 4) exitWith {}; //PMC Base Building 2 Door 1 } if {true} do { if (player distance pmcb2d2 < 4) exitWith {}; //PMC Base Building 2 Door 2 } //PLAYER LOCATION LOCATION RESULTS switch(true) do { case (player distance pmcb1 < 4): //PMC Base Building 1 { if (_uid in _getUID) then {((nearestobjects [pmcbuilding1, ["Land_Research_house_V1_F"], 5]) select 0) setVariable ['bis_disabled_Door_1',1,true]; Sleep 2; hint "Locked";} else {Hint "You are not a PMC member!";}; }; case (player distance pmcb2d1 < 4): //PMC Base Building 2 Door 1 { if (_uid in _getUID) then {((nearestobjects [pmcbuilding2, ["Land_Research_house_V1_F"], 5]) select 0) setVariable ['bis_disabled_Door_1',1,true]; Sleep 2; hint "Locked";} else {Hint "You are not a PMC member!";}; }; case (player distance pmcb2d2 < 4): //PMC Base Building 2 Door 2 { if (_uid in _getUID) then {((nearestobjects [pmcbuilding2, ["Land_Research_house_V1_F"], 5]) select 0) setVariable ['bis_disabled_Door_2',1,true]; Sleep 2; hint "Locked";} else {Hint "You are not a PMC member!";}; }; }; Or should i format the POS check like this? while {true} do { if (player distance pmcb1 < 4) exitWith {}; //PMC Base Building 1 if (player distance pmcb2d1 < 4) exitWith {}; //PMC Base Building 2 Door 1 if (player distance pmcb2d2 < 4) exitWith {}; //PMC Base Building 2 Door 2 } IF ANYONE CAN HELP WITH THIS I WOULD APPRECIATE IT THANKS!
  15. I will give a try thanks again Walt and thanks JShock!
  16. Sorry i i understood switch _pos with player instead but after that you lost me. This is what i did from what i understood _pos = position player; switch (_pos) do { case (player distance pmcb1 < 4): { if (_uid in _getUID) then {((nearestobjects [pmcbuilding1, ["Land_Research_house_V1_F"], 5]) select 0) setVariable ['bis_disabled_Door_1',1,true]; Sleep 2; hint "Locked";} else {Hint "You are not a PMC member!";}; }; case (player distance pmcb2d1 < 4): { if (_uid in _getUID) then {((nearestobjects [pmcbuilding2, ["Land_Research_house_V1_F"], 5]) select 0) setVariable ['bis_disabled_Door_1',1,true]; Sleep 2; hint "Locked";} else {Hint "You are not a PMC member!";}; }; case (player distance pmcb2d2 < 4): { if (_uid in _getUID) then {((nearestobjects [pmcbuilding2, ["Land_Research_house_V1_F"], 5]) select 0) setVariable ['bis_disabled_Door_2',1,true]; Sleep 2; hint "Locked";} else {Hint "You are not a PMC member!";}; }; };
  17. Oh okay i did not know that. Thanks walt!
  18. By doing what you said would that hinder me from doing UID check since i added in this UID string to make sure only they can activate that certain door Unlock/Lock... _uid = getPlayerUID player; PMCMembers = compileFinal str [ "76561198060694901", // Scotsman "76561198010318478", // Happy "76561198064773232", // Louis "76561197985268626" // Booth ]; _getUID = call PMCMembers;
  19. So like this? if (player distance pmcb1 < 4 || player distance pmcb2d1 < 4 || player distance pmcb2d2 < 4) exitwith{ }; Now i'm amateur at scripting as you pointed out with the bad syntax SORRY but would the above adjustment tie into my cases below it? switch(true) do { case (player distance pmcb1 < 4): //PMC Base Building 1 { if (_uid in _getUID) then {((nearestobjects [pmcbuilding1, ["Land_Research_house_V1_F"], 5]) select 0) setVariable ['bis_disabled_Door_1',1,true]; Sleep 2; hint "Locked";} else {Hint "You are not a PMC member!";}; }; case (player distance pmcb2d1 < 4): //PMC Base Building 2 Door 1 { if (_uid in _getUID) then {((nearestobjects [pmcbuilding2, ["Land_Research_house_V1_F"], 5]) select 0) setVariable ['bis_disabled_Door_1',1,true]; Sleep 2; hint "Locked";} else {Hint "You are not a PMC member!";}; }; case (player distance pmcb2d2 < 4): //PMC Base Building 2 Door 2 { if (_uid in _getUID) then {((nearestobjects [pmcbuilding2, ["Land_Research_house_V1_F"], 5]) select 0) setVariable ['bis_disabled_Door_2',1,true]; Sleep 2; hint "Locked";} else {Hint "You are not a PMC member!";}; }; };
  20. Did icemans suggestion work?
  21. Hello i have an issue <-- lol no need to say that but whatever. ANYHOW i have a buy vehicle script that would spawn vehicles for me through a GUI. However, i later on wanted to set it so certain people could access that certain vehicle which displays it self originally (BEFORE I TRIED EDITING THE SCRIPT) like so. createDialog "CarMenu"; ctrlSetText[11120,format["Money: %1",(player getVariable "money")]]; if(side player == west) then { lbAdd[11121,"Quad : 5000"]; lbAdd[11121,"Offroad : 7500"]; if (player in list trgswatbase) then { lbAdd[11121,"Hunter : 10000"]; }; };; But then i thought what if i changed "if (player in list militaryhq) then {" to "if (player in list sergeant.sqf) then {" maybe it would grab player ids from a .sqf file and use that as reference in stead of someone being on a trigger named "militaryhq". WHICH THEN TURNED TO LOOK LIKE HIS createDialog "CarMenu"; ctrlSetText[11120,format["Money: %1",(player getVariable "money")]]; if(side player == west) then { lbAdd[11121,"Quad : 5000"]; lbAdd[11121,"Offroad : 7500"]; if (player in list sergeant.sqf) then { lbAdd[11121,"Hunter : 10000"]; }; }; if(side player == civilian) then { lbAdd[11121,"Quad : 5000"]; lbAdd[11121,"Offroad : 7500"]; }; Does anyone know how to reference the script to t a list of player ids instead?
  22. I made this dialog as a first project since this is my first time working with the GUI editor. I was wondering how you get your defines from you dialogue you made in the editor. Why i need this is i think it might fix the whole problem with my game crashing me every time i load the file in editor with the error message posted below. In case this help here is my defines and dialogs Defines #define ST_CENTER 0x02 #define ST_TITLE_BAR 0x20 #define ST_PICTURE 0x30 #define ST_FRAME 0x40 #define ST_BACKGROUND 0x50 #define ST_GROUP_BOX 0x60 #define ST_GROUP_BOX2 0x70 #define ST_HUD_BACKGROUND 0x80 #define ST_TILE_PICTURE 0x90 #define ST_WITH_RECT 0xA0 #define ST_LINE 0xB0 #define ST_SHADOW 0x100 #define ST_NO_RECT 0x200 #define ST_KEEP_ASPECT_RATIO 0x800 #define ST_TITLE ST_TITLE_BAR + ST_CENTER // Slider styles #define SL_DIR 0x400 #define SL_VERT 0 #define SL_HORZ 0x400 #define SL_TEXTURES 0x10 // progress bar #define ST_VERTICAL 0x01 #define ST_HORIZONTAL 0 // Listbox styles #define LB_TEXTURES 0x10 #define LB_MULTI 0x20 // Tree styles #define TR_SHOWROOT 1 #define TR_AUTOCOLLAPSE 2 // MessageBox styles #define MB_BUTTON_OK 1 #define MB_BUTTON_CANCEL 2 #define MB_BUTTON_USER 4 //////////////// //Base Classes// //////////////// class RscText { access = 0; idc = -1; type = CT_STATIC; style = ST_MULTI; linespacing = 1; colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,.5}; text = ""; shadow = 2; font = "default"; SizeEx = 0.02300; fixedWidth = 0; x = 0; y = 0; h = 0; w = 0; }; class RscPicture { access = 0; idc = -1; type = CT_STATIC; style = ST_PICTURE; colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; font = "default"; sizeEx = 0; lineSpacing = 0; text = ""; fixedWidth = 0; shadow = 0; x = 0; y = 0; w = 0.2; h = 0.15; }; class RscButton { access = 0; type = CT_BUTTON; text = ""; colorText[] = {1,1,1,.9}; colorDisabled[] = {0.4,0.4,0.4,0}; colorBackground[] = {0.75,0.75,0.75,0.8}; colorBackgroundDisabled[] = {0,0.0,0}; colorBackgroundActive[] = {0.75,0.75,0.75,1}; colorFocused[] = {0.75,0.75,0.75,.5}; colorShadow[] = {0.023529,0,0.0313725,1}; colorBorder[] = {0.023529,0,0.0313725,1}; soundEnter[] = {"\ca\ui\data\sound\onover",0.09,1}; soundPush[] = {"\ca\ui\data\sound\new1",0,0}; soundClick[] = {"\ca\ui\data\sound\onclick",0.07,1}; soundEscape[] = {"\ca\ui\data\sound\onescape",0.09,1}; style = 2; x = 0; y = 0; w = 0.055589; h = 0.039216; shadow = 2; font = "default"; sizeEx = 0.03921; offsetX = 0.003; offsetY = 0.003; offsetPressedX = 0.002; offsetPressedY = 0.002; borderSize = 0; }; class RscFrame { type = CT_STATIC; idc = -1; style = ST_FRAME; shadow = 2; colorBackground[] = {1,1,1,1}; colorText[] = {1,1,1,0.9}; font = "default"; sizeEx = 0.03; text = ""; }; class BOX { type = CT_STATIC; idc = -1; style = ST_CENTER; shadow = 2; colorText[] = {1,1,1,1}; font = "default"; sizeEx = 0.02; colorBackground[] = { 0.2,0.2,0.2, 0.9 }; text = ""; }; Dialogs class Bank { movingEnable = 0;//--- The dialog window can be moved. enableSimulation = true; controlsBackround[] = {}; idd = 10001; onLoad = "ExecVM '\banking\list.sqf'"; //--- Script loaded upon creation. controls[] = {bank_blackback1,bank_dlist,bank_blackback2,bank_wlist,bank_dtitle,bank_wtitle,bank_check,bank_moneylogo1,bank_moneylogo2,bank_title}; class bank_blackback1: RscPicture { idc = 1200; text = "#(argb,8,8,3)color(1,1,1,1)"; x = 1 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 14 * GUI_GRID_W; h = 10 * GUI_GRID_H; colorBackground[] = {0,0,0,1}; colorActive[] = {0,0,0,1}; }; class bank_dlist: RscListbox { idc = 1500; x = 1 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 14 * GUI_GRID_W; h = 10 * GUI_GRID_H; sizeEx = 1 * GUI_GRID_H; }; class bank_blackback2: RscPicture { idc = 1201; text = "#(argb,8,8,3)color(1,1,1,1)"; x = 25 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 14 * GUI_GRID_W; h = 10 * GUI_GRID_H; colorBackground[] = {0,0,0,1}; colorActive[] = {0,0,0,1}; }; class bank_wlist: RscListbox { idc = 1501; x = 25 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 14 * GUI_GRID_W; h = 10 * GUI_GRID_H; sizeEx = 1 * GUI_GRID_H; }; class bank_dtitle: RscText { idc = 1000; text = "Deposit"; //--- ToDo: Localize; x = 2.5 * GUI_GRID_W + GUI_GRID_X; y = 10.5 * GUI_GRID_H + GUI_GRID_Y; w = 10.5 * GUI_GRID_W; h = 3.5 * GUI_GRID_H; sizeEx = 3 * GUI_GRID_H; }; class bank_wtitle: RscText { idc = 1001; text = "Withdraw"; //--- ToDo: Localize; x = 25.5 * GUI_GRID_W + GUI_GRID_X; y = 10.5 * GUI_GRID_H + GUI_GRID_Y; w = 13.5 * GUI_GRID_W; h = 3.5 * GUI_GRID_H; sizeEx = 3 * GUI_GRID_H; }; class bank_check: RscButton { idc = 1600; text = "Check Balance"; //--- ToDo: Localize; x = 9.8 * GUI_GRID_W + GUI_GRID_X; y = 5 * GUI_GRID_H + GUI_GRID_Y; w = 20.5 * GUI_GRID_W; h = 4 * GUI_GRID_H; sizeEx = 3 * GUI_GRID_H; }; class bank_moneylogo1: RscPicture { idc = 1202; text = "#(argb,8,8,3)color(1,1,1,1)"; x = 0 * GUI_GRID_W + GUI_GRID_X; y = 3.5 * GUI_GRID_H + GUI_GRID_Y; w = 9 * GUI_GRID_W; h = 7 * GUI_GRID_H; }; class bank_moneylogo2: RscPicture { idc = 1203; text = "#(argb,8,8,3)color(1,1,1,1)"; x = 31 * GUI_GRID_W + GUI_GRID_X; y = 3.5 * GUI_GRID_H + GUI_GRID_Y; w = 9 * GUI_GRID_W; h = 7 * GUI_GRID_H; }; class bank_title: RscText { idc = 1002; text = "Bank"; //--- ToDo: Localize; x = 15.5 * GUI_GRID_W + GUI_GRID_X; y = 0 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 4.5 * GUI_GRID_H; sizeEx = 4 * GUI_GRID_H; }; };
  23. No it came up with the same error message upon loading in editor.
  24. Hi i am not really sure if this should be here or not (terrible with forums) What my problem is my BEC this is the messages i get https://www.dropbox.com/s/wwsj85qwsnb06xz/bec.PNG?m
×