Advertisement
Guest User

Untitled

a guest
Oct 18th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.16 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4.  
  5.  
  6.  
  7. public plugin_init()
  8. {
  9. register_plugin("Easy Admin Chat","1.0","Optik")
  10. register_clcmd( "say /slap","slapthem",ADMIN_KICK," : just spectate in free camera and type the message" )
  11. register_clcmd( "say /kick","kickthem",ADMIN_KICK," : just spectate in free camera and type the message" )
  12. register_clcmd( "say /slay","slaythem",ADMIN_KICK," : just spectate in free camera and type the message" )
  13. register_clcmd( "say /spec","specteam",ADMIN_KICK," : just spectate in free camera and type the message" )
  14. register_clcmd( "say /name","nickthem",ADMIN_KICK," : just spectate in free camera and type the message" )
  15. register_clcmd( "say /nick","nickthem",ADMIN_KICK," : just spectate in free camera and type the message" )
  16. }
  17.  
  18. public slapthem(id)
  19. {
  20. if (!(get_user_flags(id)&ADMIN_KICK))
  21. {
  22. client_print(id,print_chat,"[AMXX] You have no access to that command")
  23. return PLUGIN_HANDLED
  24. }
  25. else
  26. {
  27. new name [ 32 ]
  28. get_user_name( id, name, 31 )
  29. new point_command[50], tid, body, targetname[32], pointername[32]
  30. get_user_name(id,pointername,31)
  31. get_user_aiming(id,tid,body)
  32. get_user_name(tid,targetname,31)
  33. read_args(point_command, 49)
  34. new player=find_player("a",targetname)
  35. if (player)
  36. {
  37.  
  38. user_slap(tid, 0);
  39. client_print_color(0,print_chat,"ADMIN ^4%s ^1slapped^4 ^4%s", name, targetname)
  40. }
  41. if (!player)
  42. {
  43. client_print(id,print_chat,"[AMXX] No target found")
  44. }
  45. }
  46. return PLUGIN_HANDLED
  47. }
  48.  
  49. public kickthem(id)
  50. {
  51. if (!(get_user_flags(id)&ADMIN_KICK))
  52. {
  53. client_print(id,print_chat,"[AMXX] You have no access to that command")
  54. return PLUGIN_HANDLED
  55. }
  56. else
  57. {
  58. new name [ 32 ]
  59. get_user_name( id, name, 31 )
  60. new point_command[50], tid, body, targetname[32], pointername[32]
  61. get_user_name(id,pointername,31)
  62. get_user_aiming(id,tid,body)
  63. get_user_name(tid,targetname,31)
  64. read_args(point_command, 49)
  65. new player=find_player("a",targetname)
  66. if (player)
  67. {
  68.  
  69. server_cmd("kick ^"%s^"", targetname)
  70. client_print_color(0,print_chat,"ADMIN ^4%s ^1kicked^4 ^4%s", name, targetname)
  71.  
  72. }
  73. if (!player)
  74. {
  75. client_print(id,print_chat,"[AMXX] No target found")
  76. }
  77. }
  78. return PLUGIN_HANDLED
  79. }
  80.  
  81. public slaythem(id)
  82. {
  83. if (!(get_user_flags(id)&ADMIN_KICK))
  84. {
  85. client_print(id,print_chat,"[AMXX] You have no access to that command")
  86. return PLUGIN_HANDLED
  87. }
  88. else
  89. {
  90. new name [ 32 ]
  91. get_user_name( id, name, 31 )
  92. new point_command[50], tid, body, targetname[32], pointername[32]
  93. get_user_name(id,pointername,31)
  94. get_user_aiming(id,tid,body)
  95. get_user_name(tid,targetname,31)
  96. read_args(point_command, 49)
  97. new player=find_player("a",targetname)
  98. if (player)
  99. {
  100.  
  101.  
  102. user_kill(tid);
  103. client_print_color(0,print_chat,"ADMIN ^4%s ^1slayed^4 ^4%s", name, targetname)
  104.  
  105. }
  106. if (!player)
  107. {
  108. client_print(id,print_chat,"[AMXX] No target found")
  109. }
  110. }
  111. return PLUGIN_HANDLED
  112. }
  113.  
  114.  
  115. public specteam(id)
  116. {
  117. if (!(get_user_flags(id)&ADMIN_KICK))
  118. {
  119. client_print(id,print_chat,"[AMXX] You have no access to that command")
  120. return PLUGIN_HANDLED
  121. }
  122. else
  123. {
  124. new name [ 32 ]
  125. get_user_name( id, name, 31 )
  126. new point_command[50], tid, body, targetname[32], pointername[32]
  127. get_user_name(id,pointername,31)
  128. get_user_aiming(id,tid,body)
  129. get_user_name(tid,targetname,31)
  130. read_args(point_command, 49)
  131. new player=find_player("a",targetname)
  132. if (player)
  133. {
  134. cs_set_user_team(tid,CS_TEAM_SPECTATOR);
  135. user_silentkill(tid);
  136. client_print_color(0,print_chat,"ADMIN ^4%s ^1transferred^4 ^4%s ^1to spec", name, targetname)
  137. }
  138. if (!player)
  139. {
  140. client_print(id,print_chat,"[AMXX] No target found")
  141. }
  142. }
  143. return PLUGIN_HANDLED
  144. }
  145.  
  146. public nickthem(id)
  147. {
  148. if (!(get_user_flags(id)&ADMIN_KICK))
  149. {
  150. client_print(id,print_chat,"[AMXX] You have no access to that command")
  151. return PLUGIN_HANDLED
  152. }
  153. else
  154. {
  155. new name [ 32 ]
  156. get_user_name( id, name, 31 )
  157. new point_command[50], tid, body, targetname[32], pointername[32]
  158. get_user_name(id,pointername,31)
  159. get_user_aiming(id,tid,body)
  160. get_user_name(tid,targetname,31)
  161. read_args(point_command, 49)
  162. new player=find_player("a",targetname)
  163. if (player)
  164. {
  165.  
  166. client_print_color(0,print_chat,"ADMIN ^4%s ^1changed^4 ^4%s ^1nick", name, targetname)
  167. server_cmd("amx_nick ^"%s^" ^"Name Not Allowed - Change It^"", targetname)
  168.  
  169. }
  170. if (!player)
  171. {
  172. client_print(id,print_chat,"[AMXX] No target found")
  173. }
  174. }
  175. return PLUGIN_HANDLED
  176. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement