Checking if player has fully loaded in ?

Discussion in 'Help Wanted' started by SLIgaming, May 6, 2018.

  1. SLIgaming

    SLIgaming Member

    Joined:
    Jan 29, 2017
    Messages:
    59
    Likes Received:
    8
    I'm having trouble checking if a player has fully loaded in. i.e

    Code:
    waitUntil {!isNull player};
    waitUntil {player == player};
    waitUntil {!isNull player};
    
    if (!alive player) exitWith {My code};
    Any help would be great !!

    cheers
     
    Last edited: May 6, 2018
  2. SLIgaming

    SLIgaming Member

    Joined:
    Jan 29, 2017
    Messages:
    59
    Likes Received:
    8
    This is what being created anyway
     
  3. SLIgaming

    SLIgaming Member

    Joined:
    Jan 29, 2017
    Messages:
    59
    Likes Received:
    8
    So what I have found is I need to run my script after the desolation DS_fnc_finishSpawn. How would I do this ?
     
  4. Legodev

    Legodev Developer Staff Member

    Joined:
    Jul 18, 2016
    Messages:
    408
    Likes Received:
    144
    simply have a
    Code:
    while (true) then {
      if (!isNull player) then {
        isPlaying = player getVariable ["DS_var_isPlaying", false];
        if (isPlaying) exitWith {CODE};
      };
      sleep 1;
    };
     
    SLIgaming likes this.
  5. SLIgaming

    SLIgaming Member

    Joined:
    Jan 29, 2017
    Messages:
    59
    Likes Received:
    8
    Thank you very much team !
     

Share This Page