Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name ServerInfoTest1
- @outputs [PrevCount] [Admins]:array [AdminT]:string [EGP]:wirelink
- interval(500)
- if(first()){
- EGP = entity():isConstrainedTo():wirelink()
- }
- Players=teamPlayers(1001)
- Admins=playersAdmins()
- AdminCount=Admins:count()
- PCS=Players+AdminCount
- if(PCS>PrevCount){
- soundPlay(0,0,"garrysmod/content_downloaded.wav")
- }
- PrevCount = PCS
- RCS=PCS-AdminCount
- ACS=AdminCount
- if (first()){
- EGP:egpResolution(vec2(0,0), vec2(1000,1000))
- EGP:egpSize(1, 20)
- EGP:egpSize(2, 20)
- EGP:egpSize(3, 20)
- EGP:egpSize(4, 20)
- }
- Plys = players()
- C = Plys:count()
- O = 0
- EGP:egpClear()
- for(I=0,C){
- if(!Plys[I,entity]:isAdmin()){
- EGP:egpText((15+I), Plys[I,entity]:name(), vec2(30,80+(15*(I-O))))
- EGP:egpColor((15+I), vec(200,120,0))
- EGP:egpSize((15+I), 15)
- }else{O++}
- }
- RSS = maxPlayers()-C+O-ACS
- EGP:egpText(1, "Total Players Online: " + toString(C-O+ACS) + ".", vec2(10,10))
- EGP:egpText(2, "Free slots: "+ toString(RSS) + ".", vec2(10,40))
- EGP:egpText(3, "Non-Admins Online: " + toString(C-O) + ".", vec2(10,70))
- EGP:egpText(4, "Admins Online: " + toString(ACS) + ".", vec2(10,120+(C-O)*15))
- for(I=0,AdminCount){
- EGP:egpText(C+16+I, Admins[I,entity]:name(), vec2(30,130+(15*I)+((C-O)*15)))
- EGP:egpColor(C+16+I, vec(0,180,0))
- EGP:egpSize(C+16+I, 15)
- }
- Temp = 0
- for(I=0,(C-O+ACS)){
- Temp += Plys[I,entity]:ping()
- }
- AvgPing = round(Temp/(C-O+ACS))
- PingText = "Average Server Ping: "+toString(AvgPing)
- EGP:egpText(C+AdminCount+25, PingText, vec2(10,150+(15)+((C-O)*15)+(AdminCount*15)))
- EGP:egpSize(C+AdminCount+25, 20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement