Samatter

script_leave.check

May 29th, 2021 (edited)
85
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None
  1. &color_online_name="§b"
  2. &color_online_text="§a"
  3. &color_offline_name="§b"
  4. &color_offline_text="§c"
  5. UnSafe()
  6. UnSet(@&players[])
  7. ForEach(players)
  8. Push(@&players[],%PLAYERNAME%)
  9. Next
  10. Do()
  11. Wait(5)
  12. UnSet(&players_new[])
  13. ForEach(players)
  14. Push(&players_new[],%PLAYERNAME%)
  15. Next
  16. #players_index=ArraySize(@&players[])
  17. Dec(#players_index,1)
  18. For(#index,0,%#players_index%)
  19. &name=%@&players[%#index%]%
  20. IndexOf(&players_new[],#index_temp,%&name%)
  21. If((%#index_temp%==-1)&&(%&name%!=""))
  22. Log("%&color_offline_name%%&name%§r %&color_offline_text%is offline.§r")
  23. @&players[%#index%]=""
  24. EndIf
  25. Next
  26. #players_index=ArraySize(&players_new[])
  27. Dec(#players_index,1)
  28. For(#index,0,%#players_index%)
  29. &name=%&players_new[%#index%]%
  30. IndexOf(@&players[],#index_temp,%&name%)
  31. If(%#index_temp%==-1)
  32. Log("%&color_online_name%%&name%§r %&color_online_text%is online.§r")
  33. IndexOf(@&players[],#index_temp,"")
  34. If(%#index_temp%==-1)
  35. Push(@&players[],%&name%)
  36. Else
  37. @&players[%#index_temp%]=%&name%
  38. EndIf
  39. EndIf
  40. Next
  41. Loop
  42. EndUnSafe
RAW Paste Data Copied