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 3xuogfjda4o4 dodana przez Nakupenda., 27.02.2012 18:06
:D
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. 255. 256. 257. 258. 259. 260. 261. 262. 263. 264. 265. 266. 267. 268. 269. 270. 271. 272. 273. 274. 275. 276. 277. 278. 279. 280. 281. 282. 283. 284. 285. 286. 287. 288. 289. 290. 291. 292. 293. 294. 295. 296. 297. 298. 299. 300. 301. 302. 303. 304. 305. 306. 307. 308. 309. 310. 311. 312. 313. 314. 315. 316. 317. 318. 319. 320. 321. 322. 323. 324. 325. 326. 327. 328. 329. 330. 331. 332. 333. 334. 335. 336. 337. 338. 339. 340. 341. 342. 343. 344. 345. 346. 347. 348. 349. 350. 351. 352. 353. 354. 355. 356. 357. 358. 359. 360. 361. 362. 363. 364. 365. 366. 367. 368. 369. 370. 371. 372. 373. 374. 375. 376. 377. 378. 379. 380. 381. 382. 383. 384. 385. 386. 387. 388. 389. 390. 391. 392. 393. 394. 395. 396. 397. 398. 399. 400. 401. 402. 403. 404. 405. 406. 407. 408. 409. 410. 411. 412. 413.
#include <amxmodx> #include <cstrike> #include <fun> #include <engine> #include <colorchat> #include <hamsandwich> #include <fakemeta> new const gNazwaPluginu[] = "VIP Naku"; new const gWersjaPluginu[] = "1.0"; new const gAutorPluginu[] = "Nakupenda."; /* -=[ Lista graczy ktorzy posiadaja status V.i.P - Kolor ]=- */ static const COLOR[] = "^x04"; /* -=[ Lista Kolorow ]=- * ^x01 - Info wyswietlane jest na zolto * ^x03 - Info wyswietlane jest na zielono * ^x04 - Info wyswietlane jest na kolor teamu (czerwono - TT / niebiesko - CT) */ new gPcvarFlaga[3] new gMaxPlayers, gMSGSayText //new gPcvarHe, gPcvarSmoke, gPcvarFlash, //gPcvarHP new bool:ciche[33], bool:grav[33], bool:deagle[33], bool:jump[33], bool:speed[33]; public plugin_init() { register_plugin(gNazwaPluginu, gWersjaPluginu, gAutorPluginu); register_clcmd("say /vips","ViPLista"); register_clcmd("say_team /vips","ViPLista"); register_clcmd("say /vip","ViPInfo"); register_clcmd("say_team /vip","ViPInfo"); register_clcmd("say /vipmenu","ViPMenu"); register_clcmd("say_team /vipmenu","ViPMenu"); //register_event("DeathMsg", "hook_death", "a", "1>0"); //register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0"); register_logevent("RoundStart", 2, "0=World triggered", "1=Round_Start") //register_event("Damage","Damage","b"); register_event("CurWeapon", "CurWeaponEvent", "be", "1=1"); register_clcmd("awp","PlayerCmd"); gMaxPlayers = get_maxplayers(); gMSGSayText = get_user_msgid("SayText"); register_cvar("vip_max_health", "130"); register_cvar("vip_max_he", "1"); register_cvar("vip_max_smoke", "1"); register_cvar("vip_max_flash", "2"); register_cvar("vip_flaga", "t"); get_cvar_string("vip_flaga", gPcvarFlaga, sizeof gPcvarFlaga -1) } public ViPMenu(id) { if(!has_flags(id, gPcvarFlaga)) { ColorChat(id, GREEN, "[VIP]x^01 Nie masz odpowiednich uprawnien do tej komendy !") return PLUGIN_HANDLED; } new menu = menu_create("Menu VIP'a:", "Menu_handler"); new t_ciche[128]; format(t_ciche, 127, "y1. wCiche bieganie: r%s",(!ciche[id]?"ON":"OFF")) menu_additem(menu,t_ciche,"1") new t_grav[128]; format(t_grav, 127, "y1. wMniejsza grawitacja: r%s",(!grav[id]?"ON":"OFF")) menu_additem(menu,t_grav,"2") new t_deagle[128]; format(t_deagle, 127, "y1. wDeagle z ammo: r%s",(!deagle[id]?"ON":"OFF")) menu_additem(menu,t_deagle,"3") new t_jump[128]; format(t_jump, 127, "y1. wDodatkowy skok: r%s",(!jump[id]?"ON":"OFF")) menu_additem(menu,t_jump,"4") new t_speed[128]; format(t_speed, 127, "y1. wWiekszy speed: r%s",(!speed[id]?"ON":"OFF")) menu_additem(menu,t_speed,"5") menu_setprop(menu, MPROP_EXITNAME, "Wyjdz"); menu_display(id, menu); return PLUGIN_HANDLED; } public Menu_handler(id, menu, item) { if(!is_user_connected(id)) return PLUGIN_CONTINUE; if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_CONTINUE; } set_hudmessage(92, 172, 238, 0.3, 0.3,0, 6.0, 5.0) switch(item) { case 0: { if(is_user_alive(id)) { if(!ciche[id]) ciche[id]=true; else ciche[id]=false; set_cichekroki(id) } else show_hudmessage(id, "Musisz byc zywy aby wlaczyc/wylaczyc ciche chodzenie !") } case 1: { if(!grav[id]) grav[id]=true; else grav[id]=false; if(is_user_alive(id)) { set_gravitychange(id) grav[id]?ColorChat(id, GREEN, "[VIP]x^01 Mniejsza gravitacja: x^04wlaczona !"):ColorChat(id, GREEN, "[VIP]x^01 Mniejsza gravitacja: x^04wylaczona !") } else grav[id]?ColorChat(id, GREEN, "[VIP]x^01 Mniejsza gravitacja: x^04wlaczona x^01 od nowej rundy !"):ColorChat(id, GREEN, "[VIP]x^01 Mniejsza gravitacja: x^04wylaczona x^01 od nowej rundy !") } case 2: { if(!deagle[id]) { deagle[id]=true show_hudmessage(id, "Dostaniesz deagle'a z ammo w nowej rundzie") } else deagle[id]=false; ColorChat(id, GREEN, "[VIP]x^01 Deagle w nowej rundzie: x^04wylaczone !") } case 3: { if(is_user_alive(id)) { if(!jump[id]) jump[id]=true; else jump[id]=false; jump[id]?ColorChat(id, GREEN, "[VIP]x^01 Wlaczyles podwojny skok !"):ColorChat(id, GREEN, "[VIP]x^01 Wylaczyles podwojny skok !") } else show_hudmessage(id, "Musisz byc zywy aby wlaczyc/wylaczyc ciche chodzenie !") } case 4: { if(is_user_alive(id)) { if(!deagle[id]) deagle[id]=true; else deagle[id]=false; } else { set_hudmessage(92, 172, 238, 0.3, 0.3,0, 6.0, 5.0) show_hudmessage(id, "Musisz byc zywy !") } } } return PLUGIN_CONTINUE; } public PlayerCmd(id) { if(!has_flags(id, gPcvarFlaga)) { set_hudmessage(255, 0, 0, 0.5, 0.7, 0, 6.0, 15.0); show_hudmessage(id, "AWP tylko dla VIP'ow!"); ham_strip_weapon(id, "weapon_awp") } return PLUGIN_HANDLED; } public CurWeaponEvent(id) { if(read_data(1) == CSW_AWP && !has_flags(id, gPcvarFlaga)) { set_hudmessage(255, 0, 0, 0.5, 0.7, 0, 6.0, 15.0); show_hudmessage(id, "AWP tylko dla VIP'ow!"); ham_strip_weapon(id, "weapon_awp") } set_speedchange(id) set_gravitychange(id) set_cichekroki(id) return PLUGIN_HANDLED; } stock ham_strip_weapon(id, weapon[]) { if(!equal(weapon, "weapon_", 7)) return 0; new wId = get_weaponid(weapon); if(!wId) return 0; new wEnt; while((wEnt = engfunc(EngFunc_FindEntityByString,wEnt,"classname", weapon)) && pev(wEnt, pev_owner) != id) {} if(!wEnt) return 0; if(get_user_weapon(id) == wId) ExecuteHamB(Ham_Weapon_RetireWeapon, wEnt); if(!ExecuteHamB(Ham_RemovePlayerItem, id, wEnt)) return 0; ExecuteHamB(Ham_Item_Kill, wEnt); set_pev(id, pev_weapons, pev(id, pev_weapons) & ~(1<<wId)); return 1; } public RoundStart() { for(new id=1;id<32;id++) { if(!has_flags(id, gPcvarFlaga)) { ciche[id] = false grav[id] = false deagle[id] = false jump[id] = false speed[id] = false } else { set_user_health(id, get_cvar_num("vip_max_health")) set_speedchange(id) set_gravitychange(id) set_cichekroki(id) new a for(a=get_cvar_num("vip_max_he"); a>0; a--) give_item(id, "weapon_hegrenade") for(a=get_cvar_num("vip_max_flash"); a>0; a--) give_item(id, "weapon_flashbang") for(a=get_cvar_num("vip_max_smoke"); a>0; a--) give_item(id, "weapon_smokegrenade") if(deagle[id]) { give_item(id, "weapon_deagle") give_item(id,"ammo_50ae") give_item(id,"ammo_50ae") give_item(id,"ammo_50ae") give_item(id,"ammo_50ae") give_item(id,"ammo_50ae") } } } } public ViPInfo(id) { show_motd(id, "ViP.txt"); return PLUGIN_CONTINUE } public ViPLista(id) { new nazwy_vip[33][32]; new message[256]; new count, x, len; for(new i = 1 ; i <= gMaxPlayers ; i++) { if(is_user_connected(i)) { if(has_flags(i, gPcvarFlaga)) { get_user_name(i, nazwy_vip[count++], 31); } } } len = format(message, 255, "%s ViP'y ONLINE: ",COLOR); if(count > 0) { for(x = 0 ; x < count ; x++) { len += format(message[len], 255-len, "%s%s%s ", COLOR, nazwy_vip[x], x < (count-1) ? "^x01, ":""); if(len > 96 ) { print_message(id, message); len = format(message, 255, "%s ",COLOR); } } print_message(id, message); } else { len += format(message[len], 255-len, "Brak ViP'ow Online"); print_message(id, message); } return PLUGIN_CONTINUE } print_message(id, msg[]) { message_begin(MSG_ONE, gMSGSayText, {0,0,0}, id); write_byte(id); write_string(msg); message_end(); } public has_flags(id,string[]) { new ret=1 new byte new len = strlen(string) new p_flag = get_user_flags(id) for(new i=0;i<=len;i++) { if(string[i]>='a' && string[i]<='z') byte = (1<<(string[i]-'a')) else if(string[i]>='A' && string[i]<='Z') byte = (1<<(string[i]-'A')) else if(string[i]==',' && ret==1) return 1 else if(string[i]==',') ret=1 if(byte!=0 && !(p_flag & byte)) ret=0 byte=0 } return ret } public client_PreThink( id ) { if(!is_user_alive(id)||is_user_bot(id)) return PLUGIN_CONTINUE if(ciche[id]) entity_set_int(id, EV_INT_flTimeStepSound, 300) return PLUGIN_CONTINUE } public set_speedchange(id) { if(is_user_connected(id)) { new Float:speeds = get_user_maxspeed(id) if(speed[id]) speeds *= 1.3 set_user_maxspeed(id, speeds) } } public set_gravitychange(id) { if(is_user_connected(id)) { new Float:gravity = 800.0 if(grav[id]) gravity = gravity / 8 * 7 set_user_gravity(id, gravity) } } public set_cichekroki(id) { if(is_user_connected(id)) { if(ciche[id]) set_user_footsteps(id, 1) else set_user_footsteps(id, 0) } } public client_putinserver(id) { if(has_flags(id, gPcvarFlaga)) { new name[32] get_user_name(id,name,31) set_hudmessage(250, 50, 50, -1.0, 0.25, 0, 1.0, 2.0, 0.1, 0.2, 2); show_hudmessage(0, "Przychodzi Vip^n %s^n Witamy!!!",name) } return PLUGIN_CONTINUE } public client_disconnect(id) { if(has_flags(id, gPcvarFlaga)) { new name[32] get_user_name(id,name,31) set_hudmessage(250, 50, 50, -1.0, 0.25, 0, 1.0, 2.0, 0.1, 0.2, 2); show_hudmessage(0, "Odchodzi Vip^n %s",name) } return PLUGIN_CONTINUE }
Dodanych wklejek: 4031
Powered By (Pav32) Pastebin © 2011