Jump to content
Sign in to follow this  
ryansoper

Detecting If Player is JIP

Recommended Posts

Hi guys,

I understand that init.sqf will be run by every player who joins the server, but I don't want this to be the case, There's only a limited part of the init script that I want to be run by players that JIP, as init also handles the spawning of some vehicles and I don't want them respawning everytime somebody joins.

So, Is there a way to find if a player is Join in Progress so I can give them the limited part of the script to run?

Thanks,

Ryan

Share this post


Link to post
Share on other sites

Ah I see, Could you also suggest a way I might be able to find a Player's Unit on connect?

Share this post


Link to post
Share on other sites

When you say unit, are you referring to the slot or body he will spawn into or are you referring to the reference to him.

Share this post


Link to post
Share on other sites

The Body He will spawn into, It's because I set my variables to the Unit Names, and I need to be able to ensure that the Variables are reset when a new player takes up a slot.

Share this post


Link to post
Share on other sites

I don't think there is a way while the player is spawning in. You will have to wait until the player is not nul:

waitUntil { !(isNull player) };[color=#000000][font=Lucida Console]

[/font][/color]

Share this post


Link to post
Share on other sites

Using time should work.

_isJIP = if (time > 0) then { true } else { false };

Share this post


Link to post
Share on other sites

A simple null check should be enough.

if (!isDedicated) then {
 _isJip = isNull player;
 // isJip is now true or false
 waitUntil {!(isNull player)};
 // bla bla
};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×