Jump to content

Custom Loadouts for Admins and Regular Players


MisterT

Recommended Posts

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

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

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

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

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.

 

 
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

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

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
  • Advertisement
×
×
  • Create New...