hlmod.hu
https://hlmod.hu/

Admin_Check
https://hlmod.hu/viewtopic.php?f=9&t=5869
Oldal: 1 / 1

Szerző:  pixxa112 [2012.09.06. 18:20 ]
Hozzászólás témája:  Admin_Check

Hali.

Ezt valaki ki bírja javítani??

Csak egy hibája van, hogy így kéne a szerveren: (De nem ír semmit az /admin parancsra)

[S][M] DR] Jelenlevo adminok: .#HaJHoO | SK | Skull | És így tovább.

Szerző:  HunGamer [2012.09.06. 18:31 ]
Hozzászólás témája:  Re: Admin_Check

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #define ADMIN_CHECK ADMIN_KICK
  3.  
  4. new maxplayers
  5. new gmsgSayText
  6.  
  7. public plugin_init()
  8. {
  9. register_plugin("Admin Check", "1.51", "OneEyed")
  10. maxplayers = get_maxplayers()
  11. gmsgSayText = get_user_msgid("SayText")
  12. register_clcmd("say", "handle_say")
  13. }
  14. public handle_say(id)
  15. {
  16. new said[192]
  17. read_args(said,192)
  18. if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/admin") != -1 )
  19. set_task(0.1,"print_adminlist",id)
  20.  
  21. return PLUGIN_CONTINUE
  22. }
  23. public print_adminlist(user)
  24. {
  25. new adminnames[33][32]
  26. new message[256]
  27. new id, count, x, len
  28. for(id = 1 ; id <= maxplayers ; id++)
  29. if(is_user_connected(id))
  30. if(get_user_flags(id) & ADMIN_CHECK)
  31. get_user_name(id, adminnames[count++], 31)
  32.  
  33. len = format(message, 255, "^x04[S][M] DR] ^x01Jelenlevo adminok:")
  34. if(count > 0)
  35. {
  36. for(x = 0 ; x < count ; x++)
  37. {
  38. len += format(message[len], 255-len, "^x04%s%s ", adminnames[x], x < (count-1) ? "^x01 | ":"")
  39. if(len > 96 )
  40. {
  41. print_message(user, message)
  42. len = format(message, 255, "^x04")
  43. }
  44. }
  45. print_message(user, message)
  46. }
  47. else
  48. {
  49. format(message, 255, "^x04[S][M] DR] ^x01 Nincs jelen admin ^x03!!!")
  50. print_message(user, message)
  51. }
  52. }
  53. print_message(id, msg[])
  54. {
  55. message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
  56. write_byte(id)
  57. write_string(msg)
  58. message_end()
  59. }

Szerző:  pixxa112 [2012.09.06. 18:35 ]
Hozzászólás témája:  Re: Admin_Check

Köszi :D
- - - - - - - - -
Teszteltem és működik :D

ty

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/