[Release] pick spawn and loadout

You do not want to run newspawn_main. You want to run newspawn_execute from the init. Use the init.sqf code posted in the OP. It makes sure it only shows up on fresh respawn (not relog). Make sure your paths are correct. The folder structure should be like newspawn\newspawn_execute.sqf in the root of your mission.

Since the scroll menu shows up you know the antihax is not blocking it.


Yep i try use your code, but menu does not appear
Code:
p2_newspawn = compile preprocessFileLineNumbers "newspawn\newspawn_execute.sqf";
waitUntil {!isNil ("PVDZ_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn p2_newspawn;
};

I do not change anything, and use only your instruction, i check paths 10 times, and i try to remove standard AH and Blur AH, but menu still not appear. :(
Only case when menu work - when i add in init load your menu thru execVM.
Maybe i'm doing something wrong idk, can you upload your mission file, so i can check all?
 
Update 8/17

Sorry, guys forgot a critical step in the OP directions. Just added it in:


Also make sure you guys put actual playerIDs in the spaces on line 3 of the _main files. I have had some users report the menu not showing when those are left blank or filled with fake IDs.

Does a playerID have to be in there for this to work ? Like will it work for everybody that doesn't have their numbers in there??

Fix worked btw, thanks.

Still get the BattlEye: SetPos Restriction #0 kick. Below is the log.
17.08.2013 22:15:00: John Doe (ip) guid - #0 2:1225 Land_nav_pier_m_2 [13225,3431,-19]

Only pier stuff I have is Excelsior's Bridge.

So I change the 1st line in setpos.txt to 1 and that fixed it.

1st login sent me to debug. Log back in, everything works like it should.
 
Prob a stupid question but are you able to change the worldspaces of the spawn loc's to have it work on a diffrent map (like celle)?
 
If you want to add more separate menus for different players or groups of players then you can add it in like this:
Code:
if ((getPlayerUID player) in ["83372230","83418374","42730886"]) then {
newspawn =
[
    ["",false],
        ["Select Spawn Point", [2], "#USER:Group1", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];};
 
if ((getPlayerUID player) in ["99912345","22133453","6123458"]) then {
newspawn =
[
    ["",false],
        ["Select Spawn Point", [2], "#USER:Group2", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
]; } else {
newspawn =
[
    ["",false],
        ["Select Spawn Point", [2], "#USER:EveryoneElse", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];};

In the above example your three separate menus would be named group1, group2 and everyoneelse instead of just two named donator and peasant. You could easily keeping adding to the above to make say different menus for different clans or teams, etc.


When I try this the only ones that work are the Group2 and the EveryoneElse. Anyone I put in Group1 just gets the EveryoneElse menu.

I have tried playing around with it a little to see if I can get it to work. Can you just look it over and see if maybe something is wrong with it?

The only thing I can see is in the Group1 you end it with:
Code:
];};

but then in Group2 it ends with
Code:
]; }
I just am not sure if the else statement means you don't need the ;? I have tried every combo I can think of. Not having any ; makes the menus not work at all and keeping the code the way you posted means no Group1.

Here is my current code:
Code:
if ((getPlayerUID player) in ["100244294","112293382","113379846","115742598","115851910","137962246","34218246","62515334","78306310","78633670","86451462","95163590","112009158","114334918","125211014","19498438","27936518","72231686","94415558","89684486","98538630","45350086","127524550","128380998","86256774","88957318","88958086"],"38925320","115738054","127963846","24314246","108633350","109844486","126578246","34225670","147689094","26033158","76625286","88958086","122838150","10313856","6695552","75726982","130068038","130068038"]) then {
newspawn =
[
    ["",false],
        ["Select Spawn Point", [2], "#USER:DonatorStandard", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];};
 
if ((getPlayerUID player) in ["86256774","115742598","34225670"]) then {
newspawn =
[
    ["",false],
        ["Select Spawn Point", [2], "#USER:Admin", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];};
 
if ((getPlayerUID player) in ["130460422","18669958","38926790"]) then {
newspawn =
[
    ["",false],
        ["Select Spawn Point", [2], "#USER:CB", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
]; } else {
newspawn =
[
    ["",false],
        ["Select Spawn Point", [2], "#USER:Peasant", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];};

That code makes only CB and Peasant work. Anyone in DonatorStandard and Admin get put in Peasant.
 
Not sure if there is something wrong with that code but I put it in and there is no scroll wheel options. I still get the message saying "Use scroll wheel too...blah"

Also if it would be easier just get rid of the else statement. I would like to make it so only donator/admins get any panel access.
 
No? Sorry I am pretty much learning this as I go. Pretty good at it but still learning.

Here are my two complete files:

Classes:
Code:
pathtoclasses = "newspawn\classes\";
EXECscript1 = 'player execVM "'+pathtoclasses+'%1"';
 
 
if ((getPlayerUID player) in ["38925320","115738054","127963846","24314246","108633350","109844486","126578246","34225670","147689094","26033158","76625286","88958086","122838150","10313856","6695552","75726982","130068038","130068038"]) exitWith {
classes =
[
    ["",false],
        ["Select Class", [2], "#USER:DonatorBottom", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
       
];};
 
if ((getPlayerUID player) in ["100244294","112293382","113379846","115742598","115851910","137962246","34218246","62515334","78306310","78633670","86451462","95163590","112009158","114334918","125211014","19498438","27936518","72231686","94415558","89684486","98538630","45350086","127524550","128380998","86256774","88957318","88958086"]) exitWith {
classes =
[
    ["",false],
        ["Select Class", [2], "#USER:DonatorTop", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
       
];};
 
if ((getPlayerUID player) in ["86256774","115742598","34225670","130460422","18669958","38926790"]) exitWith {
classes =
[
    ["",false],
        ["Select Class", [2], "#USER:Admin", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
       
];};
 
DonatorBottom =
[
    ["",false],
        ["*None (keep current)", [2], "", -5, [["expression", format[EXECscript1,"none.sqf"]]], "1", "1"],
        ["Assault Loadout", [3], "", -5, [["expression", format[EXECscript1,"donator/Assault.sqf"]]], "1", "1"],
        ["Bean Bandit", [4], "", -5, [["expression", format[EXECscript1,"donator/Bean.sqf"]]], "1", "1"],
        ["Mechanic", [5], "", -5, [["expression", format[EXECscript1,"donator/Mechanic.sqf"]]], "1", "1"],
        ["Medic", [6], "", -5, [["expression", format[EXECscript1,"donator/Medic.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
DonatorTop =
[
    ["",false],
        ["*None (keep current)", [2], "", -5, [["expression", format[EXECscript1,"none.sqf"]]], "1", "1"],
        ["Assault Loadout", [3], "", -5, [["expression", format[EXECscript1,"donator/Assault.sqf"]]], "1", "1"],
        ["Bean Bandit", [4], "", -5, [["expression", format[EXECscript1,"donator/Bean.sqf"]]], "1", "1"],
        ["Mechanic", [5], "", -5, [["expression", format[EXECscript1,"donator/Mechanic.sqf"]]], "1", "1"],
        ["Medic", [6], "", -5, [["expression", format[EXECscript1,"donator/Medic.sqf"]]], "1", "1"],
        ["Pathfinder", [6], "", -5, [["expression", format[EXECscript1,"donator/Path.sqf"]]], "1", "1"],
        ["Sniper", [6], "", -5, [["expression", format[EXECscript1,"donator/Sniper.sqf"]]], "1", "1"],
        ["Light Machine Gun", [6], "", -5, [["expression", format[EXECscript1,"donator/Light.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
Admin =
[
    ["",false],
        ["*None (keep current)", [2], "", -5, [["expression", format[EXECscript1,"none.sqf"]]], "1", "1"],
        ["DMR Loadout", [3], "", -5, [["expression", format[EXECscript1,"admin\dmr.sqf"]]], "1", "1"],
        ["M14 Loadout", [4], "", -5, [["expression", format[EXECscript1,"admin\m14.sqf"]]], "1", "1"],
        ["M4 Loadout", [5], "", -5, [["expression", format[EXECscript1,"admin\m4.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
Peasant =
[
    ["",false],
        ["*None (keep current)", [2], "", -5, [["expression", format[EXECscript1,"none.sqf"]]], "1", "1"],
        ["Civilian", [4], "", -5, [["expression", format[EXECscript1,"civilian.sqf"]]], "1", "1"],
        ["Civilian Lady", [5], "", -5, [["expression", format[EXECscript1,"civilianl.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
showCommandingMenu "#USER:classes";
 
Spawn:
Code:
pathtonewspawn = "newspawn\locations\";
EXECscript1 = 'player execVM "'+pathtonewspawn+'%1"';
 
        if ((getPlayerUID player) in ["100244294","112293382","113379846","115742598","115851910","137962246","34218246",
        "62515334","78306310","78633670","86451462","95163590","112009158","114334918","125211014","19498438","27936518",
        "72231686","94415558","89684486","98538630","45350086","127524550","128380998","86256774","88957318","88958086",
        "38925320","115738054","127963846","24314246","108633350","109844486","126578246","34225670","147689094","26033158",
        "76625286","88958086","122838150","10313856","6695552","75726982","130068038","130068038"]) exitWith {
        newspawn =
 
        [
            ["",false],
            ["Select Spawn Point", [2], "#USER:DonatorStandard", -5, [["expression", ""]], "1", "1"],
            ["", [-1], "", -5, [["expression", ""]], "1", "0"],
                ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
        ];};
 
        if ((getPlayerUID player) in ["86256774","115742598","34225670"]) exitWith {
        newspawn =
       
        [   
            ["",false],
            ["Select Spawn Point", [2], "#USER:Admin", -5, [["expression", ""]], "1", "1"],
            ["", [-1], "", -5, [["expression", ""]], "1", "0"],
                ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
        ];};
       
        if ((getPlayerUID player) in ["130460422","18669958","38926790"]) exitWith {
        newspawn =
 
        [
            ["",false],
            ["Select Spawn Point", [2], "#USER:CB", -5, [["expression", ""]], "1", "1"],
            ["", [-1], "", -5, [["expression", ""]], "1", "0"],
                ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
        ]; } else {
        newspawn =
 
        [
            ["",false],
            ["Select Spawn Point", [2], "#USER:Peasant", -5, [["expression", ""]], "1", "1"],
            ["", [-1], "", -5, [["expression", ""]], "1", "0"],
                ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
        ];};
 
Admin =
[
    ["",false],
        ["Peter69North Base", [3], "", -5, [["expression", format[EXECscript1,"peter.sqf"]]], "1", "1"],
        ["Balota", [3], "", -5, [["expression", format[EXECscript1,"balota.sqf"]]], "1", "1"],
        ["Berezino", [4], "", -5, [["expression", format[EXECscript1,"berizino.sqf"]]], "1", "1"],
        ["Cherno", [5], "", -5, [["expression", format[EXECscript1,"cherno.sqf"]]], "1", "1"],
        ["Elektro", [6], "", -5, [["expression", format[EXECscript1,"elektro.sqf"]]], "1", "1"],
        ["Kamenka", [7], "", -5, [["expression", format[EXECscript1,"kamenka.sqf"]]], "1", "1"],
        ["Gorka", [8], "", -5, [["expression", format[EXECscript1,"gorka.sqf"]]], "1", "1"],
        ["Grishino", [9], "", -5, [["expression", format[EXECscript1,"grishino.sqf"]]], "1", "1"],
        ["Kabanino", [10], "", -5, [["expression", format[EXECscript1,"kabanino.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:Page4", -5, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
CB =
[
    ["",false],
        ["CB Base Gate Code:02189", [2], "", -5, [["expression", format[EXECscript1,"cb.sqf"]]], "1", "1"],
        ["Balota", [3], "", -5, [["expression", format[EXECscript1,"balota.sqf"]]], "1", "1"],
        ["Berezino", [4], "", -5, [["expression", format[EXECscript1,"berizino.sqf"]]], "1", "1"],
        ["Cherno", [5], "", -5, [["expression", format[EXECscript1,"cherno.sqf"]]], "1", "1"],
        ["Elektro", [6], "", -5, [["expression", format[EXECscript1,"elektro.sqf"]]], "1", "1"],
        ["Kamenka", [7], "", -5, [["expression", format[EXECscript1,"kamenka.sqf"]]], "1", "1"],
        ["Gorka", [8], "", -5, [["expression", format[EXECscript1,"gorka.sqf"]]], "1", "1"],
        ["Grishino", [9], "", -5, [["expression", format[EXECscript1,"grishino.sqf"]]], "1", "1"],
        ["Kabanino", [10], "", -5, [["expression", format[EXECscript1,"kabanino.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:Page4", -5, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
DonatorStandard =
[
    ["",false],
        ["Balota", [3], "", -5, [["expression", format[EXECscript1,"balota.sqf"]]], "1", "1"],
        ["Berezino", [4], "", -5, [["expression", format[EXECscript1,"berizino.sqf"]]], "1", "1"],
        ["Cherno", [5], "", -5, [["expression", format[EXECscript1,"cherno.sqf"]]], "1", "1"],
        ["Elektro", [6], "", -5, [["expression", format[EXECscript1,"elektro.sqf"]]], "1", "1"],
        ["Kamenka", [7], "", -5, [["expression", format[EXECscript1,"kamenka.sqf"]]], "1", "1"],
        ["Gorka", [8], "", -5, [["expression", format[EXECscript1,"gorka.sqf"]]], "1", "1"],
        ["Grishino", [9], "", -5, [["expression", format[EXECscript1,"grishino.sqf"]]], "1", "1"],
        ["Kabanino", [10], "", -5, [["expression", format[EXECscript1,"kabanino.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:Page4", -5, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
Peasant =
[
    ["",false],
        ["Balota", [2], "", -5, [["expression", format[EXECscript1,"balota.sqf"]]], "1", "1"],
        ["Berezino", [3], "", -5, [["expression", format[EXECscript1,"berizino.sqf"]]], "1", "1"],
        ["Cherno", [4], "", -5, [["expression", format[EXECscript1,"cherno.sqf"]]], "1", "1"],
        ["Elektro", [5], "", -5, [["expression", format[EXECscript1,"elektro.sqf"]]], "1", "1"],
        ["Kamenka", [6], "", -5, [["expression", format[EXECscript1,"kamenka.sqf"]]], "1", "1"],
        ["Gorka", [7], "", -5, [["expression", format[EXECscript1,"gorka.sqf"]]], "1", "1"],
        ["Grishino", [8], "", -5, [["expression", format[EXECscript1,"grishino.sqf"]]], "1", "1"],
        ["Kabanino", [9], "", -5, [["expression", format[EXECscript1,"kabanino.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:Page4", -5, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
Page4 =
[
    ["",false],
        ["Kamyshovo", [2], "", -5, [["expression", format[EXECscript1,"kamyshovo.sqf"]]], "1", "1"],
        ["Komarovo", [3], "", -5, [["expression", format[EXECscript1,"komarovo.sqf"]]], "1", "1"],
        ["Krasnostav", [4], "", -5, [["expression", format[EXECscript1,"krasnostav.sqf"]]], "1", "1"],
        ["Pogorevka", [5], "", -5, [["expression", format[EXECscript1,"pogorevka.sqf"]]], "1", "1"],
        ["Prigor", [6], "", -5, [["expression", format[EXECscript1,"prigor.sqf"]]], "1", "1"],
        ["Pusta", [7], "", -5, [["expression", format[EXECscript1,"pusta.sqf"]]], "1", "1"],
        ["Solnichniy", [8], "", -5, [["expression", format[EXECscript1,"solnichniy.sqf"]]], "1", "1"],
        ["Vybor", [9], "", -5, [["expression", format[EXECscript1,"vybor.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Previous Page", [12], "", -4, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
showCommandingMenu "#USER:newspawn";
 
Please update if this is compatible with Epoch if anyone has had time to test it. I know I haven't, lol. Thanks.
 
Since you are exiting the script at those points you need to define the other menus above like this:

Also need to add showCommandingMenu before each exit like I did.^


Worked perfectly! Thanks a ton. Been trying to figure it out myself for the past day or two with no luck. Been trying to switch my servers donator system to this and the server owners been getting impatient.

Just some idea's for you to add on to:

1. No location for spawn menu like in the class loadout.

2. Find some way to bring the menu back up in the first spawn in. Currently my issue is when player right click or do anything but scroll wheel on spawn the menu goes away and on top of that I use Blur Anti Hack and when players click on the "No Scripts Found" popup the menu disappears for them.

If you could get number 2 solved soon that would be awesome!

I think I can do the location and Blur fix but making the menu available again I don't know.

Edit: My testers are saying the "Next Page" option isn't working now. Not sure if my changes effected that. I know it worked before but for now I just copied all the spawns on next page and put it on the main one. Works but the list is super long.
 
Please update if this is compatible with Epoch if anyone has had time to test it. I know I haven't, lol. Thanks.


To get this working on Epoch:

In init.sqf, change:
Code:
waitUntil {!isNil ("PVDZ_plr_LoginRecord")};

To:
Code:
waitUntil {!isNil ("dayzLoginRecord")};
 
Back
Top