Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Wklejka 1krile66jw dodana przez Gość, 16.11.2013 20:13
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. 151. 152. 153. 154. 155. 156. 157. 158. 159. 160. 161. 162. 163. 164. 165. 166. 167. 168. 169. 170. 171. 172. 173. 174. 175. 176. 177. 178. 179. 180. 181. 182. 183. 184. 185. 186. 187. 188. 189. 190. 191. 192. 193. 194. 195. 196. 197. 198. 199. 200. 201. 202. 203. 204. 205. 206. 207. 208. 209. 210. 211. 212. 213. 214. 215. 216. 217. 218. 219. 220. 221. 222. 223. 224. 225. 226. 227. 228. 229. 230. 231. 232. 233. 234. 235. 236. 237. 238. 239. 240.
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Ultimate SS" #define VERSION "1.2" #define AUTHOR "Hack, edited by Yetj" new player new ip[32] new finish; new maxscreens //maksymalna ilosc screenow zrobionych graczowi new screeninterval //czas pomiedzy 2 ss new design //visual stuff new site //stron/forum gdzie gracz ma wrzucic ss w celu unbana new reason new oslep new save new czas public plugin_init() { register_plugin( PLUGIN, VERSION, AUTHOR ) register_concmd("amx_ss", "concmd_screen", ADMIN_BAN, "<authid, nick lub #userid> <screens>") register_clcmd("say /ip", "show_ip") maxscreens = register_cvar("amx_ss_max", "5") //Maksymalna ilosc ss screeninterval = register_cvar("amx_ss_interval", "2.0") //odstep pomiedzy 2 ss design = register_cvar("amx_ss_design", "3") //wyglad podczas i po zrobieniu ss site = register_cvar("amx_ss_site","cs-m.xaa.pl") //strona/forum gdzie ma wrzucic ss reason = register_cvar("amx_ss_reason","Wrzuc_screeny_na_") save = register_cvar("amx_ss_save","1") czas = register_cvar("amx_ss_ban","0") oslep = get_user_msgid("ScreenFade") } public concmd_screen(id, level, cid) { if(!cmd_access(id, level, cid, 3)) //if the one who requests an ss isnt admin exit { return PLUGIN_HANDLED } new arg1[24], arg2[4] read_argv(1, arg1, 23) read_argv(2, arg2, 3) new screens = str_to_num(arg2) new maxss = get_pcvar_num(maxscreens) if(screens > maxss) //too many ss? { console_print(id, "[SS]Za duzo screenow na raz!") return PLUGIN_HANDLED } player = cmd_target(id, arg1, 1) if (!player) //the player has exited the sv or he didnt existed { return PLUGIN_HANDLED } finish = screens new Float:interval = get_pcvar_float(screeninterval) //a set_task for each "amx_ss nickname nr_of_ss" new array[2] array[0] = id //save usefull data in a vector so it can be reused array[1] = player set_task(interval, "ss_propriuzis", 0, array,2, "a", screens) return PLUGIN_HANDLED } public ss_propriuzis(array[2]) { //take data and set them accordingly new player = array[1] new id = array[0] new logfile[128],text[256] //save time,adminname,playername so that the player cant give us other ss's and because it LOOKS COOOL! new timestamp[32], timestampmsg[128], name[32], adminname[32] get_time("%d/%m/%Y - %H:%M:%S", timestamp, 31) get_user_name(player, name, 31) get_user_name(id, adminname, 31) get_user_ip(player, ip, 31) //Clasic Design if(get_pcvar_num(design) == 0) { client_print(player, print_chat, "Siema ;)", name, adminname) client_cmd(player, "snapshot") //ss if(get_pcvar_num(save) == 0) { console_print(id, "[SS]Nie zapisano ss w logach"); } else if(get_pcvar_num(save) == 1) { format (text, 256, "[%s] %s zrobil screeny %s [%s]",timestamp,adminname,name,ip) format( logfile, 128, "addons/amxmodx/logs/screeny.log", logfile) write_file( logfile, text ) console_print(id, "[SS]Zapisano ss w logach"); } } //Doar Playerului else if(get_pcvar_num(design) == 1) { client_print(player, print_chat, "Siema ;)", name, adminname, timestamp) client_cmd(player, "snapshot") //ss if(get_pcvar_num(save) == 0) { console_print(id, "[SS]Nie zapisano ss w logach"); } else if(get_pcvar_num(save) == 1) { format (text, 256, "[%s] %s zrobil screeny %s [%s]",timestamp,adminname,name,ip) format( logfile, 128, "addons/amxmodx/logs/screeny.log", logfile) write_file( logfile, text ) console_print(id, "[SS]Zapisano ss w logach"); } } //HUD Message doar Playerului else if(get_pcvar_num(design) == 2) { set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 0.5, 0.0, 0.0, 4) format(timestampmsg, 127, "** CZAS: - %s **", timestamp) show_hudmessage(player, timestampmsg) client_cmd(player, "snapshot") //ss if(get_pcvar_num(save) == 0) { console_print(id, "[SS]Nie zapisano ss w logach"); } else if(get_pcvar_num(save) == 1) { format (text, 256, "[%s] %s zrobil screeny %s [%s]",timestamp,adminname,name,ip) format( logfile, 128, "addons/amxmodx/logs/screeny.log", logfile) write_file( logfile, text ) console_print(id, "[SS]Zapisano ss w logach"); } } //Full else if(get_pcvar_num(design) == 3) { //HUD Timestamp Message set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 0.5, 0.0, 0.0, 4) format(timestampmsg, 127, "** GRACZ %s CZAS: - %s **",name,timestamp) show_hudmessage(player, timestampmsg) console_print(id, "** Screenshot zrobiony graczowi ^"%s^"" (%s) **", name, adminname, timestamp ) //client_print(0, print_chat, "** Screenshot zrobiony graczowi ^"%s^" przez admina ^"%s^" (%s) **", name, adminname, timestamp) client_cmd(player, "snapshot") //ss if(get_pcvar_num(save) == 0) { console_print(id, "[SS]Nie zapisano ss w logach"); } else if(get_pcvar_num(save) == 1) { format (text, 256, "SS time",timestamp,adminname,name,ip) format( logfile, 128, "addons/amxmodx/logs/screeny.log", logfile) write_file( logfile, text ) console_print(id, "[SS]Zapisano ss w logach"); } } console_print(id, "[SS]%s ma ip %s!",name,ip) console_print(id, "[SS]%s ma ip %s!",name,ip) console_print(id, "[SS]%s ma ip %s!",name,ip) finish = finish - 1; if(finish == 0) { set_task(0.1,"slepy",id); set_task(0.1,"info",id); client_cmd(player, "kill") cs_set_user_team(player,CS_TEAM_SPECTATOR); set_task(30.0,"ban",id); } return PLUGIN_CONTINUE; } public slepy(id) { message_begin(MSG_ONE,oslep,{0,0,0},id) write_short(~0) write_short(~0) write_short(60) write_byte(0) write_byte(0) write_byte(0) write_byte(255) message_end() } public info(id) { new timestampmsg[128] new forum[51] get_pcvar_string(site,forum,50) set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 60.0, 0.0, 0.0, 4); format(timestampmsg, 127, "**** Wrzuc screeny na %s ****^n^n^n^n**** Wrzuc screeny na %s ****", forum, forum, forum); show_hudmessage(player, timestampmsg); set_task(1.5,"info",id); } public ban(id) { new name[32] new forum[51] new powod[41] new time[41] get_pcvar_string(site,forum,50) get_pcvar_string(reason,powod,40) get_pcvar_string(czas,time,40) get_user_name(player, name, 31) server_cmd("amx_bancfg %s %s %s%s", time, name, powod, forum); } public show_ip(id) { console_print(id, "[SS]Ostatnie IP: %s!",ip) }
Dodanych wklejek: 11179
Powered By (Pav32) Pastebin © 2011