Jump to content
  • 0

Custom loadout


Trizen

Question

Hey!

 

I'm currently having a problem on my server where as a few of my custom load out sets have stopped working (unknown reason). Unfortunately the only backup of the mission.pbo which I have is recent and includes the problem!

 

As usual the newloadout.sqf is called in the init.sqf of the mission.pbo. 

 

init.sqf:

 

 

if (!isDedicated) then {

...
   //Forces Custom Loadouts Call
[] ExecVM "scripts\newloadout.sqf";
...

 

newloadout.sqf:

//Default Loadout

DefaultMagazines = ["ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodSteakCooked","BoltSteel","BoltSteel","BoltSteel"];
DefaultWeapons = ["Crossbow","glock17_EP1","ItemMap","ItemFlashlightRed","ItemHatchet"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";

//Admin Loadout: Skyfall009

if ((getPlayerUID player) in ["166587590", "30015046"]) then { 
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","ItemWaterbottleBoiled","FoodSteakCooked","20Rnd_B_AA12_74Slug","20Rnd_B_AA12_Pellets","20Rnd_B_AA12_Pellets","ItemGoldBar10oz", "Skin_Rocket_DZ"];
	DefaultWeapons = ["glock17_EP1","AA12_PMC","Binocular_Vector","NVGoggles","ItemMap","ItemCompass","ItemGPS","ItemWatch","ItemKnife","ItemToolbox","ItemCrowbar","ItemEtool","ItemHatchet"];
	DefaultBackpack = "DZ_LargeGunBag_EP1";
	DefaultBackpackWeapon = "";};

//Recon Donator Loadout: MrMunch  Tay Remi THCCraig MrTinkertin Joe JOHN

if ((getPlayerUID player) in ["96335814", "232739974", "46237190", "155258950", "42568454", "124715718", "198392838", "113286278"]) then {
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBloodbag","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodSteakCooked","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","ItemGoldBar10oz","Skin_Sniper_DZ"];
	DefaultWeapons = ["M9SD","DMR","NVGoggles","ItemMap","ItemCompass","ItemGPS","ItemWatch","ItemKnife","ItemToolbox","ItemCrowbar","ItemEtool","ItemHatchet"];
	DefaultBackpack = "DZ_GunBag_EP1";
	DefaultBackpackWeapon = "";};

//Assault Donator Loadout: Snif THCCaptain Soapy LYNSKEY

if ((getPlayerUID player) in ["92022406", "198392006", "36094982", "823169"]) then {  
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","ItemBloodbag","FoodSteakCooked","30Rnd_556x45_Stanag","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","ItemGoldBar10oz"];
	DefaultWeapons = ["M9SD","M4A1_AIM_SD_camo","ItemMap","ItemCompass","ItemGPS","ItemWatch","ItemKnife","ItemToolbox","ItemCrowbar","ItemEtool","ItemHatchet"];
	DefaultBackpack = "DZ_GunBag_EP1";
	DefaultBackpackWeapon = "";};

//LMG Donator Loadout: TRIZEN

if ((getPlayerUID player) in [""]) then {  
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","FoodSteakCooked","200Rnd_556x45_M249","200Rnd_556x45_M249","200Rnd_556x45_M249","ItemGoldBar10oz","Skin_Soldier1_DZ"];
	DefaultWeapons = ["M9SD","M249_DZ","ItemMap","ItemCompass","ItemGPS","ItemWatch","ItemKnife","ItemToolbox","ItemCrowbar","ItemEtool","ItemHatchet"]; 
	DefaultBackpack = "DZ_GunBag_EP1";
	DefaultBackpackWeapon = "";};

Any help as to why people only seem to spawn with the default loadout would be greatly appreciated.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Idk man mine is working. You might want to try to check your syntax. Otherwise, here is mine for an example...

//Admin Loadout
if ((getPlayerUID player) in ["UIDs"]) then {  //Admins: Filtechplay, FragZ, David
    DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","Skin_Graves_Light_DZ","FoodSteakCooked","20Rnd_B_AA12_74Slug","20Rnd_B_AA12_Pellets","20Rnd_B_AA12_Pellets","ItemGoldBar10oz","10Rnd_127x99_m107","10Rnd_127x99_m107"];
    DefaultWeapons = ["glock17_EP1","AA12_PMC","Binocular_Vector","NVGoggles","ItemMap","ItemCompass","ItemGPS","ItemWatch","ItemKnife","Itemtoolbox","ItemCrowbar","Itemetool","ItemHatchet_DZE"];
    DefaultBackpack = "DZ_LargeGunBag_EP1";
    };

  

Link to comment
Share on other sites

  • 0

Im new to this but your default Backpack Weapon looks like it is missing a } and ; on your Default loadout so it is getting stuck there.

 

DefaultBackpackWeapon = "";

 

 

DefaultBackpackWeapon = "";};

 

I don't think this is an issue.

There is no '{' which means there is no need to add this '}'.

 

 

This is what I have used and so far I have not noticed any issues but I have a very low population on my server so can't state that it will work 100% of the time.

Link to comment
Share on other sites

  • 0

I have the same issue with it grabbing default loadouts. I even scripted in an if/else statement to force it to choose. The only way I got it to take, was to delete all records of the id from the database and it would spawn in.

 

***

 

Ah, I figured out a trick to deal with it. When a player with a custom loadout dies, they have to complely log out and close the client. When I upgraded to 1.0.4.2, I discovered this step wasn't needed, until I re-added Sarge AI.

 

Oh well

Link to comment
Share on other sites

  • 0

I have made an addon to my site linked to phpbb3 forums that gets UIDS as part of registration, then gets lists of gear from a database uses the players forum group to decide what group they belong to then it constructs 3 files.

1 for default starting gear, 1 for group starting gear and 1 for personal starting gear.

 

Then it uploads the created file to the FTP of the the server so next time it restarts it is applied, the only problem i am having atm is i can't work out what the correct method is for entering backpack items.

 

If i wanted to give 5 steaks in the players backpack at the start do i enter it in the DefaultBackpackWeapon field? it's not a weapon so why should it?

Link to comment
Share on other sites

  • 0

Also to help the OP here is my working SQF (as constructed by website)

 

//group UIDs
        //Members of FoRe Member group
        FoRe_all = ["12345678910","12345678910","12345678910","12345678910","12345678910","12345678910","12345678910","12345678910"];
        //Members of FoRe Officers group
        FoRe_off = [];
        //Members of xHG Clan group
        xHG = [];
        
        
        //group gears
        //IF is in FoRe Member group
        if ((getPlayerUID player) in FoRe_all) then {
        
        DefaultMagazines = ["ItemBandage", "ItemPainkiller", "ItemMorphine", "FoodbeefCooked", "WoodenArrow", "WoodenArrow", "WoodenArrow", "WoodenArrow", "WoodenArrow", "WoodenArrow", "ItemSodaPepsi", "PartWheel", "Skin_Soldier1_DZ"];
        DefaultWeapons = ["Makarov", "Crossbow", "Binocular", "ItemFlashlightRed", "ItemMap", "ItemToolbox"];
        DefaultBackpack = ["DZ_CompactPack"];
        DefaultBackpackWeapon = [];
        };
        //IF is in FoRe Officers group
        if ((getPlayerUID player) in FoRe_off) then {
        
        DefaultMagazines = ["ItemBandage", "15Rnd_9x19_M9", "15Rnd_9x19_M9", "ItemPainkiller", "ItemMorphine", "FoodbeefCooked", "WoodenArrow", "WoodenArrow", "WoodenArrow", "WoodenArrow", "WoodenArrow", "WoodenArrow", "ItemSodaPepsi", "PartWheel", "Skin_Rocket_DZ"];
        DefaultWeapons = ["M9", "Crossbow", "Binocular", "ItemFlashlightRed", "ItemMap", "ItemToolbox"];
        DefaultBackpack = ["DZ_GunBag_EP1"];
        DefaultBackpackWeapon = [];
        };
        //IF is in xHG Clan group
        if ((getPlayerUID player) in xHG) then {
        
        DefaultMagazines = ["ItemBandage", "ItemPainkiller", "WoodenArrow", "WoodenArrow", "WoodenArrow", "WoodenArrow", "WoodenArrow", "WoodenArrow"];
        DefaultWeapons = ["ItemFlashlight", "Crossbow", "ItemMachete"];
        DefaultBackpack = ["DZ_CompactPack_EP1"];
        DefaultBackpackWeapon = [];
        };

 

Differences i noticed are:the [] on defaultbackpack and backpackweapon.
      

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...