Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. @name ServerInfoTest1
  2. @outputs [PrevCount] [Admins]:array [AdminT]:string [EGP]:wirelink
  3.  
  4. interval(500)
  5.  
  6. if(first()){
  7. EGP = entity():isConstrainedTo():wirelink()
  8. }
  9.  
  10. Players=teamPlayers(1001)
  11. Admins=playersAdmins()
  12. AdminCount=Admins:count()
  13.  
  14. PCS=Players+AdminCount
  15.  
  16. if(PCS>PrevCount){
  17. soundPlay(0,0,"garrysmod/content_downloaded.wav")
  18. }
  19.  
  20. PrevCount = PCS
  21.  
  22. RCS=PCS-AdminCount
  23. ACS=AdminCount
  24.  
  25. if (first()){
  26. EGP:egpResolution(vec2(0,0), vec2(1000,1000))
  27. EGP:egpSize(1, 20)
  28. EGP:egpSize(2, 20)
  29. EGP:egpSize(3, 20)
  30. EGP:egpSize(4, 20)
  31. }
  32.  
  33. Plys = players()
  34. C = Plys:count()
  35.  
  36. O = 0
  37.  
  38. EGP:egpClear()
  39.  
  40. for(I=0,C){
  41. if(!Plys[I,entity]:isAdmin()){
  42. EGP:egpText((15+I), Plys[I,entity]:name(), vec2(30,80+(15*(I-O))))
  43. EGP:egpColor((15+I), vec(200,120,0))
  44. EGP:egpSize((15+I), 15)
  45. }else{O++}
  46. }
  47.  
  48. RSS = maxPlayers()-C+O-ACS
  49.  
  50. EGP:egpText(1, "Total Players Online: " + toString(C-O+ACS) + ".", vec2(10,10))
  51.  
  52. EGP:egpText(2, "Free slots: "+ toString(RSS) + ".", vec2(10,40))
  53.  
  54. EGP:egpText(3, "Non-Admins Online: " + toString(C-O) + ".", vec2(10,70))
  55.  
  56. EGP:egpText(4, "Admins Online: " + toString(ACS) + ".", vec2(10,120+(C-O)*15))
  57.  
  58. for(I=0,AdminCount){
  59. EGP:egpText(C+16+I, Admins[I,entity]:name(), vec2(30,130+(15*I)+((C-O)*15)))
  60. EGP:egpColor(C+16+I, vec(0,180,0))
  61. EGP:egpSize(C+16+I, 15)
  62. }
  63.  
  64. Temp = 0
  65.  
  66. for(I=0,(C-O+ACS)){
  67. Temp += Plys[I,entity]:ping()
  68. }
  69.  
  70. AvgPing = round(Temp/(C-O+ACS))
  71. PingText = "Average Server Ping: "+toString(AvgPing)
  72.  
  73. EGP:egpText(C+AdminCount+25, PingText, vec2(10,150+(15)+((C-O)*15)+(AdminCount*15)))
  74. EGP:egpSize(C+AdminCount+25, 20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement