This is based entirely off of Player2's work, and all credit goes to him. he even laid the foundations of the code down for this, I just had to make it work. Also thanks to Ashy who checked my modifications and helped rectify some of my mistakes.
First off, Player2's custom spawn is found here :http://opendayz.net/threads/release-custom-spawn-location-based-on-uid-no-database-triggers.10941/
Install that, following Ebay's edit on the last page :
Now open your newspawn.sqf which should be located in your fixes folder and make the following adjustments :
Original code:
Edited :
Again, thanks to Player2 and Ashy!
First off, Player2's custom spawn is found here :http://opendayz.net/threads/release-custom-spawn-location-based-on-uid-no-database-triggers.10941/
Install that, following Ebay's edit on the last page :
Code:
Yup, it still works. All you have to do is change one thing in the init.sqf code. The new login record variable is PVDZ_plr_LoginRecord instead of dayzLoginRecord. So it should look like this:
p2_newspawn = compile preprocessFileLineNumbers "fixes\newspawn.sqf";
waitUntil {!isNil ("PVDZ_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
player spawn p2_newspawn;
};
Original code:
Code:
if (!isDedicated) then {
sleep 1;
//Player UID's
if ((getPlayerUID player) in ["37314054","58434118","118450566"]) exitWith {
//## Custom Spawn Location 1 - Format: [X,Y,Z] (Z = Height AtTerrainLevel)
player setPosATL [185,7243,1.5];
};
//Player UID's
if ((getPlayerUID player) in ["81239110"]) exitWith {
//## Custom Spawn Location 2 - Format: [X,Y,Z] (Z = Height AtTerrainLevel)
player setPosATL [195,7213,1.5];
};
};
Edited :
Code:
if (!isDedicated) then {
sleep 1;
//Player UID's
if ((getPlayerUID player) in ["123644358"]) exitWith {
//## Custom Spawn Location 1 - Format: [X,Y,Z] (Z = Height AtTerrainLevel)
_var = random 1;
if (_var > 0.5) then {
player setPosATL [2090.08,11855.3,0.001];
} else {
player setPosATL [9924.58,2795.41,0.002];
}
}
};
//Player UID's
if ((getPlayerUID player) in ["89453894"]) exitWith {
//## Custom Spawn Location 2 - Format: [X,Y,Z] (Z = Height AtTerrainLevel)
player setPosATL [9924.58,2795.41,0.002];
};
};
Again, thanks to Player2 and Ashy!
Last edited: