Jump to content
  • 0

HELP Skin by respawn or spawn


lucho

Question

i have this script

ESS spawn

here is config file

Quote

bodyCheckDistance = 4000; //-1 to disable


presetClasses = [
    
    
    ["Bandit 3 level","Sniper1_DZ",[],0,-97500],
    ["Bandit 2 level","GUE_Soldier_Crew_DZ",[],0,-22500],
    ["Bandit 1 level","Bandit2_DZ",[],[],0,-2500],
    ["  Survivor   ","GUE_Soldier_Pilot",,[],[],0,0],
    [" Hero 1 level",[],[],0,7500],
    [" Hero 2 level","FR_Light",[],0,27500],
    [" Hero 3 level","FR_Sapper",[],0,103000]
];

publicVariable "bodyCheckDistance";
publicVariable "presetClasses";

Survivor can pick all can i fix it like this min -2499 and max 7499?

so hero cant take the skin and bandit cant take the skin

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0
23 hours ago, lucho said:

i have this script

ESS spawn

here is config file

Survivor can pick all can i fix it like this min -2499 and max 7499?

so hero cant take the skin and bandit cant take the skin

 

There's a bit of a language barrier here I think but it seems that you're asking why anybody can choose any class?

You've got the required humanity in the wrong area, the last set of numbers is the amount of coins you spawn with.

Here's an example of one I use.

["Bandit LvL 1        (UAZ)    ","Bandit2_DZ","BanditW1_DZ",["30Rnd_556x45_Stanag",2,"ItemTNK",1],["RH_ctar21m"],"",[],[],0,-2500,1337],

 

The -2500 is the humanity required, the 1337 is the amount of coins this class will spawn with.

Ebay has documented the install quite well, this is lines 18/19 from classconfig.sqf.  It tells you what to put where.

 

4. Regular class format:
    [Name,  Male Skin,  Female Skin,  Magazines and Items,  Weapons and Tools,  Bag,  Bag Mags and Items,  Bag Weps and Tools,  VIP Level,  Humanity Level, Coins]

Link to comment
Share on other sites

  • 0

Tried this on my test server and it works. You can prevent players with specific humanity from accessing only certain skins just be putting 4,0] at the end of the skin code, as shown in the last block of code below.. Just to clarify, this works on my test server. Haven't tested it on a live server :p

In your classpick.sqf file change this code: 

_level = _classHover select 7;
if (_level != 0) then {
	_vipUID = (getPlayerUID player);
	if (_level == 1) then {if !(_vipUID in vipClassLvl1) exitWith {titleText ["\n\nThis class is level 1 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};
	if (_level == 2) then {if !(_vipUID in vipClassLvl2) exitWith {titleText ["\n\nThis class is level 2 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};
	if (_level == 3) then {if !(_vipUID in vipClassLvl3) exitWith {titleText ["\n\nThis class is level 3 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};
};

to this:

_level = _classHover select 7;
if (_level != 0) then {
	_vipUID = (getPlayerUID player);
	if (_level == 1) then {if !(_vipUID in vipClassLvl1) exitWith {titleText ["\n\nThis class is level 1 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};
	if (_level == 2) then {if !(_vipUID in vipClassLvl2) exitWith {titleText ["\n\nThis class is level 2 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};
	if (_level == 3) then {if !(_vipUID in vipClassLvl3) exitWith {titleText ["\n\nThis class is level 3 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};

//ADDED THESE 2 LINES . Note the _level == 4 ..
_humanity = player getVariable["humanity", 0]; // You could put this at the top of the file after: _go = true;
if (_level == 4) then {if ((_humanity >= 7500) || (_humanity <= -2500)) exitWith {titleText ["\n\nThis class for noobs only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};

};

Then change this:

 ["  Survivor   ","GUE_Soldier_Pilot",,[],[],0,0],

to this:

 ["  Survivor   ","GUE_Soldier_Pilot",,[],[],4,0], // I change the 0,0 at the end to 4,0

 

Link to comment
Share on other sites

  • 0
On 04.02.2016 at 4:30 PM, MatthewK said:

Tried this on my test server and it works. You can prevent players with specific humanity from accessing only certain skins just be putting 4,0] at the end of the skin code, as shown in the last block of code below.. Just to clarify, this works on my test server. Haven't tested it on a live server :p

In your classpick.sqf file change this code: 


_level = _classHover select 7;
if (_level != 0) then {
	_vipUID = (getPlayerUID player);
	if (_level == 1) then {if !(_vipUID in vipClassLvl1) exitWith {titleText ["\n\nThis class is level 1 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};
	if (_level == 2) then {if !(_vipUID in vipClassLvl2) exitWith {titleText ["\n\nThis class is level 2 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};
	if (_level == 3) then {if !(_vipUID in vipClassLvl3) exitWith {titleText ["\n\nThis class is level 3 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};
};

to this:


_level = _classHover select 7;
if (_level != 0) then {
	_vipUID = (getPlayerUID player);
	if (_level == 1) then {if !(_vipUID in vipClassLvl1) exitWith {titleText ["\n\nThis class is level 1 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};
	if (_level == 2) then {if !(_vipUID in vipClassLvl2) exitWith {titleText ["\n\nThis class is level 2 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};
	if (_level == 3) then {if !(_vipUID in vipClassLvl3) exitWith {titleText ["\n\nThis class is level 3 VIP only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};

//ADDED THESE 2 LINES . Note the _level == 4 ..
_humanity = player getVariable["humanity", 0]; // You could put this at the top of the file after: _go = true;
if (_level == 4) then {if ((_humanity >= 7500) || (_humanity <= -2500)) exitWith {titleText ["\n\nThis class for noobs only.","PLAIN DOWN"];titleFadeOut 4;_go = false;};};

};

Then change this:


 ["  Survivor   ","GUE_Soldier_Pilot",,[],[],0,0],

to this:


 ["  Survivor   ","GUE_Soldier_Pilot",,[],[],4,0], // I change the 0,0 at the end to 4,0

 

didnt work

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