[Release] pick spawn and loadout

Hello, I would like to use this script on Taviana 2.0. I have now spent hours trying to install it but it does not work. Can I perhaps someone here help to install it? It would be best if someone could implement it.

Here are my PBO's & the changed newspawn (for Taviana) folder: Klick me

That would be really cool if someone can install it for me.
 
Sure, if you wanted a class to change humanity you could just add a line like this in after the skin or loadout:
Code:
[player,5000] call player_humanityChange;
Would give the player +5000 from their current humanity.

Code:
[player,-5000] call player_humanityChange;
Would give the player -5000 from their current humanity.

didnt word it correctly i think sorry. I would like it if you have the humanity you can pick the class if that makes sense. Say soldier class needs 7k humanity to pick and if your humanity is 3k you cant pick. Kinda like hero and bandit trader if humanity is correct no trade window.
 
Hello love this script just have something I could ask

How can I make the vehicles they spawn with not be able to sell at traders Epoch 1.0.4 ?

Much Thanks

Peter Beer
 
In that case you could do something like this in your classes_main.sqf:
Code:
pathtoclasses = "newspawn\classes\";
EXECscript1 = 'player execVM "'+pathtoclasses+'%1"';
PlayerHumanity = (player getVariable "humanity");
if (PlayerHumanity > 4999) then {
classes =
[
   ["",false],
     ["Select Class", [2], "#USER:Hero", -5, [["expression", ""]], "1", "1"],
     ["", [-1], "", -5, [["expression", ""]], "1", "0"],
       ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
   
];};

if (PlayerHumanity < 0) then {
classes =
[
   ["",false],
     ["Select Class", [2], "#USER:Bandit", -5, [["expression", ""]], "1", "1"],
     ["", [-1], "", -5, [["expression", ""]], "1", "0"],
       ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
   
];};

if (isNil "classes") then {
classes =
[
   ["",false],
     ["Select Class", [2], "#USER:NormalSurvivor", -5, [["expression", ""]], "1", "1"],
     ["", [-1], "", -5, [["expression", ""]], "1", "0"],
       ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
   
];};

Hero =
[
   ["",false],
     ["British Soldier", [2], "", -5, [["expression", format[EXECscript1,"britishs.sqf"]]], "1", "1"],
     ["US Soldier", [3], "", -5, [["expression", format[EXECscript1,"uss.sqf"]]], "1", "1"],
     ["", [-1], "", -5, [["expression", ""]], "1", "0"],
       ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];

Bandit =
[
   ["",false],
     ["Czech Soldier", [2], "", -5, [["expression", format[EXECscript1,"czechs.sqf"]]], "1", "1"],
     ["Terrorist", [3], "", -5, [["expression", format[EXECscript1,"terrorist.sqf"]]], "1", "1"],
     ["", [-1], "", -5, [["expression", ""]], "1", "0"],
       ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];

NormalSurvivor =
[
   ["",false],
     ["Civilian", [2], "", -5, [["expression", format[EXECscript1,"civilian.sqf"]]], "1", "1"],
     ["Civilian Lady", [3], "", -5, [["expression", format[EXECscript1,"civilianl.sqf"]]], "1", "1"],
     ["Farmer", [4], "", -5, [["expression", format[EXECscript1,"farmer.sqf"]]], "1", "1"],
     ["Worker", [5], "", -5, [["expression", format[EXECscript1,"worker.sqf"]]], "1", "1"],
     ["", [-1], "", -5, [["expression", ""]], "1", "0"],
       ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];


showCommandingMenu "#USER:classes";



In each of the files in the /classes/ folder delete these three lines:
Code:
_uniqueid = str(round(random 999999));
_object setVariable ["ObjectID", _uniqueid, true];
_object setVariable ["ObjectUID", _uniqueid, true];

Then in dayz_server\compile\server_updateObject.sqf find this:
Code:
if (!_parachuteWest and !(locked _object)) then {

On a new line above that add this:
Code:
if (_object getVariable "Mission" == 1) exitWith {};

Or instead of doing all that you could change the vehicle class names in your classes to ones that are not available at the traders. You could also remove the vehicles you are using from the traders_data table or lower their sale price.
I don't have any of those lines in my Classes ? But yet they can still sell the Vehicles
 
Hello i want to install this script, where can i find this line:
Code:
_cMenu = ['','RscMainMenu','RscMoveHigh','#WATCH', ...];
 
If I wanted to add different spawns for different people, would I just stack the following command?

if ((getPlayerUID player) in ["0","0"]) then {
newspawn =
[
["",false],
["Select Spawn Point", [2], "#USER:Admin", -5, [["expression", ""]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]

Or do I need to add something at the end of each (if player)
 
Hi! Followed everything, works!

One problem, after I get in and exit a vehicle spawned by the class selection menu, the vehicle disappears.

I am using Epoch 1.0.3.1 and suspect the problem is in the dayz_server\system\server_cleanup.fsm. However, I have tried all three of the suggested replacements for :

if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

What else could it be?
 
its me again just wondering since i have classes at 50k humanity then 200k humanity but if you hit 200k+ only class option show for 50k ones
 
Hi! Followed everything, works!

One problem, after I get in and exit a vehicle spawned by the class selection menu, the vehicle disappears.

I am using Epoch 1.0.3.1 and suspect the problem is in the dayz_server\system\server_cleanup.fsm. However, I have tried all three of the suggested replacements for :

if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

What else could it be?




i got this on my server that works fine

name = "general_cleanup";
init = /*%FSM<STATEINIT""">*/"//diag_log ""CLEANUP: Starting loop for next task"";" \n
"" \n
"//Clean groups" \n
"{" \n
" // diag_log (""CLEANUP: CHECKING GROUP WITH "" + str(count units _x) + "" UNITS"");" \n
" if ((count units _x==0) && !(_x getVariable[""Mission"",false])) then {" \n
" deleteGroup _x;" \n
" // diag_log (""CLEANUP: DELETING A GROUP"");" \n
" };" \n




name = "group_cleanup";
init = /*%FSM<STATEINIT""">*/"//Check for hackers" \n
" {" \n
" if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x) && (vehicle _x getVariable [""mission"",0] != 1) && !((typeOf vehicle _x) in DZE_safeVehicle)) then {" \n
" diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
" (vehicle _x) setDamage 1;" \n
" _x setDamage 1;" \n
" };" \n
 
Thanks Osmox,

I tried what you have but the vehicle still disappears as soon as it spawns. Must be something else.. I am running Blur anti-hack, wonder if that could be the issue?

I followed the instructions so that the AH allows the menu actions, the teleporting, and allows the weapon spawning. Is there something else I need to do to allow the vehicles to spawn?
 
ebay, you nailed it! Now the vehicles spawn and do not dissappear.

Checking the other classes, I have discovered two other problems.

1. Backpacks to not get added to the players inventory. I have tried it with and without using the :

removeAllWeapons player;
removeAllItems player;
removebackpack player;

Like the vehicle problem you addressed above, is there something that needs to be changed in Epoch 1.0.3.1 in order that the backpacks will be added to the players loadout?

2. The scroll wheel option for both spawn select and class select seems to disappear after only 3-4 seconds. Unless you are very fast, it is difficult to select a choice from the menu before the menu closes, forcing you to start over. Is there a way to increase the time the menu remains open or is there some other function that is closing the menu?
 
Last edited:
Back
Top