Jump to content

Custom Loadouts for Admins and Regular Players


MisterT

Recommended Posts

  On 4/28/2015 at 11:12 AM, second_coming said:

post your mission.sqm and server .rpt file, you must have a typo in it (use the spoiler tag or stick it on pastebin)

 

The server log shows no error and I copied and pasted the code you posted in the mission.sqm with the exception of the location (It's Altis) and the distance. The code is too long, so here are pastebin links:

 

Server log: http://pastebin.com/YvvyRW2f

mission.sqm: http://pastebin.com/Zm8KjZ6X

Link to comment
Share on other sites

  On 4/28/2015 at 2:10 PM, BetterDeadThanZed said:

The server log shows no error and I copied and pasted the code you posted in the mission.sqm with the exception of the location (It's Altis) and the distance. The code is too long, so here are pastebin links:

 

Server log: http://pastebin.com/YvvyRW2f

mission.sqm: http://pastebin.com/Zm8KjZ6X

Sorry, there was a typo in my post:

in your sensor trigger it should be:

 

expActiv="sleep 1; execVM ""custom\loadout\loadout.sqf"";";

not

expActiv="sleep 1; hint execVM ""custom\loadout\loadout.sqf"";";
Link to comment
Share on other sites

  On 4/28/2015 at 2:29 PM, second_coming said:

 

Sorry, there was a typo in my post:

in your sensor trigger it should be:

 

expActiv="sleep 1; execVM ""custom\loadout\loadout.sqf"";";

not

expActiv="sleep 1; hint execVM ""custom\loadout\loadout.sqf"";";

 

It made no difference. I'm still not spawning with any loadout.

Link to comment
Share on other sites

  On 4/28/2015 at 4:44 PM, BetterDeadThanZed said:

 

You have an undefined error for newPlayer this would indicate that your onPlayerRespawn.sqf isn't loading in the mission root.

 

Make sure you have a file onPlayerRespawn.sqf in the same place as your mission.sqm and it contains the following:

newPlayer = true;
Link to comment
Share on other sites

I am using the loadout.sqf that you posted here: 

 

I do have a onPlayerRespawn.sqf with that line in it. It also has the earplug code in it. I know the coordinates for the sensor are correct for Altis because I got it from the database, as I stood in the exact spot where I spawned inside of the spawn box. I've tried a number of sensor codes and different versions of the loadout.sqf to no avail.

Link to comment
Share on other sites

  On 4/28/2015 at 4:56 PM, BetterDeadThanZed said:

I am using the loadout.sqf that you posted here: 

 

I do have a onPlayerRespawn.sqf with that line in it. It also has the earplug code in it. I know the coordinates for the sensor are correct for Altis because I got it from the database, as I stood in the exact spot where I spawned inside of the spawn box. I've tried a number of sensor codes and different versions of the loadout.sqf to no avail.

10:40:32 Error in expression <eOF player != "VirtualMan_EPOCH"};
 
if (newPlayer && EPOCH_playerEnergy < 500) t>
10:40:32   Error position: <newPlayer && EPOCH_playerEnergy < 500) t>
10:40:32   Error Undefined variable in expression: newplayer
10:40:32 File mpmissions\__CUR_MP.Altis\custom\loadout\loadout.sqf, line 4
10:40:32 "DEBUG TIME WAITED: 0.0130005"
10:40:32 "EPOCH-LOGIN: Setup Player Variables"
10:40:32 "EPOCH-LOGIN: Setup EH's"
10:40:32 "EPOCH-LOGIN: Finish!"
10:40:32 Speaker Male01_F not found in CfgVoiceTypes
10:40:32 Error in expression < ((_hasEPEH == "NEVER")) then {[] spawn cm_EPEH_Loop;[] spawn cm_EP_LOOP;};      
 
if>
10:40:32   Error position: <cm_EPEH_Loop;[] spawn cm_EP_LOOP;};
 
if>
10:40:32   Error Undefined variable in expression: cm_epeh_loop
10:40:32 File mpmissions\__CUR_MP.Altis\onPlayerRespawn.sqf, line 39

Looking at the client .rpt you also have another error in your onPlayerRespawn.sqf which is probably stopping the newPlayer variable being set, which is stopping the loadout working.

 

I'd suggest removing the earplugs code from the onPlayerRespawn.sqf to see if that fixes it, then you can look at fixing the earplug script :)

Link to comment
Share on other sites

  On 4/28/2015 at 5:07 PM, BetterDeadThanZed said:

Undefined variables don't usually stop scripts from working. I'll move the "newplayer" code to the top of that file and see if makes a difference though.

 

It does if there is an if statement checking the variable and only running the code if the variable is initialised

Link to comment
Share on other sites

  On 5/2/2015 at 12:06 PM, monkeebhoy said:

I completely understand but when the server restarts and I am at my base I automatically get the custom load out instead of what I had

 

Something isn't right then :) The sensor in the cloneroom only has a 25m radius

Link to comment
Share on other sites

02.05.2015 22:35:41: PAR4NA (127.0.0.1:2304) 0123456789 - #26 "layer addMagazine _item;
player addWeapon "ItemMap";
player addItemToVest "FAK";
player addItemToVest "5Rnd_rollins_mag";
player"

-----------------------------------
02.05.2015 22:36:17: PAR4NA (127.0.0.1:2304) 0123456789 - #26 "Compass";

player addPrimaryWeaponItem "optic_Aco";

player addItemToVest "FAK";	
player addItemToVest "FAK";

player addItemToV"
02.05.2015 22:36:17: PAR4NA (127.0.0.1:2304) 0123456789 - #27 "agazineCargo player;
removeBackpackGlobal player;

player addBackpack "B_Parachute";
player addHeadGear "H_F3_EPOCH";
player add"
02.05.2015 22:36:17: PAR4NA (127.0.0.1:2304) 0123456789 - #44 "== "Epoch_Female_F");	

if (_modelFemale) then {
player forceAddUniform "U_CamoBlue_uniform";
};

if (_modelMale) then {
player "

---------------------------------------
02.05.2015 22:37:13: PAR4NA (127.0.0.1:2304) 0123456789 - #26 "ompass";

player addPrimaryWeaponItem "optic_Hamr";

player addItemToVest "FAK";	
player addItemToVest "FAK";	
player addItemToV"
02.05.2015 22:37:13: PAR4NA (127.0.0.1:2304) 0123456789 - #27 "agazineCargo player;
removeBackpackGlobal player;

player addBackpack "B_Parachute";
player addHeadGear "H_11_EPOCH";
player add"
02.05.2015 22:37:13: PAR4NA (127.0.0.1:2304) 0123456789 - #44 "== "Epoch_Female_F");	

if (_modelFemale) then {
player forceAddUniform "U_CamoRed_uniform";
};

if (_modelMale) then {
player f"

Someone teaches me to add?

 

Do not send this link because I could not do! lolol

http://opendayz.net/threads/a-guide-to-battleye-filters.21066/

Link to comment
Share on other sites

Do you happen to have this working with a separate admin file so there can be two different types of load-outs? I do a lot of REAL testing on my server, which means admin death a lot while I am toying with the AI and such checking their behavior as well as fixing vehicles that are likely to explode on myself or a player and it really makes my life easier if I can automatically get put back in my default load-out. I have been using your crate method with the crypto in it and it has worked great (and I have never had a problem getting the crypto client sided). However, it only works for me and not my other admins. The players just get clothes so they aren't running around naked (I have no idea why the EPOCH dev team WANT people running around in their underwear, I am pretty sure they had clothes at some point BEFORE getting dropped on Altis or arriving there. I looked at the original posted instructions on doing that and my mission file looks NOTHING like his if I am supposed to put it in line 81 or whatever they said.

 

  On 4/28/2015 at 9:40 AM, second_coming said:

 
This works for me:
 
Edit mission.sqm and add a sensor (set the position to the centre point of the clone room, the one in the example is for Chernarus):

class Sensors
{
	items=1;	
	class Item0
	{
		position[]={1025,0,2022};
		a=50;
		b=50;
		activationBy="ANY";
		repeating=1;
		interruptable=1;
		age="UNKNOWN";
		name="cloneroomsafezone";
		expCond = "(player distance cloneroomsafezone) < 50;";
		expActiv="sleep 1; execVM ""StartingLoadout.sqf"";";
		expDesactiv="";
		class Effects
		{
		};
	};			
};
Have a file called StartingLoadout.sqf in the root of your mission file (or call another file from elsewhere if you change the file link in the sensor):
waitUntil {alive vehicle player}; 
waitUntil {typeOF player != "VirtualMan_EPOCH"};

if (newPlayer && EPOCH_playerEnergy < 500) then
{
	uiSleep 5;
	hint "Standard Loadout Supplied";
	clearWeaponCargo player;
	clearMagazineCargo player;
	player addWeapon "ItemMap";
	player addItemToVest "FAK";
	player addItemToVest "FAK";
	player addItemToVest "scam_epoch";
	player addItemToVest "scam_epoch";
	player addItemToVest "ItemSodaRbull";
	player addItemToVest "ItemSodaRbull";
	EPOCH_playerEnergy = 500;					
		   
	_modelMale = (typeOF player == "Epoch_Male_F");
	_modelFemale = (typeOF player == "Epoch_Female_F");	
			
	if (_modelFemale) then 
	{
		player forceAddUniform "U_BasicBodyFemale";
	};
	if (_modelMale) then 
	{
		player forceAddUniform "U_C_Poor_1";	
	};
	newPlayer = false;
}
else
{
	hint "Standard Loadout Already Supplied";
}; 
and in your onPlayerRespawn.sqf in your mission root:
newPlayer = true;
Link to comment
Share on other sites

  On 5/7/2015 at 7:21 PM, Scaris said:

Do you happen to have this working with a separate admin file so there can be two different types of load-outs? I do a lot of REAL testing on my server, which means admin death a lot while I am toying with the AI and such checking their behavior as well as fixing vehicles that are likely to explode on myself or a player and it really makes my life easier if I can automatically get put back in my default load-out. I have been using your crate method with the crypto in it and it has worked great (and I have never had a problem getting the crypto client sided). However, it only works for me and not my other admins. The players just get clothes so they aren't running around naked (I have no idea why the EPOCH dev team WANT people running around in their underwear, I am pretty sure they had clothes at some point BEFORE getting dropped on Altis or arriving there. I looked at the original posted instructions on doing that and my mission file looks NOTHING like his if I am supposed to put it in line 81 or whatever they said.

 

I did but I don't any more. Try this:

waitUntil {alive vehicle player}; 
waitUntil {typeOF player != "VirtualMan_EPOCH"};

if ((getPlayerUID player) in admin_list) then 
{	
	if (EPOCH_playerEnergy < 20 and hasInterface) then
	{
		uiSleep 5;
		hint "Admin Sniper Loadout Supplied";
		clearWeaponCargo player;
		clearMagazineCargo player;
		removeBackpackGlobal player;
		player addBackpack "B_Carryall_oli";
		player addVest "V_PlateCarrier_Kerry";		
		player forceAddUniform "U_OG_Guerilla2_3";
		player addHeadGear "H_77_EPOCH";
		
		player addWeapon "hgun_P07_F";	
		player addWeapon "srifle_DMR_03_F";	
		player addWeapon "EpochRadio0"; 
		player addWeapon "ItemGPS";
		player addWeapon "ItemMap";
		player addWeapon "ItemWatch";
		player addWeapon "ItemCompass";
		player addWeapon "Laserdesignator";
		
		player addPrimaryWeaponItem "optic_DMS";
		player addPrimaryWeaponItem "bipod_02_F_hex";
		player addPrimaryWeaponItem "muzzle_snds_B";
		player addHandgunItem "muzzle_snds_L";	
		
		player addItemToVest "FAK";
		player addItemToVest "FAK";
		player addItemToVest "scam_epoch";
		player addItemToVest "scam_epoch";
		player addItemToVest "ItemSodaRbull";
		player addItemToVest "ItemSodaRbull";

		player addMagazines ["30Rnd_9x21_Mag", 4];
		player addMagazines ["20Rnd_762x51_Mag", 10];
		player addMagazines ["handGrenade", 8];
		EPOCH_playerEnergy = 2500;
	}
	else
	{
		hint "Standard Loadout Already Supplied";
	};
}
else
{
	if (EPOCH_playerEnergy < 20 and hasInterface) then
	{
		uiSleep 5;
		hint "Standard Loadout Supplied";
		clearWeaponCargo player;
		clearMagazineCargo player;
		player addWeapon "ItemMap";
		player addItemToVest "FAK";
		player addItemToVest "FAK";
		player addItemToVest "scam_epoch";
		player addItemToVest "scam_epoch";
		player addItemToVest "ItemSodaRbull";
		player addItemToVest "ItemSodaRbull";
		EPOCH_playerEnergy = 500;					
			   
		_modelMale = (typeOF player == "Epoch_Male_F");
		_modelFemale = (typeOF player == "Epoch_Female_F");	
				
		if (_modelFemale) then 
		{
			player forceAddUniform "U_BasicBodyFemale";
		};
		if (_modelMale) then 
		{
			player forceAddUniform "U_C_Poor_1";	
		};
		newPlayer = false;
	}
	else
	{
		hint "Standard Loadout Already Supplied";
	}; 
};
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
×
×
  • Create New...