[RELEASE] Custom spawn locations based on UID (No DB Triggers)

gunnar

Member
This is an update to Player2's custom spawn script. There has been changes to variables since 1.8 and ive gotten much help from a fellow member here. All credits will be linked at the bottom, this is not my script. I'm just releasing a updated version of player2's.

Custom Spawns
Courtesy of Player2​
WORKING AND TESTED WITH 1.8
  • Easy = Blue <10
Programs Needed
First off you need to open your "dayz_server.pbo" and look for "\compile\server_playerSetup.sqf" and open it with NotePad++ or any other editor you use.
Next find this line of code: PVCDZ_plr_Login2 = [_worldspace,_state];
Replce it with: PVCDZ_plr_Login2 = [_worldspace,_state,_randomSpot];
MISSION.PBO
Now go into your mission file and open your " init.sqf " and at the bottom, place this code.
Code:
//##UID Based Custom Spawn Locations##
p2_newspawn = compile preprocessFileLineNumbers "scripts\newspawn.sqf";
waitUntil {!isNil ("PVDZ_plr_LoginRecord")};
if (PVCDZ_plr_Login2 select 2) then
{
    player spawn p2_newspawn;
};

After you save your init.sqf, create a new file called "newspawn.sqf"
Paste this code into it: http://pastebin.com/raw.php?i=uupQ0UJX
Once you do all of that and save it, put newspawn.sqf in the folder where you place your server scripts.​
BE SURE to change "scripts\newspawn.sqf" to what ever your scripts folder is called.​
That's it for installation.​
Everything is configured from the newspawn.sqf.
When you change the world space, make sure you take the [5974.63,2037.49,0.001] from [32,[5974.63,2037.49,0.001]], not the whole thing.
And just replace the UID's in the code to the player UID that its going to be assigned to.
NO CLUE weather this works with any other map. Do that at your own risk.
CREDITS
This script is based off Player2's script she posted, which is now out of date. This one is currently updated to work with 1.8. Original thread can be found here
Thanks to Matt L for helping fix the variables for the code. These guys deserve all the credit, I just took the time to post an updated version of an old script.​
 
Back
Top