Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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.
p2_newspawn = compile preprocessFileLineNumbers "newspawn\newspawn_execute.sqf";
waitUntil {!isNil ("PVDZ_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
player spawn p2_newspawn;
};
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.
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.
];};
]; }
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"]
];};
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";
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";
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.^
Please update if this is compatible with Epoch if anyone has had time to test it. I know I haven't, lol. Thanks.
waitUntil {!isNil ("PVDZ_plr_LoginRecord")};
waitUntil {!isNil ("dayzLoginRecord")};