Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.70 KB | None | 0 0
  1. #include <amxmodx>
  2.  
  3. #include <amxmisc>
  4.  
  5.  
  6.  
  7. new gmsgFade
  8.  
  9. public plugin_init()
  10.  
  11. {
  12.  
  13. register_plugin("Ultimate SS Taker", "V 2.1", "navir")
  14.  
  15. register_concmd("amx_ss", "ScreenShot", ADMIN_KICK, "amx_ss <player>")
  16.  
  17.  
  18.  
  19. gmsgFade = get_user_msgid("ScreenFade")
  20.  
  21. }
  22.  
  23.  
  24.  
  25. new name_player[32],param,pozes,poze
  26.  
  27.  
  28.  
  29. public ScreenShot(id, level, cid)
  30.  
  31. {
  32.  
  33. if (!cmd_access(id, level, cid, 2))
  34.  
  35. return PLUGIN_HANDLED
  36.  
  37.  
  38.  
  39. new arg[32], ip_player[32]
  40.  
  41. read_argv(1, arg, 31)
  42.  
  43.  
  44.  
  45. new player = cmd_target(id, arg, 4)
  46.  
  47.  
  48.  
  49. if (!player)
  50.  
  51. return PLUGIN_HANDLED
  52.  
  53.  
  54.  
  55. get_user_name(player, name_player, 31);
  56.  
  57. get_user_ip(player, ip_player, 31, 1);
  58.  
  59.  
  60.  
  61. client_print(id, print_chat, "Nick: ^"%s^" - Ip: %s", name_player,ip_player);
  62.  
  63.  
  64.  
  65. client_print(id, print_console, "Nick: ^"%s^" - Ip: %s", name_player,ip_player);
  66.  
  67. client_print(id, print_console, "Nick: ^"%s^" - Ip: %s", name_player,ip_player);
  68.  
  69. client_print(id, print_console, "Nick: ^"%s^" - Ip: %s", name_player,ip_player);
  70.  
  71.  
  72.  
  73. pozes=5
  74.  
  75. poze=1
  76.  
  77.  
  78.  
  79. client_print(id, print_chat, "^"%s^" must give you 5 photos, one of them must be GREEN !", name_player);
  80.  
  81.  
  82.  
  83. new hostname[64], name_admin[32], timer[32];
  84.  
  85.  
  86.  
  87. get_cvar_string("hostname",hostname,63);
  88.  
  89. get_user_name(id, name_admin, 31);
  90.  
  91. get_time("%m/%d/%Y - %H:%M:%S", timer,31);
  92.  
  93.  
  94.  
  95. client_print(player, print_center, "PHOTO # %d CS", poze+1);
  96.  
  97.  
  98.  
  99. client_print(player, print_chat, "--------------------------------------------");
  100.  
  101. client_print(player, print_chat, "Admin: ^"%s^" made you a screenshot !", name_admin);
  102.  
  103. client_print(player, print_chat, "Your nick: ^"%s^" - Your Ip: %s", name_player, ip_player);
  104.  
  105. client_print(player, print_chat, "Date and time: %s - Server: ^"%s^"", timer, hostname);
  106.  
  107. client_print(player, print_chat, "--------------------------------------------");
  108.  
  109.  
  110.  
  111. client_cmd(player,"snapshot");
  112.  
  113.  
  114.  
  115. poze++
  116.  
  117. param=player
  118.  
  119. set_task(1.0,"GreenShot",3322,_,_,"b");
  120.  
  121. return PLUGIN_HANDLED
  122.  
  123. }
  124.  
  125.  
  126.  
  127. public GreenShot(id, level, cid)
  128.  
  129. {
  130.  
  131. if(poze < pozes) {
  132.  
  133.  
  134. if(poze==3) {
  135.  
  136.  
  137.  
  138. message_begin(MSG_ONE, gmsgFade, {0,0,0},param)
  139.  
  140. write_short(14<<7)
  141.  
  142. write_short(58<<6)
  143.  
  144. write_short(1<<0)
  145.  
  146. write_byte(5)
  147.  
  148. write_byte(255)
  149.  
  150. write_byte(0)
  151.  
  152. write_byte(255)
  153.  
  154. message_end()
  155.  
  156. }
  157.  
  158.  
  159.  
  160. new hostname[64], name_player[32], ip_player[32], timer[32];
  161.  
  162. new frags = get_user_frags (param)
  163.  
  164. new deaths = get_user_deaths (param)
  165.  
  166.  
  167.  
  168. get_cvar_string("hostname",hostname,63);
  169.  
  170. get_user_name(param,name_player,31);
  171.  
  172. get_user_ip(param, ip_player, 31, 1);
  173.  
  174. get_time("%m/%d/%Y - %H:%M:%S", timer,31);
  175.  
  176.  
  177.  
  178. client_print(param, print_center, "PHOTO # %d", poze+1);
  179.  
  180.  
  181.  
  182. client_print(param, print_chat, "--------------------------------------------");
  183.  
  184. client_print(param, print_chat, "Your frags: %d - Your deaths: %d",frags, deaths);
  185.  
  186. client_print(param, print_chat, "Your nick: ^"%s^" - Your Ip: %s", name_player, ip_player);
  187.  
  188. client_print(param, print_chat, "Date and time: %s - Server: ^"%s^"", timer, hostname);
  189.  
  190. client_print(param, print_chat, "--------------------------------------------");
  191.  
  192.  
  193.  
  194. client_cmd(param,"snapshot");
  195.  
  196. poze++
  197.  
  198.  
  199.  
  200. } else {
  201.  
  202.  
  203.  
  204. client_cmd(param,"snapshot");
  205.  
  206. client_cmd(param,"kill;wait;jointeam 6");
  207.  
  208.  
  209.  
  210. get_user_name(param, name_player, 31);
  211.  
  212.  
  213.  
  214. client_print(0, print_chat, "SS was taken from ^"%s^" !", name_player);
  215.  
  216.  
  217.  
  218. client_print(param, print_chat, "%s, 5 photos were taken.", name_player);
  219.  
  220. client_print(param, print_chat, "Use say_team @ and it will be seen only by admins!");
  221.  
  222.  
  223.  
  224. remove_task(3322);
  225.  
  226.  
  227.  
  228. }
  229.  
  230.  
  231.  
  232. return PLUGIN_HANDLED;
  233.  
  234. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement