Display a hint message on Player Spawn (New spawn only)

clark17

Member
Hi,

I'm trying to display an short message when a player spawn (new spawn only.

I take a look at the Halo Jump on Spawn -> http://opendayz.net/threads/halo-jump-on-spawn-tutorial.9344/ to inspire me.

So, I've add this line at the end of "dayz_mission\init.sqf":
Code:
 if (!isDedicated) then {
    [] spawn {
        waitUntil { !isNil ("dayz_Totalzedscheck") and  !(player getVariable ["humanity",0] > 5000 and typeOf player == "Survivor2_DZ") and !(player getVariable ["humanity",0] < -2000 and (typeOf player == "Survivor2_DZ" or typeOf player == "SurvivorW2_DZ") ) and !(player getVariable ["humanity",0] > 0 and (typeOf player == "Bandit1_DZ" or typeOf player == "BanditW1_DZ") ) };
 
        if (dayzPlayerLogin2 select 2) then
        {
            hintsilent "Player Found! Running Script!";
            sleep 10;
            hintsilent "message test!";
        };
    };
};

Unfortunately it don't work...
Any help is appreciated ;-)
 
Init.sqf
Code:
message_newspawn = compile preprocessFileLineNumbers "Scripts\newspawn_message.sqf";
waitUntil {!isNil ("PVDZ_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn message_newspawn;
};

newspawn_message.sqf
Code:
systemChat ('message here');
cutText ["                \n and message here ( note leave the \n makes it display in the middle of screen)","PLAIN"];
 
Ok i tryed this code but it doesn't work:
Code:
// Modification pour l'affichage d'une vidéo lors de la première connexion
introduction_video = compile preprocessFileLineNumbers "fixes\introduction_video.sqf";
waitUntil {!isNil ("PVDZ_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn introduction_video;
};

Just another question, "systemchat" is it not a function for arma 3?
 
Ok i tryed this code but it doesn't work:
Code:
// Modification pour l'affichage d'une vidéo lors de la première connexion
introduction_video = compile preprocessFileLineNumbers "fixes\introduction_video.sqf";
waitUntil {!isNil ("PVDZ_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn introduction_video;
};

Just another question, "systemchat" is it not a function for arma 3?

I don't know about Arma 3. I thought you were using this for arma 2...
 
Yes really ;-)

In any case the problem remains, the script does not work ...
My server is hosted by HFBservers and it use reality dayz private server.
 
For the method MattL posted to work you also need to do this:

2. In dayz_server\compile\server_playerSetup.sqf

Find this line: dayzPlayerLogin2 = [_worldspace,_state];
Replace it with: dayzPlayerLogin2 = [_worldspace,_state,_randomSpot];

For select 2 you need 3 elements in array. :)

Oh, so you do need that? Huh. Well, you would know, it's your method after all :D
 
Hey guys. Is it possible to make with your systems for newspawns HALO SPAWN and for already spawned players a pan to player effect? Would be awesome,thanks!
 
Back
Top