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 190t4oqvya4g4 dodana przez MarcineN, 21.11.2012 22:30
zombi
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.
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #include <jailbreak> #include <hamsandwich> #include <fakemeta> #include <engine> #define PLUGIN "[JB] ZombiDay" #define VERSION "1.0" #define AUTHOR "Cypis" native cs_set_player_model(id, newmodel[]); new id_zabawa; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) id_zabawa = jail_register_game("ZombiDay"); register_clcmd("say /zombi","ZombiDay"); } public plugin_precache() { precache_model("models/player/zombi_cypis/zombi_cypis.mdl"); precache_model("models/jb_cypis/v_zombi.mdl"); precache_sound("ambience/the_horror2.wav"); } public OnRemoveData() { set_lights("#OFF"); ZombiRegister(false); CreateFog(0, .clear=true); } public OnDayStartPre(day, szInfo[256], szInfo2[512], setting[10], gTimeRound) { static szTime[12]; if(day == id_zabawa) { format_time(szTime, 11, "%M:%S", gTimeRound-60); formatex(szInfo2, 511, "Zasady:^n%s - Straznicy maja czas na zkampienie sie^n%s - Wiezniowie zaczynaja szukac^nKto zabije straznika dostaje FreeDaya w nastepnej rundzie", szTime, szTime); szInfo = "Dzisiaj jest ZombiDay"; jail_set_prisoners_micro(true, true); jail_set_ct_hit_tt(true); jail_set_tt_hit_ct(true); CreateFog(0, random_num(100,150), 1, 1, 0.006); for(new i=1; i<=32; i++) { if(!is_user_connected(i) || !is_user_alive(i) || cs_get_user_team(i) != CS_TEAM_T) continue; UstawZombi(i); } setting[0] = 2; setting[1] = 1; setting[2] = 1; setting[4] = 1; setting[6] = 1; setting[7] = 2; } } public OnDayStartPost(day) { if(day == id_zabawa) { ZombiRegister(true); jail_set_game_hud(60, "Rozpoczecie zabawy za"); } } public OnGameHudEnd() { static day; day = jail_get_play_game_id(); if(day == id_zabawa) { set_lights("a"); jail_open_cele(); jail_set_ct_hit_tt(false); jail_set_tt_hit_ct(false); emit_sound(0, CHAN_AUTO, "ambience/the_horror2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM); } } ////////zombi//////// new HamHook:hSpawn, HamHook:hItemDeploy, HamHook:hKilled; new fmTouch, fmPlayerPreThink; public ZombiRegister(bool:wartosc) { if(wartosc) { if(!hSpawn) hSpawn = RegisterHam(Ham_Spawn, "player", "fwSpawn", 1); else EnableHamForward(hSpawn); if(!hItemDeploy) hItemDeploy = RegisterHam(Ham_Item_Deploy, "weapon_knife", "fwWeaponKnife", 1); else EnableHamForward(hItemDeploy); if(!hKilled) hKilled = RegisterHam(Ham_Killed, "player", "fwKilled", 1); else EnableHamForward(hKilled); if(!fmTouch) fmTouch = register_forward(FM_Touch, "fwTouch"); if(!fmPlayerPreThink) fmPlayerPreThink = register_forward(FM_PlayerPreThink, "fwPlayerPreThink"); } else { if(hSpawn) DisableHamForward(hSpawn); if(hItemDeploy) DisableHamForward(hItemDeploy); if(hKilled) DisableHamForward(hKilled); if(fmTouch) { unregister_forward(FM_Touch, fmTouch); fmTouch = 0; } if(fmPlayerPreThink) { unregister_forward(FM_PlayerPreThink, fmPlayerPreThink); fmPlayerPreThink = 0; } } } public fwKilled(id, attacker, shouldgib) { if(!is_user_connected(id) || !is_user_connected(attacker)) return HAM_IGNORED; if(get_user_team(id) != 2 || get_user_team(attacker) != 1) return HAM_IGNORED; jail_set_prisoner_free(attacker, false, true); client_print(attacker, 3, "[ZOMBI] Dostaniesz FreeDay'a w nastepnej rundzie!"); return HAM_IGNORED; } new Float:g_wallorigin[33][3]; public fwTouch(id, world) { if(!is_user_alive(id) || get_user_team(id) != 1) return; new classname[32]; pev(world, pev_classname, classname, 31); if(equal(classname, "worldspawn") || equal(classname, "func_wall") || equal(classname, "func_breakable")) pev(id, pev_origin, g_wallorigin[id]); } public fwPlayerPreThink(id) { if(!is_user_alive(id) || get_user_team(id) != 1) return; static button; static flags; button = get_user_button(id); flags = get_entity_flags(id); if(button & IN_DUCK && flags & FL_ONGROUND) { static Float:velocity[3]; VelocityByAim(id, 800, velocity); velocity[2] = 210.0; set_pev(id, pev_velocity, velocity); } if(button & IN_USE) { static Float:origin[3]; pev(id, pev_origin, origin); if(get_distance_f(origin, g_wallorigin[id]) > 25.0) return; if(flags & FL_ONGROUND) return; if(button & IN_FORWARD) { static Float:velocity[3]; velocity_by_aim(id, 240, velocity); set_pev(id, pev_velocity, velocity); } else if(button & IN_BACK) { static Float:velocity[3]; velocity_by_aim(id, -240, velocity); set_pev(id, pev_velocity, velocity); } } } public fwWeaponKnife(ent) { new id = pev(ent, pev_owner); //pev_owner daje opóźnienie i można tego użyć if(get_user_team(id) == 1) set_pev(id, pev_viewmodel2, "models/jb_cypis/v_zombi.mdl"); } public fwSpawn(id) { if(!is_user_alive(id) || get_user_team(id) != 1) return; UstawZombi(id); } UstawZombi(id) { CreateFOV(id); jail_set_user_speed(id, 200.0); set_user_health(id, 1000); cs_set_user_nvg(id, 1); cs_set_player_model(id, "zombi_cypis"); if(get_user_weapon(id) == CSW_KNIFE) set_pev(id, pev_viewmodel2, "models/jb_cypis/v_zombi.mdl"); } stock CreateFOV(const index = 0, const number = 170) { static msgFOV; if(msgFOV || (msgFOV = get_user_msgid("SetFOV"))) { message_begin(index? MSG_ONE_UNRELIABLE: MSG_BROADCAST, msgFOV, .player = index); write_byte(number); message_end(); } } stock CreateFog( const index = 0, const red = 127, const green = 127, const blue = 127, const Float:density_f = 0.001, bool:clear = false ) { static msgFog; if(msgFog || (msgFog = get_user_msgid("Fog"))) { new density = _:floatclamp(density_f, 0.0001, 0.25) * _:!clear; message_begin(index? MSG_ONE_UNRELIABLE: MSG_BROADCAST, msgFog, .player = index); write_byte(clamp(red, 0, 255)); write_byte(clamp(green, 0, 255)); write_byte(clamp(blue, 0, 255)); write_long(_:density); message_end(); } } ////////zombi////////
Dodanych wklejek: 4031
Powered By (Pav32) Pastebin © 2011