Advertisement
Rian_Tyler

Untitled

May 2nd, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Buddy:
  2. Loop, Read, Freunde.txt
  3. {
  4.     Sleep, 500
  5.     if (GetPlayerIDByName(A_LoopReadLine) = "-1"){
  6.         IniRead, onlinestatus, Settings.ini, Freunde, %A_LoopReadLine%, 0
  7.         if (onlinestatus = "0"){
  8.             IniWrite, Offline, Settings.ini, Freunde, %A_LoopReadLine%
  9.         }
  10.         if (onlinestatus = "Offline"){
  11.             continue
  12.         }
  13.         if (onlinestatus = "Online"){
  14.             AddChatMessage("{C8FE2E}* Freund " A_LoopReadLine " hat den Server verlassen.")
  15.             IniWrite, Offline, Settings.ini, Freunde, %A_LoopReadLine%
  16.         }
  17.     }
  18.     if(GetPlayerIDByName(A_LoopReadLine) != "-1"){
  19.         IniRead, onlinestatus, Settings.ini, Freunde, %A_LoopReadLine%, 0
  20.         If(onlinestatus = "0"){
  21.             IniWrite, Online, Settings.ini, Freunde, %A_LoopReadLine%
  22.         }
  23.         if (onlinestatus = "Online"){
  24.             continue
  25.         }
  26.         if (onlinestatus = "Offline"){
  27.             AddChatMessage("{C8FE2E}* Freund " A_LoopReadLine " (" id ") hat den Server betreten.")
  28.             IniWrite, Online, Settings.ini, Freunde, %A_LoopReadLine%
  29.         }
  30.     }
  31. }
  32. return
  33.  
  34. ;<STRING_COMMAND1.1>
  35. :?:/freunde::
  36. Suspend, Permit
  37. friend_Count := 0
  38. addChatMessage("{868A08}** Freunde online **")
  39. loop, read, Freunde.txt
  40. {
  41.     if (!getPlayerIdByName(A_LoopReadLine) == -1) {
  42.         addChatMessage("{F5D0A9}" A_LoopReadLine " ID: " getPlayerIdByName(A_LoopReadLine) ", Level: " getPlayerScoreByID(A_LoopReadLine) ", Ping: " getPlayerPingByID(A_LoopReadLine))
  43.         friend_Count ++
  44.     }
  45. }
  46. if (friend_Count == 0) {
  47.     AddChatMessage("{868A08}** Es sind keine Freunde online **")
  48. } else {
  49.     AddChatMessage("{868A08}** Es sind " friend_Count " Freund/e online **")
  50. }
  51. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement