[Release] Custom spawn location based on UID (No Database Triggers)

Player2

Valued Member!
Current Version: 0.1
Last Update: 05/06/13
DayZ Version: 1.7.6.1

Custom Spawn Location based on UID
About
First of all, yes this has been done before. This method however doesn't require any editing of the database, so if you're with DayZ.ST you won't need to ask for their permission to install this.

Installation
Server PBO
Open this file: ...\compile\server_playerSetup.sqf
Find this line: dayzPlayerLogin2 = [_worldspace,_state];
Replace it with: dayzPlayerLogin2 = [_worldspace,_state,_randomSpot];

Mission PBO

Open this file: ...\init.sqf
Paste this at the bottom of the file:
Code:
//##UID Based Custom Spawn Locations##
p2_newspawn = compile preprocessFileLineNumbers "fixes\newspawn.sqf";
waitUntil {!isNil ("dayzLoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn p2_newspawn;
};

Create a new file: ...\fixes\newspawn.sqf
Paste this into it: http://pastebin.com/raw.php?i=uupQ0UJX

Configuration

Everything is configured from the '...\fixes\newspawn.sqf' file.
I have included two custom spawn locations for two different sets of people.
For each new custom spawn location you'll need a new block starting from the line under '//Player UID's' all the way to the '};' 4 lines below it. As you can see you can add multiple UID's to each location, or not, it's up to you.

Credits

Script & Tutorial By: Player2
Thanks To: ZombZ, GhostZ, Gorsy
 
Back
Top