AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   admins online?! (https://forums.alliedmods.net/showthread.php?t=209270)

ironskillz1 02-23-2013 15:44

admins online?!
 
This should work right? is something wrong?

Code:

public adminsonline() {
static id, count, msg[512], pos, name[32]
pos = 0
count = 0
pos += formatex(msg[pos], 511-pos, "admins online:")
for(id = 1 ; id <= maxplayers ; id++)
 if(is_user_connected(id) && (get_user_flags(id) & ADMIN_IMMUNITY))
 {
  count++
  get_user_name(id, name, 31)
  pos += formatex(msg[pos], 511-pos, "^n%s", name)
 }
 if (count>0)
 {
  ColorChat(id, GREEN, "^4[%s]^3 %d %s", prefix2, count, msg)
 }
 else
 {
  ColorChat(id, GREEN, "^4[%s]^3 0 Admins Online!", prefix2)
 }
}


fysiks 02-24-2013 00:19

Re: admins online?!
 
Quote:

Originally Posted by ironskillz1 (Post 1900365)
This should work right? is something wrong?

You should answer those question for yourself.

simanovich 02-24-2013 14:19

Re: admins online?!
 
Test the code ...

ironskillz1 02-24-2013 14:28

Re: admins online?!
 
Quote:

Originally Posted by simanovich (Post 1901068)
Test the code ...

i have solved it :)


All times are GMT -4. The time now is 21:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.