Guest User

Untitled

a guest
Oct 17th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. -- This checks if the player is enabled or not so long as you tell it which player you're checking for
  2. local function PlayerExists(pn)
  3. return GAMESTATE:IsPlayerEnabled(pn)
  4. end
  5. local function PlayerHuman(pn)
  6. return GAMESTATE:IsHumanPlayer(pn)
  7. end
  8.  
  9. local TextStuff = Def.ActorFrame {
  10.  
  11. -- hide_if is some SM5 function that does "visible,false" if whatever you put there is true
  12. LoadFont("Common normal") .. {
  13. Text="P1";
  14. InitCommand=cmd(xy,SCREEN_LEFT+25,SCREEN_BOTTOM-120;hide_if,not PlayerExists(PLAYER_1) and not PlayerHuman(PLAYER_1);
  15.  
  16. };
  17. LoadFont("Common normal") .. {
  18. Text="P2";
  19. InitCommand=cmd(xy,SCREEN_LEFT+25,SCREEN_BOTTOM-60;hide_if,not PlayerExists(PLAYER_2) and not PlayerHuman(PLAYER_2);
  20. };
  21. }
  22.  
  23. return TextStuff
Add Comment
Please, Sign In to add comment