Jump to content

Custom Loadouts for Admins and Regular Players


MisterT

Recommended Posts

Yeah the more I think about this the more I don't like it.  Stuff is pretty easy to get in Epoch as it is.  The only legit rationale I can think of for doing a starting loadout would be to give freshies a sidearm so they at least have a chance at defending themselves from spawn rapers.  Other than that it's just dumbing things down too much. 

How to do That?

 

I have put in my server Roaming AI's and it will be good to give players the chance to spawn with a pistol or something . any idea please.,

Link to comment
Share on other sites

How to do That?

 

I have put in my server Roaming AI's and it will be good to give players the chance to spawn with a pistol or something . any idea please.,

 

 

Read through the thread.  There's about 3 different ways you can do it, all of which have been discussed.

Link to comment
Share on other sites

  • 2 weeks later...

Try this:

 

if (EPOCH_playerCrypto == 0) && if (getPlayerUID player in ["xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx"]) then {
 

       clearWeaponCargo player;
       clearMagazineCargo player;
       removeBackpackGlobal player;
 
		_PistolANDmag = [["hgun_Rook40_snds_F","16Rnd_9x21_Mag"],["hgun_P07_snds_F","16Rnd_9x21_Mag"]] call BIS_fnc_selectRandom;
		_pistol = _PistolANDmag select 0;
		_mag = _PistolANDmag select 1;
		_item = "FAK";
		_food = ["CookedSheep_EPOCH","CookedGoat_EPOCH","CookedChicken_EPOCH","CookedRabbit_EPOCH","ItemTunaCooked","ItemSeaBassCooked","ItemTroutCooked","FoodSnooter","FoodMeeps"] call BIS_fnc_selectRandom;
		_drink = ["ItemSodaRbull","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","FoodWalkNSons","WhiskeyNoodle"] call BIS_fnc_selectRandom;
		_uniform = "U_O_GhillieSuit";
		_vest = ["V_F41_EPOCH","V_41_EPOCH"] call BIS_fnc_selectRandom;
		player addVest _vest;
		player addWeapon _pistol;
		player addMagazine _mag;
		player addMagazine _item;
		player addMagazine _food;
		player addMagazine _drink;
		player addMagazine "16Rnd_9x21_Mag";
		player addMagazine "16Rnd_9x21_Mag";
		player addWeapon "EpochRadio0";
		player addWeapon "NVG_EPOCH";
        player addWeapon "Rangefinder";
		player addWeapon "ItemWatch";
		player addWeapon "ItemCompass";
		player addWeapon "ItemGPS";
		player addBackpack "B_Kitbag_cbr";
		player forceAddUniform _uniform;
        EPOCH_playerEnergy = 2500;
		EPOCH_playerCrypto = 100;
       

	   hint "Admin Loadout Supplied";
       } else {
	   
	   hint "Admin Loadout Already Supplied";
	   
	   };
	   
	   
if (EPOCH_playerCrypto == 0) then {
		
           clearWeaponCargo player;
           clearMagazineCargo player;
           removeBackpackGlobal player;
			_PistolANDmag = [["hgun_Rook40_F","16Rnd_9x21_Mag"],["hgun_P07_F","16Rnd_9x21_Mag"]] call BIS_fnc_selectRandom;
			_pistol = _PistolANDmag select 0;
			_mag = _PistolANDmag select 1;
            _item = "FAK";
			_food = ["CookedSheep_EPOCH","CookedGoat_EPOCH","CookedChicken_EPOCH","CookedRabbit_EPOCH","ItemTunaCooked","ItemSeaBassCooked","ItemTroutCooked","FoodSnooter","FoodMeeps"] call BIS_fnc_selectRandom;
			_drink = ["ItemSodaRbull","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","FoodWalkNSons","WhiskeyNoodle"] call BIS_fnc_selectRandom;
            _uniform = ["U_C_Driver_4","U_C_Driver_3","U_C_Driver_2","U_C_Driver_1","U_C_Scientist","U_C_Journalist","U_C_WorkerCoveralls","U_C_Poor_1","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_tricolour","U_C_Poloshirt_burgundy","U_C_Poloshirt_blue","U_C_Poloshirt_stripped"] call BIS_fnc_selectRandom;
			_vest = ["V_16_EPOCH","V_15_EPOCH","V_14_EPOCH","V_13_EPOCH","V_12_EPOCH","V_11_EPOCH","V_10_EPOCH","V_9_EPOCH","V_8_EPOCH","V_7_EPOCH","V_6_EPOCH","V_5_EPOCH","V_4_EPOCH","V_3_EPOCH","V_2_EPOCH","V_1_EPOCH"] call BIS_fnc_selectRandom;
			player addVest _vest;
			player addWeapon _pistol;
			player addMagazine _mag;
			player addMagazine _item;
			player addMagazine _food;
			player addMagazine _drink;
			player addWeapon "EpochRadio0"; 
			player addWeapon "ItemWatch";
			player addWeapon "ItemCompass";
			EPOCH_playerEnergy = 500;
			EPOCH_playerCrypto = 100;
			player addBackpack "B_parachute";
			_modelMale = (typeOF player == "Epoch_Male_F");
            _modelFemale = (typeOF player == "Epoch_Female_F");
        
            if (_modelFemale) then {
            player forceAddUniform "U_BasicBodyFemale";
            };
            if (_modelMale) then {
            player forceAddUniform _uniform;
            };  
			hint "Standard Loadout Supplied";
			
			} else {
			hint "Standard Loadout Already Supplied";
            };

 

 

I haven't tested this but I think it will work.  The only thing I'm shaky on is whether that's the proper way to handle two separate 'if' statements in the same script.  

 

hi

 

It does not work for me, the custom loadout with crypto 0.
 
here is my custom loadout
 

if (EPOCH_playerCrypto == 0) && if (getPlayerUID player in ["","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx"]) then

{

_PistolANDmag = [["arifle_MX_F","30Rnd_65x39_caseless_mag"]] call BIS_fnc_selectRandom;

_pistol = _PistolANDmag select 0;

_mag = _PistolANDmag select 1;

_item = "FAK";

_food = ["CookedSheep_EPOCH","CookedGoat_EPOCH","CookedChicken_EPOCH","CookedRabbit_EPOCH","ItemTunaCooked","ItemSeaBassCooked","ItemTroutCooked","FoodSnooter","FoodMeeps"] call BIS_fnc_selectRandom;

_drink = ["ItemSodaRbull","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","FoodWalkNSons","WhiskeyNoodle"] call BIS_fnc_selectRandom;

_uniform = ["U_OG_Guerilla2_3"] call BIS_fnc_selectRandom;

_vest = ["V_PlateCarrierH_CTRG"] call BIS_fnc_selectRandom;

hint format ["Standard Loadout Supplied"];

clearWeaponCargo player;

clearMagazineCargo player;

player addVest _vest;

player addWeapon _pistol;

player addMagazine _mag;

player addMagazine _item;

player addMagazine _food;

player addMagazine _drink;

player addWeapon "EpochRadio0";

EPOCH_playerCrypto = 200;

EPOCH_playerEnergy = 2000;

_modelMale = (typeOF player == "Epoch_Male_F");

_modelFemale = (typeOF player == "Epoch_Female_F");

if (_modelFemale) then {

player forceAddUniform "U_BasicBodyFemale";

};

if (_modelMale) then {

player forceAddUniform _uniform;

};

}else{

hint "Standard Loadout Already Supplied";

};

 
thanks
Link to comment
Share on other sites

I never thought my initial spawn loadout box would come back as a last resort. <_< I added that box in and put in my intial loadout randomizer back then because the respawn event handler was being blocked by infistar for non-admin players, but now with this damn gender select, people are actually resorting back to that shitty box method.. urgh >.<  the Box method is still sloppy, as people can just sit there and dupe gear or click the box as many times as they want to continue randomizing until they get what they want. It's fine as a last resort I guess, since about a million people stole it off my initial Legion mission pbo anyways, but there has to be a work around for the current gender selection addition. I just tried changing the script to:

private ["_player"];
if(isDedicated || !hasInterface) exitWith{};

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

while {true} do {
_player = player;
player addEventHandler ["Respawn", {
_PistolANDmag = [["hgun_Pistol_Signal_F","6Rnd_GreenSignal_F"],["hgun_Pistol_Signal_F","6Rnd_RedSignal_F"],["hgun_Pistol_heavy_02_Yorris_F","6Rnd_45ACP_Cylinder"],["hgun_Pistol_heavy_02_F","6Rnd_45ACP_Cylinder"],["hgun_Pistol_heavy_01_MRD_F","11Rnd_45ACP_Mag"],["hgun_Pistol_heavy_01_snds_F","11Rnd_45ACP_Mag"],["hgun_Pistol_heavy_01_F","11Rnd_45ACP_Mag"],["hgun_ACPC2_snds_F","9Rnd_45ACP_Mag"],["hgun_ACPC2_F","9Rnd_45ACP_Mag"],["hgun_Rook40_snds_F","16Rnd_9x21_Mag"],["hgun_Rook40_F","16Rnd_9x21_Mag"],["hgun_P07_snds_F","16Rnd_9x21_Mag"],["hgun_P07_F","16Rnd_9x21_Mag"]] call BIS_fnc_selectRandom;
_pistol = _PistolANDmag select 0;
_mag = _PistolANDmag select 1;
_item = "FAK";
_food = ["CookedSheep_EPOCH","CookedGoat_EPOCH","CookedChicken_EPOCH","CookedRabbit_EPOCH","ItemTunaCooked","ItemSeaBassCooked","ItemTroutCooked","FoodSnooter","FoodMeeps"] call BIS_fnc_selectRandom;
_drink = ["ItemSodaRbull","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","FoodWalkNSons","WhiskeyNoodle"] call BIS_fnc_selectRandom;
_uniform = ["U_C_Driver_4","U_C_Driver_3","U_C_Driver_2","U_C_Driver_1","U_C_Scientist","U_C_Journalist","U_C_WorkerCoveralls","U_C_Poor_1","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_tricolour","U_C_Poloshirt_burgundy","U_C_Poloshirt_blue","U_C_Poloshirt_stripped"] call BIS_fnc_selectRandom;
_vest = ["V_16_EPOCH","V_15_EPOCH","V_14_EPOCH","V_13_EPOCH","V_12_EPOCH","V_11_EPOCH","V_10_EPOCH","V_9_EPOCH","V_8_EPOCH","V_7_EPOCH","V_6_EPOCH","V_5_EPOCH","V_4_EPOCH","V_3_EPOCH","V_2_EPOCH","V_1_EPOCH"] call BIS_fnc_selectRandom;
hint format [" %1 \n %2 \n %3 \n %4 \n %5 \n %6 \n %7",_pistol,_mag,_item,_food,_drink,_uniform,_vest];
   player addVest _vest;
player addWeapon _pistol;
player addMagazine _mag;
player addMagazine _item;
player addMagazine _food;
player addMagazine _drink;
player addWeapon "EpochRadio0";
player addWeapon "ItemCompass";
player forceAddUniform _uniform;
}]; waitUntil {_player != player}; 
}; 
};

but the event handler still doesnt catch as "respawn" occurs before gender select... I'm going to dig into this more and will put out a solid solution, that isn't that stupid spawn box. It makes the debug room a disaster after a few minutes of people dropping shit they don't want everywhere. it's just sloppy and i regret keeping it in my mission file.

Link to comment
Share on other sites

The box method works fine as long as you implement the Krypto check.  Then players can only get a loadout from the box once per respawn event.

 

Edit:  scratch that.  I've just been informed that even though it gives 100 crypto it doesn't "actually" give it, even though the debug monitor says it does.  Apparently they've changed Epoch to a direct write to/read from database solution.  So we will have to rethink the approach on this.  

Link to comment
Share on other sites

Someone figured out, how to check if player is female or male? Need this because to add some clothes...

 

I combined parts from this loadout script with the randomspawn script... this is what I have now:

if (isNil "inSpawnEast") then {
inSpawnEast = false;
};
 
while {true} do {
	waitUntil { inSpawnEast };
	waitUntil { player == vehicle player };
	thePlayer = vehicle player;

	_spawnpointsarray = [
							[10331.094, 6009.6553, 0],
                                                         .
                                                         .
                                                         .
							[11737.914, 8349.7266, 0]
						];
			_selectspawnpoint = _spawnpointsarray call BIS_fnc_selectRandom;
				thePlayer setPos _selectspawnpoint;
				
					_uniform = ["U_C_Poloshirt_blue","U_C_Poloshirt_burgundy","U_C_Poloshirt_stripped","U_C_Poloshirt_tricolour","U_C_Poloshirt_salmon","U_C_Poloshirt_redwhite"] call BIS_fnc_selectRandom;
						player forceAddUniform _uniform;
						
	waitUntil { !inSpawnEast };
};

All I can find is:

Epoch_Female_F or Epoch_Male_F

Also a choice could be:

EPOCH_PlayerIsMale = true; or EPOCH_PlayerIsFemale = true;

 

What I tried, but didn't work for me:

                                                     .............0]
						];
			_selectspawnpoint = _spawnpointsarray call BIS_fnc_selectRandom;
				thePlayer setPos _selectspawnpoint;
	if {EPOCH_PlayerIsMale = true;} then {			
					_uniform = ["U_C_Poloshirt_blue","U_C_Poloshirt_tricolour"] call BIS_fnc_selectRandom;
						player forceAddUniform _uniform;
	} else {};
						
	waitUntil { !inSpawnEast };
};

And also tried this one:

                                                     ...............0]
						];
			_selectspawnpoint = _spawnpointsarray call BIS_fnc_selectRandom;
				thePlayer setPos _selectspawnpoint;
	if {Player = Epoch_Male_F} then {			
					_uniform = ["U_C_Poloshirt_blue","U_C_Poloshirt_tricolour"] call BIS_fnc_selectRandom;
						player forceAddUniform _uniform;
	} else {};
						
	waitUntil { !inSpawnEast };
};

Maybe someone have little push for me, straight to the right direction?

 

What I wanna do is, if Player is Male, than random select some clothes, if player is female, then do nothing. Maybe add clothes to female later, but they look alright for me at the moment. They do wearing jeans, not like male with underwear only ^^

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...