brunohxcx 21 Posted July 29, 2018 I know how to disable it tru options, but if I publish my misssion, i ll have to ask everyone who download it to change theier keybinds? 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted July 29, 2018 18 minutes ago, brunohxcx said: keybinds I would suggest you to open a new topic about it. I'll try to check this also. Share this post Link to post Share on other sites
LSValmont 789 Posted December 16, 2018 Hey George, I was testing your Holster Script and it is one of the bests, only surpassed by ACE 3. Of course ACE has a dream team of coders. Anyway, If you could check their implementation maybe you can get to fix this: If you are prone and press H to holster/unholster your weapon, your character stands up and plays the standing weapon switch animation... potentially revealing you to the enemy. In Ace, if you are prone and press the holster/unholster your player character does the animation in the prone position. This is probably also happening in the CROUCH position too. Other than that it is a smooth implementation! 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 16, 2018 1 hour ago, LSValmont said: If you are prone and press H to holster/unholster your weapon, your character stands up and plays the standing weapon switch animation Thanks for the information , i will check about , because i think that is not like this if i remember right and the default key is not H but with key 5 . Might be this from a different script ? Share this post Link to post Share on other sites
LSValmont 789 Posted December 16, 2018 11 minutes ago, GEORGE FLOROS GR said: Thanks for the information , i will check about , because i think that is not like this if i remember right and the default key is not H but with key 5 . Might be this from a different script ? I think I changed the key to H (findDisplay 46) displayAddEventHandler ["KeyDown", { if(_this select 1 == 0x23) // key H DIK_H then { But that should not change functionality I think. Unless you are using ACE, the H key is perfect for Holster =) Another little thing... If you use your holster script on BIS save enabled missions, the Holster will not work anymore after a save reload. Thats all I've to report Sir. Valmont out. 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 16, 2018 1 hour ago, LSValmont said: Thats all I will check this once i can , thanks for the feedback ! 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 26, 2018 On 16/12/2018 at 8:50 PM, LSValmont said: Thats all I've to report Sir. Valmont out. You were right about and i will try to fix this and as for the save , load , i have forgot to add : disableSerialization; this should fix the issue. 1 Share this post Link to post Share on other sites
LSValmont 789 Posted December 26, 2018 Thanks George! What about the issue where if you are prone/crouching and you unholster your weapon your character stands up...? 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 26, 2018 49 minutes ago, LSValmont said: What about the issue where if you are prone/crouching This is what i was saying , i need to check this. Share this post Link to post Share on other sites
LSValmont 789 Posted December 26, 2018 4 hours ago, GEORGE FLOROS GR said: This is what i was saying , i need to check this. Sorry I didn't catch that... I am still with the hangover from the holidays =) By the way as I said before in ACE if you press the unholster key while prone you unholster your main weapon without standing up so it works perfectly there and could be use as an example maybe. 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 26, 2018 1 minute ago, LSValmont said: ACE Thank you i 'll check about it ! 1 Share this post Link to post Share on other sites
LSValmont 789 Posted February 4, 2019 Hello George! May I ask if there have been any updates on this? 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted February 4, 2019 Just now, LSValmont said: any updates Hello there LSValmont ! I tried a bit actually , but still did'nt succeed in ! I need to dig this more ! 1 Share this post Link to post Share on other sites
LSValmont 789 Posted March 25, 2019 This still does not work for saved games. As soon as you reload a saved game it stops working. I tried adding disableSerialization; on top but still the same thing. =( 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 25, 2019 Thanks for telling me, i need to check about it ! 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 25, 2019 5 hours ago, LSValmont said: This still does not work for saved games. As soon as you reload a saved game it stops working. I tried adding disableSerialization; I tried a little bit but i can't figure out . So if someone knows it would be helpful ! Thanks ! disableSerialization; waitUntil {!(isNull (findDisplay 46))}; _display = findDisplay 46; GF_Holster = (uiNamespace getVariable "Var_GF_Holster") ,_display displayAddEventHandler["KeyDown", { params ["_display", "_key", "_shift", "_ctrl", "_alt"]; if(_key isEqualto 0x06) // key 5 DIK_5 then { if (currentWeapon player != "" )then{ //________________ Weapon on the back ________________ player action ["SWITCHWEAPON",player,player,-1]; waitUntil {currentWeapon player isEqualto "" or {primaryWeapon player isEqualto "" && handgunWeapon player isEqualto ""}}; hint"Weapon on the back"; }else{ //________________ Weapon in front ________________ player action ["SWITCHWEAPON",player,player,0]; hint"Weapon in front"; }; }; }]; 1 Share this post Link to post Share on other sites
major-stiffy 280 Posted March 26, 2019 Myself, I prefer it through addAction like this guy did. /*_______________________________________ Author: Phantom Wolf Parameters: Nil Syntax: [] execVM "PW_holsterAction.sqf"; Usage: init.sqf, onPlayerRespawn.sqf or via Trigger __________________________________________*/ waitUntil {(!isNull player) and (alive player)}; player addAction [ "<t color='#FF1493'>Holster Weapon" , { player action [ "hideWeapon", player, player, 101 ] }, [], 1, false, true, "", "currentWeapon player != '' && vehicle player == player", -1, false ]; player addAction [ "<t color='#FF1493'>Weapon in hands", { player action [ "hideWeapon", player, player, 0 ] }, [], 1, false, true, "", "currentWeapon player == '' && vehicle player == player && { primaryWeapon player != '' } ", -1, false ]; 1 Share this post Link to post Share on other sites
LSValmont 789 Posted March 26, 2019 1 hour ago, major-stiffy said: Myself, I prefer it through addAction like this guy did. Thank you for the suggestion Major, but actually what I liked about this script is the fact that you don't clutter your addAction menu with more actions on an already crowded place and I had absolutely nothing mapped to the H key. 1 Share this post Link to post Share on other sites
LSValmont 789 Posted March 26, 2019 15 hours ago, GEORGE FLOROS GR said: I tried a little bit but i can't figure out . So if someone knows it would be helpful ! Thanks ! disableSerialization; waitUntil {!(isNull (findDisplay 46))}; _display = findDisplay 46; GF_Holster = (uiNamespace getVariable "Var_GF_Holster") ,_display displayAddEventHandler["KeyDown", { params ["_display", "_key", "_shift", "_ctrl", "_alt"]; if(_key isEqualto 0x06) // key 5 DIK_5 then { if (currentWeapon player != "" )then{ //________________ Weapon on the back ________________ player action ["SWITCHWEAPON",player,player,-1]; waitUntil {currentWeapon player isEqualto "" or {primaryWeapon player isEqualto "" && handgunWeapon player isEqualto ""}}; hint"Weapon on the back"; }else{ //________________ Weapon in front ________________ player action ["SWITCHWEAPON",player,player,0]; hint"Weapon in front"; }; }; }]; Perhaps one of the legends can help you: 4 hours ago, Grumpy Old Man said: On 3/23/2019 at 11:43 AM, Larrow said: 11 minutes ago, pierremgi said: 1 Share this post Link to post Share on other sites
pierremgi 4900 Posted March 26, 2019 You omitted @GEORGE FLOROS GR It's seems to me your code is his (GF). Anyway, try: 0 = [] spawn { disableSerialization; waitUntil {!(isNull (findDisplay 46))}; _display = findDisplay 46; _display displayAddEventHandler["KeyDown", { params ["_display", "_key", "_shift", "_ctrl", "_alt"]; if(_key isEqualto 0x06) then { if (currentWeapon player != "" )then{ player action ["SWITCHWEAPON",player,player,-1]; waitUntil {currentWeapon player isEqualto "" or {primaryWeapon player isEqualto "" && handgunWeapon player isEqualto ""}}; hint"Weapon on the back"; }else{ player action ["SWITCHWEAPON",player,player,0]; hint"Weapon in front"; }; }; }]; }; 2 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 26, 2019 Thank you very much Pierre ! To be honest this was what i was about to test ! 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 26, 2019 14 minutes ago, pierremgi said: try I was running the code from the initPlayerlocal and i also tried from the init , but still after saving in MP and entering the mission again , it is still not working. Might be that i'm doing something wrong ? Share this post Link to post Share on other sites
pierremgi 4900 Posted March 26, 2019 No clue on which scripts re-run in these cases: SP save, exit, load continue; MP return to looby, choose another slot, or keep the same, back to the game; MP save (admin?) exit (hosted/dedicated server), load and continue. And I never saw any documentation about that. Perhaps, here, with EH playerConnected ? 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 26, 2019 2 minutes ago, pierremgi said: Perhaps, here, with EH playerConnected ? Thank you , i'm going to check it! I also found this similar : https://feedback.bistudio.com/T85800 but i have no idea how though ! 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 26, 2019 40 minutes ago, pierremgi said: Perhaps, here, with EH playerConnected ? This is working ! Thanks again Pierre ! I just removed the " 0 = " from the code : init.sqf addMissionEventHandler ["PlayerConnected", { params ["_id", "_uid", "_name", "_jip", "_owner"]; _owner execVM "GF_Holster\GF_Holster.sqf"; if(isServer) exitwith{}; _jip execVM "GF_Holster\GF_Holster.sqf"; }]; GF_Holster.sqf [] spawn { disableSerialization; waitUntil {!(isNull (findDisplay 46))}; _display = findDisplay 46; _display displayAddEventHandler["KeyDown", { params ["_display", "_key", "_shift", "_ctrl", "_alt"]; if(_key isEqualto 0x06) then { if (currentWeapon player != "" )then{ player action ["SWITCHWEAPON",player,player,-1]; waitUntil {currentWeapon player isEqualto "" or {primaryWeapon player isEqualto "" && handgunWeapon player isEqualto ""}}; hint"Weapon on the back"; }else{ player action ["SWITCHWEAPON",player,player,0]; hint"Weapon in front"; }; }; }]; }; 2 Share this post Link to post Share on other sites