Jump to content

BradApex

Member
  • Content Count

    26
  • Joined

  • Last visited

  • Medals

Community Reputation

9 Neutral

About BradApex

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. BradApex

    Surrender Script

    V1.1: Changed Install and added a master config
  2. BradApex

    Surrender Script

    V1.0: Changed while true loop to onEachFrame and updated KeyDown script
  3. Hello All, I made this surrender script so players can surrender I'm sure people can find a use for it in their mission. NOTE: There is no point in installing this script if you use ACE3. Installation: Step 1: Put the following into your description.ext, should be ok at the top of the file. If you don't have that file in your mission create it. #include "Configs\Config_Master.hpp" Step 2: Make the following folder in your mission root Configs\Config_Master. NOTE: If you changed the path put it into that path /* Author - BradApex Description: Master config so my scripts know which scripts of mine you are running, I will be relasing my bleedout script when it's done stay tuned :) */ class cfgMaster { UsingBleedoutScript = false; }; Step 3: Put the following Files into your init.sqf, If you don't have that file in your mission create it. _fnc_surrender = { /* Author - BradApex Description: Lets the player surrender */ if (player getVariable ["surrender", false]) exitWith { hint "You are already surrendering"; }; //-- Config Checks _usingBleedout = getText(missionConfigFile >> "cfgMaster" >> "UsingBleedoutScript"); player setVariable ["surrender", true, true]; player setCaptive true; player playMove "amovpercmstpsnonwnondnon_amovpercmstpssurwnondnon"; ["SURRENDER_HANDLER", "onEachFrame", { params [ ["_player",objNull,[objNull]], ["_usingBleedout", false, [false]] ]; if (_usingBleedout isEqualTo true) then { if (_player getVariable ["incapacitated", false]) then { _player setVariable ["surrender", nil, true]; _player setCaptive false; ["SURRENDER_HANDLER", "onEachFrame"] call BIS_fnc_removeStackedEventHandler; SURRENDER_HANDLER = nil; }; } else { if (!(alive _player)) then { _player setVariable ["surrender", nil, true]; _player setCaptive false; ["SURRENDER_HANDLER", "onEachFrame"] call BIS_fnc_removeStackedEventHandler; SURRENDER_HANDLER = nil; }; }; if (_player getVariable ["surrender", false]) then { _player setVariable ["surrender", false, true]; _player setCaptive false; _player playMoveNow "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon"; ["SURRENDER_HANDLER", "onEachFrame"] call BIS_fnc_removeStackedEventHandler; SURRENDER_HANDLER = nil; }; }, [player, _usingBleedout]] call BIS_fnc_addStackedEventHandler; }; _fnc_keyDown = { params["_ctrl","_dikCode","_shift","_ctrlKey", "_alt", ["_handled",false], ["_display", displayNull, [displayNull]]]; _code = _this select 1; _speed = speed cursorObject; _curObject = cursorObject; switch(_dikCode) do { //-- Shift + 6 case 7: { if (_shift) then { _handle = true; }; if (_shift) then { if (isNull objectParent player) then { if (player getVariable ["surrender", false]) then { player setVariable ["surrender", false, false]; } else { [] spawn _fnc_surrender; }; }; }; }; }; }; Last Step: Now the last step put this code below into your initPlayerLocal.sqf waitUntil {!isNull (findDisplay 46)}; (findDisplay 46) displayAddEventHandler ["KeyDown",{_this spawn _fnc_keyDown}]; Leave a comment on this post if you install this i'm interested to see and if there is any issues or bugs let me know.
  4. _data in a Dialog when I click the player's name it calls [_data] call APX_fnc_emsVariables;
  5. Hey people, I am having some issues with the GUI message function with a script I am making, I have the script below and I was wondering if you can help me correct the issue. It gives me the error "Generic error in expression" params["_target","_question"]; _question = ["You have been offered a job with the EMS Department do you accept?"] spawn BIS_fnc_guiMessage; waitUntil {!isNil "_question"}; if (_question) then { ["Status", "You have accepted the job offer to work at the EMS Department.", "amber"] call APX_fnc_show; ems = true; } else { ["Status", "You declined to work in the EMS Department", "amber"] call APX_fnc_show; ems = false; };
  6. BradApex

    CBA Error spam

    Thanks, Dedmen, I disabled that and CBA now works thanks for the help.
  7. BradApex

    CBA Error spam

    I am using version 3.7.0
  8. BradApex

    CBA Error spam

    Sorry about the late reply was trying to fix what I could, here's a full RPT from like 5 minutes ago https://pastebin.com/HNfW5rn3
  9. BradApex

    CBA Error spam

    Hey, I have the link here, couldn't get the full RPT uploaded pastebin would not let me but Pasted the whole error spam for you, I know there is an Error this on my behalf and I have since fixed the Issue. https://pastebin.com/H4nnryhn
  10. Hey, I am using CBA on my mission, I am getting this error below. I have no idea why it is doing it I have established that it's not the Mods for the server its something to do with the server its self. As I broke the DB for the server yesterday and All the mods worked including CBA and TFAR so Im not sure why CBA is not working correctly for this. I have tried multiple versions of CBA and still no luck, I am honestly baffled, I have also reinstalled the server and still no luck If you require the RPT then let me to know but the error spawn from CBA is clearly the issue. I have tried to get this to work for about 3 days now. Error position: <allVariables cba_events_eventNamespaceJI> Error Generic error in expression File x\cba\addons\events\XEH_postInit.sqf, line 12 Error in expression <all CBA_fnc_localEvent; }; }; } forEach allVariables cba_events_eventNamespaceJI> That's all it gives you then spams the same error over and Over again.
  11. BradApex

    List row height

    Where do I define this in the list box class if so what do I put this haven't got this error before.
  12. BradApex

    List row height

    here you go, this is my Baseclasses so its what I have defined, and the description.ext is below. https://pastebin.com/aExdyU8X // Defines.hpp https://pastebin.com/189U5uW6 // Description.ext
  13. Hey Everyone, I have made a spawn menu and it's all working, I have the following error when the menu opens, I don't know how to fix this can anyone assist?
  14. Hey Everyone, Having some issues with this bit of code it says "generic error in expression" and I can't figure out whats up with it. params [ ["_player", [], [[]]] ]; private _return = false; { if ((Lobby_slottedPlayers getVariable _x select 1) isEqualTo (_player select 1)) then { Lobby_slottedPlayers setVariable [_x, nil, true]; missionNamespace setVariable ["Lobby_updateSlots", true, true]; }; } forEach allVariables Lobby_slottedPlayers; _return Anyone able to help with this? im baffled.
  15. Hey everyone, I seem to be having issue with [] ExecVM and [] call In sp and MP, I am making some scripts that spawn on a timer and them execute when that timer is done, I cant get them to spawn the only way is to paste the code from the files into debug console and that works, What am I doing wrong? I have my functions called in CFGFunctions.h and every other function works. when called rather it be on timer or me calling it. init.sqf /* Author - Apex © All Memes Reserved Website - https://sora3milsim.com Calls all Functions for the dynamic missions, and some other files too. */ // start missions [] execVM "Functions\Missions\Pilot\fn_Pilotinit.sqf"; [] execVM "Functions\Missions\Hostage\fn_Hostageinit.sqf"; // fn_Hostageinit.sqf // this called the file below, I have tried call and everything /* Author - Apex © All Memes Reserved Website - https://sora3milsim.com */ sleep (5 * 60); [] execVM "Functions\Missions\Hostage\fn_hostageSpawn.sqf"; systemchat "SPAWNING HOSTAGE MISSION... STAND BY!" fn_hostageSpawn.sqf /* Author - Apex © All Memes Reserved Website - https://sora3milsim.com */ private ["_captive","_radius","_hostageArea","_hostageAreaEllipse","_positions","_groupAlpha","_temp","_unit","_animations"]; _positions = (getMarkerPos (selectRandom["hostage_1","hostage_2","hostage_3"])); _animations = selectRandom ["Acts_AidlPsitMstpSsurWnonDnon01","Acts_AidlPsitMstpSsurWnonDnon02","Acts_AidlPsitMstpSsurWnonDnon03","Acts_AidlPsitMstpSsurWnonDnon04","Acts_AidlPsitMstpSsurWnonDnon05","Acts_ExecutionVictim_Loop"]; _captive = _this select 0; _radius = 250; ["Hostage Rescue", "We have reports that some Journalists have gone missing, we have thier location you must rescue them before we can never see them again!"] call SOR_fnc_showNotification; _hostageArea = createMarker ["hostageArea",_positions]; _hostageArea setMarkerColor "ColorCiv"; _hostageArea setMarkerType "mil_dot"; _hostageArea setMarkerText "Rescue Hostages"; _hostageArea setMarkerAlpha 0.95; _hostageAreaEllipse = createMarker ["hostageAreaEllipse",_positions]; _hostageAreaEllipse setMarkerColor "ColorRed"; _hostageAreaEllipse setMarkerType "Empty"; _hostageAreaEllipse setMarkerShape "ELLIPSE"; _hostageAreaEllipse setMarkerBrush "DIAGGRID"; _hostageAreaEllipse setMarkerSize [_radius,_radius]; _groupAlpha = createGroup [east,true]; _temp = []; for "_i" from 0 to 10 do { _unit = _groupAlpha createUnit ["LOP_BH_Infantry_Rifleman", (getMarkerPos "hostageArea"), [], 0, "FORM"]; _temp pushBack _unit; }; _groupJournalist = createGroup [civilian,true]; for "_i" from 0 to 1 do { _captive = _groupJournalist createUnit ["C_Journalist_01_War_F", (getMarkerPos "hostageArea"), [], 0, "FORM"]; _temp pushBack _unit; _captive switchMove _animations; }; removeAllWeapons _captive; removeBackpack _captive; _captive disableAI "MOVE"; _captive disableAI "AUTOTARGET"; _captive disableAI "ANIM"; _captive allowFleeing 0; _captive setBehaviour "Careless"; [ _captive, "Free Hostage", "\a3\ui_f\data\IGUI\Cfg\HoldActions\holdAction_unbind_ca.paa", "\a3\ui_f\data\IGUI\Cfg\HoldActions\holdAction_unbind_ca.paa", "true", "true", {}, {}, {if (_this select 3 select 0 == "Acts_ExecutionVictim_Loop") then { _this select 0 playMove "Acts_ExecutionVictim_Unbow"; } else { _this select 0 switchMove "Acts_AidlPsitMstpSsurWnonDnon_out"; }; _complMessage = selectRandom ["I thought I was gonna die in here!","Thank you so much man.","I think I shit my pants...","Can I hug you?","I'M ALIVE.","Where the hell am I?"]; ["Hostage", _complMessage] remoteExec ["BIS_fnc_showSubtitle"]; sleep 5; (_this select 0) enableAI "MOVE"; (_this select 0) enableAI "AUTOTARGET"; (_this select 0) enableAI "ANIM"; (_this select 0) setBehaviour "SAFE"; [(_this select 0),(_this select 2)] remoteExec ["bis_fnc_holdActionRemove",[0,-2] select isDedicated,true]; }, { _intrMessage = selectRandom ["Hey! I don't wanna die here!","Don't leave me here man! Please!","THEY'RE EATING PEOPLE. GET ME OUT OF HERE.","*Mumbles* Shit shit shit..."]; ["Hostage", _intrMessage] remoteExec ["BIS_fnc_showSubtitle"]; }, [_animations], 3, 0, true, false ] remoteExec ["BIS_fnc_holdActionAdd",[0,-2] select isDedicated,true]; sleep (25 * 60); ["Hostage Rescue", "The mission has now ended.", [1,0,0,1]] call SOR_fnc_showNotification; deleteMarker "hostageArea"; deleteMarker "hostageAreaEllipse"; sleep 2; [] execVM "Functions\Missions\Hostage\fn_Hostageinit.sqf";
×