Advertisement
Guest User

Untitled

a guest
Mar 26th, 2023
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3.  
  4.  
  5. #include <amxmodx>
  6.  
  7.  
  8.  
  9. #define PLUGIN "Admins Only"
  10.  
  11. #define VERSION "1.0"
  12.  
  13. #define AUTHOR "necunoscut"
  14.  
  15.  
  16.  
  17.  
  18.  
  19. public plugin_init() {
  20.  
  21. register_plugin(PLUGIN, VERSION, AUTHOR)
  22.  
  23.  
  24.  
  25. register_clcmd ( "say /adminsonly", "fPrintCustomText" );
  26.  
  27. register_clcmd ( "say adminsonly", "fPrintCustomText" );
  28.  
  29. }
  30.  
  31.  
  32.  
  33. public fPrintCustomText ( id ) {
  34.  
  35.  
  36.  
  37. if ( get_user_flags ( id ) & ADMIN_RESERVATION ) {
  38.  
  39.  
  40.  
  41. chat_color ( id, "!g[SERVER.LEAGUECS.RO] !nParola sectiunii Admin's Only este:!t best );
  42.  
  43. }
  44.  
  45.  
  46.  
  47. return 1;
  48.  
  49. }
  50.  
  51.  
  52.  
  53. stock chat_color(const id, const input[], any:...)
  54.  
  55. {
  56.  
  57. new count = 1, players[32]
  58.  
  59. static msg[320]
  60.  
  61. vformat(msg, 190, input, 3)
  62.  
  63. replace_all(msg, 190, "!g", "^4")
  64.  
  65. replace_all(msg, 190, "!n", "^1")
  66.  
  67. replace_all(msg, 190, "!t", "^3")
  68.  
  69. replace_all(msg, 190, "!t2", "^0")
  70.  
  71.  
  72.  
  73. if (id)
  74.  
  75. players[0] = id;
  76.  
  77. else
  78.  
  79. get_players(players, count, "ch")
  80.  
  81.  
  82.  
  83.  
  84.  
  85. for (new i = 0; i < count; i++)
  86.  
  87. {
  88.  
  89. if (is_user_connected(players[i]))
  90.  
  91. {
  92.  
  93. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  94.  
  95. write_byte(players[i])
  96.  
  97. write_string(msg)
  98.  
  99. message_end()
  100.  
  101. }
  102.  
  103. }
  104.  
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement