Redphoenix 1540 Posted July 21, 2014 (edited) I am currently working on a small TDM VR Mission, but I want to give the players a custom loadout to choose in the respawn menu. description.ext OnLoadMission = "6 vs 6 in a random virtuel urban environment."; OnLoadName = "TDM12 VR CQB"; Author = "RedPhoenix"; loadScreen = "vr.jpg"; respawn = 3; respawnDelay = 10; respawnDialog = 1; aikills = 0; respawnTemplates[] = {"Tickets", "EndMission", "Counter", "MenuPosition", "MenuInventory"}; disabledAI = true; disableChannels[] = {0,2,4,5,6}; joinUnassigned = 1; class Header { gameType = TDM; minPlayers = 2; maxPlayers = 12; }; //Respawn Templates class CfgRespawnInventory { #include "loadouts.hpp" }; init.sqf // Loadouts WaitUntil {Sleep 1; Local Player}; _gear = [west, "west1"] call BIS_fnc_addRespawnInventory; _gear = [west, "west2"] call BIS_fnc_addRespawnInventory; _gear = [east, "east1"] call BIS_fnc_addRespawnInventory; _gear = [west, "east2"] call BIS_fnc_addRespawnInventory; loadouts.hpp class WEST1 { displayName = "CQB VR 6.5mm"; // Name visible in the menu icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "arifle_MXC_Black_F" }; magazines[] = { "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "V_BandollierB_blk", "G_Goggles_VR", "optic_Holosight" }; uniformClass = "U_B_Protagonist_VR"; }; class WEST2 { displayName = "CQB VR 9mm"; // Name visible in the menu icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "hgun_PDW2000_Holo_F" }; magazines[] = { "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "V_BandollierB_blk", "G_Goggles_VR" }; uniformClass = "U_B_Protagonist_VR"; }; class EAST1 { displayName = "CQB VR 6.5mm"; // Name visible in the menu icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "arifle_MXC_Black_F" }; magazines[] = { "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "V_BandollierB_blk", "G_Goggles_VR", "optic_Holosight" }; uniformClass = "U_O_Protagonist_VR"; }; class EAST2 { displayName = "CQB VR 9mm"; // Name visible in the menu icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "hgun_PDW2000_Holo_F" }; magazines[] = { "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "V_BandollierB_blk", "G_Goggles_VR" }; uniformClass = "U_O_Protagonist_VR"; }; Problem: Those Loadouts won't shop up. Neither at the start nor if I'm dead and respawn. Someone said that I should load BIS_fnc_addRespawnInventory at the very end, which I did, and even enlarged the time by inserting a sleep, but it still is not working. Edited July 21, 2014 by RedPhoenix updated with full description.ext Share this post Link to post Share on other sites
Belbo 462 Posted July 21, 2014 You have to put respawnTemplatesWest[] = {"MenuInventory"}; in your description.ext, otherwise the loadout-menu won't show up. Share this post Link to post Share on other sites
Redphoenix 1540 Posted July 21, 2014 (edited) You have to putrespawnTemplatesWest[] = {"MenuInventory"}; in your description.ext, otherwise the loadout-menu won't show up. So,... respawnTemplates[] = {"Tickets", "EndMission", "Counter", "MenuPosition", "MenuInventory"}; Is not enough? But even with your code it is not working. I updated startpost with full description.ext Edited July 21, 2014 by RedPhoenix Share this post Link to post Share on other sites
Belbo 462 Posted July 21, 2014 So,...respawnTemplates[] = {"Tickets", "EndMission", "Counter", "MenuPosition", "MenuInventory"}; Is not enough? But even with your code it is not working. I updated startpost with full description.ext hm... curious. Have you tried it without _gear in front of the calls? Share this post Link to post Share on other sites
Redphoenix 1540 Posted July 21, 2014 hm... curious. Have you tried it without _gear in front of the calls? Yes, still not working. Share this post Link to post Share on other sites
Belbo 462 Posted July 21, 2014 Yes, still not working. well, then I can't really help you, as I don't see any errors. I called my loadouts with if (isServer) {}; in the init.sqf without any sleeps and it works for me. The only difference is that I use standard classes. Share this post Link to post Share on other sites
Redphoenix 1540 Posted July 21, 2014 well, then I can't really help you, as I don't see any errors. I called my loadouts with if (isServer) {}; in the init.sqf without any sleeps and it works for me. The only difference is that I use standard classes. Tried if (isServer) {}; - if (isDedicated) {}; and without all of that - Still not working. Tried it also with [west,"b_soldier_ar_f"] call bis_fnc_addrespawninventory; - No results. Share this post Link to post Share on other sites
Larrow 2823 Posted July 21, 2014 Is it case sensitive?? _gear = [west, "west1"] call BIS_fnc_addRespawnInventory; class WEST1 Share this post Link to post Share on other sites
Redphoenix 1540 Posted July 21, 2014 Is it case sensitive?? _gear = [west, "west1"] call BIS_fnc_addRespawnInventory; class WEST1 Nope. Tried it - doesn't work. Share this post Link to post Share on other sites
SavageCDN 231 Posted July 21, 2014 _gear = [west, "west1"] call BIS_fnc_addRespawnInventory; Try just: [west, "west1"] call BIS_fnc_addRespawnInventory; [west, "west2"] call BIS_fnc_addRespawnInventory; [east, "east1"] call BIS_fnc_addRespawnInventory; [west, "east2"] call BIS_fnc_addRespawnInventory; and perhaps lose the: WaitUntil {Sleep 1; Local Player}; Or put the BIS_fnc_addRespawnInventory functions in initServer.sqf instead. Share this post Link to post Share on other sites
Redphoenix 1540 Posted July 21, 2014 (edited) Try just:[west, "west1"] call BIS_fnc_addRespawnInventory; [west, "west2"] call BIS_fnc_addRespawnInventory; [east, "east1"] call BIS_fnc_addRespawnInventory; [west, "east2"] call BIS_fnc_addRespawnInventory; Already tried, no effect. Or put the BIS_fnc_addRespawnInventory functions in initServer.sqf instead. Will do. Edit: Okay, thanks, seems like executing the script in initServer.sqf made it working. Edited July 21, 2014 by RedPhoenix Share this post Link to post Share on other sites
SavageCDN 231 Posted July 21, 2014 Unless the latest update screws this up I know it does work :p I can check my mission that has this setup if you still can't make it work. Share this post Link to post Share on other sites
Redphoenix 1540 Posted July 21, 2014 Unless the latest update screws this up I know it does work :p I can check my mission that has this setup if you still can't make it work. Check with my edit. Executing the script in initServer.sqf fixed it all. Share this post Link to post Share on other sites
Alleged Accomplice 29 Posted January 28, 2017 Old topic I know but I am using Redphoenix's way of doing individual custom loadouts on a multiplayer PvP battle. I am getting hung up trying to add backpacks and helmets to the loadouts.hpp. It always throws an error. I think I am not adding these items correctly, everything else works perfect. I just replace what Redphoenix put in his loadouts with what I want in mine (WWII IFA lite stuff) and of course making a initServer.sqf file like Savage said. I don't see backpacks and helmets in Redphoenix's loadout and I've looked through all the hpp files I can, apparently the wrong ones, to see how those things are added. Ok I got the backpack but the helmet won't work Spoiler class WEST1 { displayName = "German Lite Inf 1"; // Name visible in the menu // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "LIB_K98" }; magazines[] = { "LIB_5Rnd_792x57", "LIB_5Rnd_792x57", "LIB_5Rnd_792x57", "LIB_5Rnd_792x57", "LIB_5Rnd_792x57", "LIB_5Rnd_792x57", "LIB_5Rnd_792x57", "LIB_5Rnd_792x57", "LIB_5Rnd_792x57", "LIB_shg24", "LIB_shg24", "LIB_nb39", "LIB_nb39" }; Headgear[] = { "H_LIB_GER_HelmetCamo_14" }; items[] = { "FirstAidKit", "FirstAidKit" }; linkedItems[] = { "V_LIB_GER_VestKar98", "ItemMap", "ItemCompass" }; backpack[] = { "B_LIB_GER_A_frame" }; uniformClass = "U_LIB_GER_Soldier_camo_00v00pSch3K98"; }; Share this post Link to post Share on other sites