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 1dm4fkhlwopw0 dodana przez Artur, 09.02.2013 12:45
no kill
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. 241. 242. 243. 244. 245. 246. 247. 248. 249. 250. 251. 252. 253. 254.
/* Autor: grankee * Plugin pisany z myslą o tych, którzy giną przy przenoszeniu do drugiej drużyny przez admina ;) * W przypadku gdy admin przenosi żywego gracza do drugiej drużyny jest on zabijany. * Ten plugin sprawia, że przenoszony gracz pojawia sie na respie drużyny, do której został przeniesiony * (lub zostaje w miejscu w przypadku amx_teammenuspawn=0) * * Robiony na podstawie kodu plmenu.sma * */ #include <amxmodx> #include <amxmisc> #include <fun> #include <colorchat> /** skip autoloading since it's optional */ //#define AMXMODX_NOAUTOLOAD #include <cstrike> new g_menuPosition[33] new g_menuPlayers[33][32] new g_menuPlayersNum[33] new g_menuOption[33] #define MAX_CLCMDS 24 new g_coloredMenus new g_cstrike = 0 public plugin_natives() { set_module_filter("module_filter") set_native_filter("native_filter") } public plugin_init() { register_plugin("Teammenu nokill v4.0", "v4.0", "grankee") register_dictionary("common.txt") register_dictionary("admincmd.txt") register_dictionary("plmenu.txt") register_clcmd("say /druzyna", "cmdTeamMenu", 0, "- pokazuje menu druzyn") register_clcmd("say_team /druzyna", "cmdTeamMenu", 0, "- pokazuje menu druzyn") register_cvar("amx_teammenuspawn", "1") register_menucmd(register_menuid("Team Menu"), 1023, "actionTeamMenu") g_coloredMenus = colored_menus() if (module_exists("cstrike")) g_cstrike = 1 } public module_filter(const module[]) { if (equali(module, "cstrike")) return PLUGIN_HANDLED return PLUGIN_CONTINUE } public native_filter(const name[], index, trap) { if (!trap) return PLUGIN_HANDLED return PLUGIN_CONTINUE } public actionTeamMenu(id, key) { //new teamname[32] switch (key) { case 7: { g_menuOption[id] = 1 - g_menuOption[id] displayTeamMenu(id, g_menuPosition[id]) } case 8: displayTeamMenu(id, ++g_menuPosition[id]) case 9: displayTeamMenu(id, --g_menuPosition[id]) default: { new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key] new authid[32], authid2[32], name[32], name2[32] get_user_name(player, name2, 31) get_user_authid(id, authid, 31) get_user_authid(player, authid2, 31) get_user_name(id, name, 31) log_amx("Cmd: ^"%s<%d><%s><>^" transfer ^"%s<%d><%s><>^" (team ^"%s^")", name, get_user_userid(id), authid, name2, get_user_userid(player), authid2, g_menuOption[id] ? "TERRORIST" : "CT") if (get_cvar_num("amx_hideactivity")==1) { for (new a=1;a<=32;a++) { if (is_user_connected(a)) { if (get_user_flags(a) & ADMIN_RESERVATION) { ColorChat(a,GREEN, "[GRACZ]^x03 %s ^x01przeniosl sie do^x03 %s^x01.", name, g_menuOption[id] ? "TT" : "CT") } } } } else { switch (get_cvar_num("amx_show_activity")) { case 2: ColorChat(0,GREEN, "[GRACZ]^x03 %s ^x01przeniosl sie do^x03 %s^x01.", name, g_menuOption[id] ? "TT" : "CT") case 1: ColorChat(0,GREEN, "[GRACZ]^x03 %s ^x01przeniosl sie do^x03 %s^x01.", name, g_menuOption[id] ? "TT" : "CT") } } if (g_cstrike) { if (is_user_alive(player)) { if(g_menuOption[id]==1) { cs_set_user_team(player, CS_TEAM_T) if (get_cvar_num("amx_teammenuspawn") > 0) spawn(player) } else { cs_set_user_team(player, CS_TEAM_CT) if (get_cvar_num("amx_teammenuspawn") > 0) spawn(player) } } else { if(g_menuOption[id]==1) { cs_set_user_team(player, CS_TEAM_T) cs_reset_user_model(player) } else { cs_set_user_team(player, CS_TEAM_CT) cs_reset_user_model(player) } } } displayTeamMenu(id, g_menuPosition[id]) } } return PLUGIN_HANDLED } displayTeamMenu(id, pos) { if (pos < 0) return get_players(g_menuPlayers[id], g_menuPlayersNum[id]) new menuBody[512] new b = 0 new i, iteam new name[32], team[4] new start = pos * 7 new ja[32] get_user_name (id, ja, 31) if (start >= g_menuPlayersNum[id]) start = pos = g_menuPosition[id] = 0 new len = format(menuBody, 511, g_coloredMenus ? "yZmien druzyneR%d/%d^nw^n" : "%L %d/%d^n^n", id, pos + 1, (g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0))) new end = start + 7 new keys = MENU_KEY_0|MENU_KEY_8 if (end > g_menuPlayersNum[id]) end = g_menuPlayersNum[id] for (new a = start; a < end; ++a) { i = g_menuPlayers[id][a] get_user_name(i, name, 31) if (g_cstrike) { iteam = _:cs_get_user_team(i) if (iteam == 1) { copy(team, 3, "TT") } else if (iteam == 2) { copy(team, 3, "CT") } else { get_user_team(i, team, 3) } } else { iteam = get_user_team(i, team, 3) } if ((iteam == (g_menuOption[id] ? 1 : 2)) || (access(i, ADMIN_IMMUNITY)&&(i!=id))) { ++b if (g_coloredMenus) len += format(menuBody[len], 511-len, "d%d. %sR%s^nw", b, name, team) else len += format(menuBody[len], 511-len, "#. %s %s^n", name, team) } else { keys |= (1<<b) if (is_user_admin(i)) len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s r*yR%s^nw" : "%d. %s * %s^n", ++b, name, team) else len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %syR%s^nw" : "%d. %s %s^n", ++b, name, team) } } len += format(menuBody[len], 511-len, "^n8. %L^n", id, "TRANSF_TO", g_menuOption[id] ? "TERRORIST" : "CT") if (end != g_menuPlayersNum[id]) { format(menuBody[len], 511-len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT") keys |= MENU_KEY_9 } else format(menuBody[len], 511-len, "^n0. %L", id, pos ? "BACK" : "EXIT") show_menu(id, keys, menuBody, -1, "Team Menu") } public cmdTeamMenu(id, level, cid) { if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED g_menuOption[id] = 0 displayTeamMenu(id, g_menuPosition[id] = 0) return PLUGIN_HANDLED }
Dodanych wklejek: 4031
Powered By (Pav32) Pastebin © 2011