[Discussion] Custom spawn points based on UID (UPDATED)

Im trying to get this to work with the new Epoch 1.0.2.4 update. Any help would be appreciated.
 
For Epoch 1.0.2.4 you need to use the new login variable:

PVDZE_plr_Login

So the init.sqf code should look like:
Code:
p2_newspawn = compile preprocessFileLineNumbers "newspawn\newspawn_execute.sqf";
waitUntil {!isNil ("PVDZE_plr_Login")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn p2_newspawn;
};

For regular Chernarus 1.8 the login variable is PVCDZ_plr_Login. If you are not sure what the correct login variable for the mod you are using is just check the bottom of server_playerLogin.sqf

And you didn't really need to make a new thread for this. Could have just asked player2 to update her OP directions.

That bit of code didn't work. I have already asked player2. Waiting on a response.
 
For Epoch 1.0.2.4 you need to use the new login variable:

PVDZE_plr_Login

So the init.sqf code should look like:
Code:
p2_newspawn = compile preprocessFileLineNumbers "newspawn\newspawn_execute.sqf";
waitUntil {!isNil ("PVDZE_plr_Login")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn p2_newspawn;
};

For regular Chernarus 1.8 the login variable is PVCDZ_plr_Login. If you are not sure what the correct login variable for the mod you are using is just check the bottom of server_playerLogin.sqf

And you didn't really need to make a new thread for this. Could have just asked player2 to update her OP directions.

I figured it out...

//##UID Based Custom Spawn Locations##
p2_newspawn = compile preprocessFileLineNumbers "customspawns\newspawn.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
player spawn p2_newspawn;
};
 
ah yea, see the edit button now. Kinda new to scripting and wut not. And wow man, calm down and dont hurt me u big gorilla.;)
 
Hello, I am trying to implement the adapted code for epoch 1.0.2.4 from CHI. But I cannot get it running, I am still a rookie when it comes to coding so I must have let a little fault slip in.

I'll show what i did:

Dayz_server.pbo in file server_playerSetup.sqf

I went to bottom and put :

PHP:
PVDZE_plr_Login = [_worldspace,_state,_randomSpot];
PVDZE_plr_Login2 = null;

In init.sqf I entered what Chi gave and put it on the bottom:

PHP:
//##UID Based Custom Spawn Locations##
p2_newspawn = compile preprocessFileLineNumbers "fixes\newspawn.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
player spawn p2_newspawn;
};
 
[] execVM "addons\R3F_ARTY_AND_LOG\init.sqf";
 
[] execVM "buildings\excbridge.sqf";

The last 2 lines are addons tow/lift and skalisty bridge (maybe they interfere??)

Then I made newspawn.sqf and put this inside it, the ID's inside are meant to be spawned in Devil's Castle:

PHP:
if (!isDedicated) then {
        sleep 1;
                        //Player UID's
        if ((getPlayerUID player) in ["151713991","34243520","46994990","48687382","49447094"]) exitWith {
        //## Custom Spawn Location 1 - Format: [X,Y,Z] (Z = Height AtTerrainLevel)
            player setPosATL [137.425,124.279,280];
        };
 
Thank you ebay, that worked. I needed the antiTP to not revert me and had to change the coordinates :) This on epoch btw
 
does this not work with the AH that vilayer sells?

Im using it on vilayer right now in Epoch. Not sure my Silent Warrior is working right. Hard to get customer service after the purchase. Before the purchase the guy would e-mail me back within a few minutes....-_-
 
OK, took the day at work thinking of where I went wrong, came home and tried my ideas. I am still spawning on the shore.

I am running:

EPOCH 1.0.2.5 on vilayer.
I have the the "DayZ AntiHack - BETA" which is basically the blur infiSTAR anti hack.
I have running and working the following scripts:
self blood bag
take clothes
trader cities 2.0 (instance 17)
god mode in those traders.
Missions
and I have custom load outs

so far I have done:

at the bottom of server_playerSetup.sqf i have tried many different versions of
Code:
PVDZE_plr_Login = [_worldspace,_state,_randomSpot];
PVCDZ_plr_Login2 = [_worldspace,_state,_randomSpot];

the bottom of init.sqf

Code:
//##UID Based Custom Spawn Locations##
p2_newspawn = compile preprocessFileLineNumbers "scripts\newspawn.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
player spawn p2_newspawn;
};
 
#include "\z\addons\dayz_code\system\REsec.sqf"
 
[] execVM "faction.sqf";
[] execVM "debug\addmarkers.sqf";
[] execVM "debug\addmarkers75.sqf";

my scripts\newspawn.sqf is
Code:
if (!isDedicated) then {
        sleep 1;
                        //Player GEEK WOODS SPAWN
        if ((getPlayerUID player) in ["125203846","103042182","120303174","151055302","119603142"]) exitWith {
        //## Custom Spawn Location 1 - Format: [X,Y,Z] (Z = Height AtTerrainLevel)
            player setPosATL [8195.67,8082.82,0.289];
        };
       
                        //Player UID's
        if ((getPlayerUID player) in ["0"]) exitWith {
        //## Custom Spawn Location 2 - Format: [X,Y,Z] (Z = Height AtTerrainLevel)
            player setPosATL [195,7213,1.5];
        };
};

I left the second how it is so that I can set it up later.

I also did this:
Add this line to your init.sqf below dayz_maxLocalZombies = 30;
Code:
DZE_teleport = [99999,99999,99999,99999,99999];


and I also did:
If you are using antihax:
1. Find:
Code:
_cMenu = ['','RscMainMenu','RscMoveHigh','#WATCH', ...];
2. Add the command menu names you are using. Here are the default names I used:
Code:
_cMenu = ['#USER:newspawn','#USER:classes','#USER:Page4','#USER:Donator','#USER:Peasant'];


I DID NOT disable the antihax by commenting out:
Disable Anti-TP:
1. Open init.sqf and find:
Code:
[] execVM "\z\addons\dayz_code\system\antihack.sqf";
because if it requires me to not use my AH then I am out...



help?




THANK YOU for your time looking into this, I would like to say that I am getting pretty good at implementing other peoples code, and would like to start writing my own soon, but this one has really thrown me a loop.
 
That is wrong. You only want to add _randomspot to login2.

And are you using the latest update from infistar? 10/25?

If yes then he put a special version of the antiTP in it. See:
http://opendayz.net/threads/help-pr...-towing-and-heli-lift.13744/page-5#post-79531

You should never run anti hack from the mission pbo. Anyone can see the files in your mission pbo. You are giving cheaters everything they need to access your admin menu. Put it in server pbo \init folder and execute it from the bottom of server_functions.sqf.

OK, I changed
Code:
PVDZE_plr_Login = [_worldspace,_state,_randomSpot];
PVCDZ_plr_Login2 = [_worldspace,_state,_randomSpot];
to:
Code:
PVDZE_plr_Login = [_worldspace,_state];
PVCDZ_plr_Login2 = [_worldspace,_state,_randomSpot];
However, the original was:
Code:
PVDZE_plr_Login = null;
PVDZE_plr_Login2 = null;
So, I will try multiple ways, maybe one will work. (note difference PVCDZ to PVDZE).

not sure what version the AH is, since vilayer doesn't allow me access to the code.

And I have it run from the server_functions.sqf. already
 
try #1 with
Code:
PVDZE_plr_Login = null;
PVDZE_plr_Login2 = [_worldspace,_state,_randomSpot];

also tried this one with no AH

No luck.

try #2 with
Code:
PVDZE_plr_Login = null;
PVCDZ_plr_Login2 = [_worldspace,_state,_randomSpot];

No luck.

try #3, last try with
Code:
PVDZE_plr_Login = [_worldspace,_state];
PVCDZ_plr_Login2 = [_worldspace,_state,_randomSpot];

Also tried this one with no AH

No Luck.


I also noticed since I started trying to get this to work and when my AH is on my AH tells me:

<AntiHack>:SERVER ALERT!(remExServer modified!) | 0h | 1min |

Thanks again for your help.
 
Back
Top