Jump to content
  • 0

Help with select Skin by spawn


lucho

Question

Ess spawn

 

ESSconfig.sqf


presetClasses = [
	
	
[    "Bandit",	    "Bandit2_DZ",			 ["ItemBandage"], ["ItemRadio"], "CZ_VestPouch_EP1", [], [], 0, -5000   ],
[    "Survivor",    "GUE_Soldier_Pilot",	 ["ItemBandage"], ["ItemRadio"], "CZ_VestPouch_EP1", [], [], 0, 0 		],
[    "Hero",	    "Soldier_Sniper_PMC_DZ", ["ItemBandage"], ["ItemRadio"], "CZ_VestPouch_EP1", [], [], 0, 5000    ]



publicVariable "presetClasses";

 

classpick.sqf

private ["_classHover","_go","_hlevel","_humanity","_itemText","_level","_selectedItem"];

disableSerialization;
_go = true;
_selectedItem = lbCurSel 8888;
_itemText = lbText [8888,_selectedItem];
{if (_itemText == (_x select 0)) then {_classHover = _x;};} forEach presetClasses;
if (isNil "_classHover") exitWith {titleText ["\n\nSelect a class!","PLAIN DOWN"];titleFadeOut 4;_go = false;};


_hlevel = _classHover select 8;
if (_hlevel != 0) then {
	_humanity = player getVariable ["humanity",0];
	if ((_hlevel < 0) && (_humanity >= _hlevel)) exitWith {titleText [format["\n\nYour humanity must be less than %1 for this class.",_hlevel], "PLAIN DOWN"];titleFadeOut 4;_go = false;};
	if ((_hlevel > 0) && (_humanity <= _hlevel)) exitWith {titleText [format["\n\nYour humanity must be greater than %1 for this class.",_hlevel], "PLAIN DOWN"];titleFadeOut 4;_go = false;};
};

if (_go) then {classSelect = _classHover;};

 

 

Question:

 

How i can do that only people can pick Survior class with humanity from -4999 to 4999 so hero and bandit cant pick that skin Survivor

I see there is 2 lines

 

    if ((_hlevel < 0) && (_humanity >= _hlevel)) exitWith {titleText [format["\n\nYour humanity must be less than %1 for this class.",_hlevel], "PLAIN DOWN"];titleFadeOut 4;_go = false;};
    if ((_hlevel > 0) && (_humanity <= _hlevel)) exitWith {titleText [format["\n\nYour humanity must be greater than %1 for this class.",_hlevel], "PLAIN DOWN"];titleFadeOut 4;_go = false;};

 

but here is only two options > // < anybody can help?

I only want that hero or bandit can not pick Survivor Class.

Loadouts are in the following format:
["Bandit","Bandit2_DZ",["10x_303","10x_303"],["LeeEnfield"],"DZ_ALICE_Pack_EP1",[],[],0,-2000]
[Name, Skin, Magazines, Weapons, Backpack, Backpack Magazines, Backpack Weapons, VIPLvl, HLvl]

 

  • Humanity Level -
0 - Anyone can pick this class
Negative # - Only players with humanity less than this number can pick this class
Positive # - Only players with humanity greater than this number can pick this class
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...