Jump to content
  • 0

Custom Loadout help


ObamaCare

Question

I think I've tried about 6 different methods to change the default player spawn loadout, and nothing seems to be working.

 

Here's a relevant snippet of the mission pbo's init.sqf

if (!isDedicated) then {
	//Conduct map operations
	0 fadeSound 0;
	waitUntil {!isNil "dayz_loadScreenMsg"};
	dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");

	//Custom Loadouts
	[] ExecVM "Scripts\loadout.sqf";
	
	//Run the player monitor
	_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
	_playerMonitor = 	[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";	
	
	//anti Hack
	[] execVM "admintools\AdminList.sqf";

I made sure that that the directory was correct and everything. Here's the loadout.sqf file

//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodSteakCooked"];
DefaultWeapons = ["glock17_EP1","ItemFlashlight","ItemHatchet"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";

Yet the players always spawn, even after death, with the crowbar (default) loadout.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Any RPT files by chance? Could help figure out the problem.
Otherwise you can try this setup:
 

waitUntil {(getPlayerUID player) != ""};
//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","FoodCanSardines","ItemWaterbottle","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"];
DefaultWeapons = ["Itemtoolbox","ItemMap","ItemHatchet_DZE","ItemCompass","ItemKnife","M9SD"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";
Link to comment
Share on other sites

  • 0

put 

//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","FoodCanSardines","ItemWaterbottle","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"];
DefaultWeapons = ["Itemtoolbox","ItemMap","ItemHatchet_DZE","ItemCompass","ItemKnife","M9SD"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";

just after your // DayZ Epoch config stuff

Link to comment
Share on other sites

  • 0

I was planning on fixing those errors after I find a solution for this. And that was actually the first thing I tried. I noticed in the cache folder there is a file called default.sqf, and that contains the default spawn items in it, but whenever I edit it it gets overwritten on restart. I'm running a Linux server if that changes anything.

Link to comment
Share on other sites

  • 0

all you gotta do is put this:

DefaultMagazines = ["ItemBandage","ItemBandage","ItemMorphine","ItemBloodbag","ItemAntibiotic","ItemPainkiller","ItemWaterbottleBoiled","FoodCanBakedBeans","30rnd_9x19_MP5","30rnd_9x19_MP5","30rnd_9x19_MP5"]; 
DefaultWeapons = ["ItemFlashlight","ItemHatchet_DZE","ItemMap","ItemCompass","MP5A5"]; 
DefaultBackpack = "DZ_ALICE_Pack_EP1"; 
//DefaultBackpackWeapon = "";

just above dayz_paraSpawn = true; in your init.sqf

and modify it the way you like!

Link to comment
Share on other sites

  • 0

Read my post here:

 

It helps explain why you just simply cannot ignore RPT errors because you think they are unrelated to what your current issue is.

Thank you, I was able to make it work by debugging other scripts. I'm just so used to other game servers that simply ignore errors and continue executing other, working, scripts.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...