hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.03.28. 21:53



Jelenlévő felhasználók

Jelenleg 208 felhasználó van jelen :: 1 regisztrált, 1 rejtett és 206 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot] az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 6 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Admin Zombi
HozzászólásElküldve: 2014.06.14. 11:43 
Offline
Beavatott

Csatlakozott: 2014.04.29. 14:15
Hozzászólások: 68
Megköszönt másnak: 18 alkalommal
Sziasztok Ezt a zombi fajt megcsinálná nekem valaki, hogy csak Admin Kick Joggal tudjon használni:

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4. #include <fakemeta>
  5. #if defined _zombieplague_included
  6. #endinput
  7. #endif
  8. #define _zombieplague_included
  9.  
  10. #define ZP_TEAM_ZOMBIE (1<<0)
  11. #define ZP_TEAM_HUMAN (1<<1)
  12. #define ZP_TEAM_NEMESIS (1<<2)
  13. #define ZP_TEAM_SURVIVOR (1<<3)
  14.  
  15. enum
  16. {
  17. MODE_INFECTION = 1,
  18. MODE_NEMESIS,
  19. MODE_SURVIVOR,
  20. MODE_SWARM,
  21. MODE_MULTI,
  22. MODE_PLAGUE
  23. }
  24.  
  25. enum
  26. {
  27. WIN_NO_ONE = 0,
  28. WIN_ZOMBIES,
  29. WIN_HUMANS
  30. }
  31.  
  32. #define ZP_PLUGIN_HANDLED 97
  33.  
  34. native zp_get_user_zombie(id)
  35. native zp_get_user_nemesis(id)
  36. native zp_get_user_survivor(id)
  37. native zp_get_user_first_zombie(id)
  38. native zp_get_user_last_zombie(id)
  39. native zp_get_user_last_human(id)
  40. native zp_get_user_zombie_class(id)
  41. native zp_get_user_next_class(id)
  42. native zp_set_user_zombie_class(id, classid)
  43. native zp_get_user_ammo_packs(id)
  44. native zp_set_user_ammo_packs(id, amount)
  45. native zp_get_zombie_maxhealth(id)
  46. native zp_get_user_batteries(id)
  47. native zp_set_user_batteries(id, charge)
  48. native zp_get_user_nightvision(id)
  49. native zp_set_user_nightvision(id, set)
  50. native zp_infect_user(id, infector = 0, silent = 0, rewards = 0)
  51. native zp_disinfect_user(id, silent = 0)
  52. native zp_make_user_nemesis(id)
  53. native zp_make_user_survivor(id)
  54. native zp_respawn_user(id, team)
  55. native zp_force_buy_extra_item(id, itemid, ignorecost = 0)
  56. native zp_override_user_model(id, const newmodel[], modelindex = 0)
  57. native zp_has_round_started()
  58. native zp_is_nemesis_round()
  59. native zp_is_survivor_round()
  60. native zp_is_swarm_round()
  61. native zp_is_plague_round()
  62. native zp_get_zombie_count()
  63. native zp_get_human_count()
  64. native zp_get_nemesis_count()
  65. native zp_get_survivor_count()
  66. native zp_register_extra_item(const name[], cost, teams)
  67. native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback)
  68. native zp_get_extra_item_id(const name[])
  69. native zp_get_zombie_class_id(const name[])
  70. native zp_get_zombie_class_info(classid, info[], len)
  71. forward zp_round_started(gamemode, id)
  72. forward zp_round_ended(winteam)
  73. forward zp_user_infected_pre(id, infector, nemesis)
  74. forward zp_user_infected_post(id, infector, nemesis)
  75. forward zp_user_humanized_pre(id, survivor)
  76. forward zp_user_humanized_post(id, survivor)
  77. forward zp_user_infect_attempt(id, infector, nemesis)
  78. forward zp_user_humanize_attempt(id, survivor)
  79. forward zp_extra_item_selected(id, itemid)
  80. forward zp_user_unfrozen(id)
  81. forward zp_user_last_zombie(id)
  82. forward zp_user_last_human(id)
  83.  
  84. #define ZP_TEAM_ANY 0
  85. #define ZP_TEAM_NO_ONE 0
  86.  
  87. #include <hamsandwich>
  88.  
  89. #define PLUGIN "[ZP] Class Predator"
  90. #define VERSION "1.0"
  91. #define AUTHOR "TEo"
  92. //Magyarositotta: Ginaa
  93.  
  94. //Some vars
  95. new g_zclass_Predator, g_maxplayers, g_status
  96. new g_sndInv[] = "predator/predator.wav"
  97. new cvar_ability_time, cvar_invamount, cvar_speed, cvar_infect_hp, cvar_cooldown, cvar_gravity, cvar_icon, cvar_dmg_multi
  98. new Float:g_last[33]
  99. new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
  100. new g_icon[33][16]
  101. new bool: g_ability[33], bool: g_bind[33] = false, bool: g_use[33]
  102.  
  103. //Predator Atributes
  104. new const zclass_name[] = { "Predator" }
  105. new const zclass_info[] = { "Invisible + dmg" }
  106. new const zclass_model[] = { "Predator" }
  107. new const zclass_clawmodel[] = { "v_Predator.mdl" }
  108. const zclass_health = 1600
  109. const zclass_speed = 190
  110. const Float:zclass_gravity = 1.0
  111. const Float:zclass_knockback = 1.0
  112.  
  113. public plugin_init()
  114. {
  115.  
  116. cvar_dmg_multi = register_cvar("zp_predator_dmg_multi", "3")
  117. cvar_ability_time = register_cvar("zp_Predator_ability_long", "10")
  118. cvar_invamount = register_cvar("zp_Predator_visible_amount", "0")
  119. cvar_speed = register_cvar("zp_Predator_max_speed", "400")
  120. cvar_infect_hp = register_cvar("zp_Predator_infect_hp", "300")
  121. cvar_cooldown = register_cvar("zp_Predator_cooldown", "30")
  122. cvar_gravity = register_cvar("zp_Predator_gravity", "700")
  123. cvar_icon = register_cvar("zp_Predator_icon", "1")
  124.  
  125. register_clcmd("ability","ability", ADMIN_ALL, "bind ^"key^" ^"ability^"")
  126. register_forward(FM_PlayerPreThink, "fw_ppt")
  127. register_event("HLTV", "newround", "a", "1=0", "2=0")
  128. register_event("DeathMsg", "death", "a")
  129. register_menucmd(register_menuid("Do you want to bind P ability?"), keys, "bind_p")
  130. RegisterHam( Ham_TakeDamage, "player", "fw_TakeDamage" )
  131.  
  132. g_status = get_user_msgid("StatusIcon")
  133. }
  134.  
  135. public plugin_precache()
  136. {
  137. register_plugin(PLUGIN, VERSION, AUTHOR)
  138. g_zclass_Predator = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
  139. precache_sound(g_sndInv)
  140. }
  141.  
  142. public zp_user_infected_post(id, infector)
  143. {
  144. if (zp_get_user_zombie_class(infector) == g_zclass_Predator)
  145. {
  146. set_pev(infector, pev_health, float(pev(infector, pev_health) + get_pcvar_num(cvar_infect_hp)))
  147. set_hudmessage(255, 0, 0, -1.0, 0.45, 0, 0.0, 3.0, 0.01, 0.01, -1)
  148. show_hudmessage(infector, "+%i HP!", get_pcvar_num(cvar_infect_hp))
  149. }
  150.  
  151. if (zp_get_user_zombie_class(id) == g_zclass_Predator)
  152. {
  153. g_ability[id] = false
  154. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
  155. set_user_maxspeed(id, float(zclass_speed))
  156. set_user_gravity(id, zclass_gravity)
  157.  
  158. if (!g_bind[id])
  159. {
  160. new menu[192]
  161. format(menu, 191, "Szeretned ha bebindelnenk a kepesseget a P-beture?^n^n1. Igen^n2. Nem^n3. Az E-betuvel szeretnem hasznalni")
  162. show_menu(id, keys, menu)
  163. }
  164. }
  165. }
  166.  
  167. public zp_user_humanized_post(id)
  168. if(zp_get_user_zombie_class(id) == g_zclass_Predator)
  169. ability_end(id)
  170.  
  171. public bind_p(id, keys)
  172. {
  173. g_bind[id] = true
  174. switch(keys)
  175. {
  176. case 0:
  177. client_cmd(id, "bind p ability")
  178.  
  179. case 1:
  180. client_print(id, print_chat, "[ZP] A teljes lathatatlansaghoz ird a consolba: bind ^'^'gomb^'^' ^'^'ability^'^'. Es utana nyomd meg a kivalasztott gombot!")
  181.  
  182. case 2:
  183. g_use[id] = true
  184.  
  185. default:
  186. g_bind[id] = false
  187. }
  188.  
  189. return PLUGIN_HANDLED
  190. }
  191.  
  192. public ability(id)
  193. {
  194. if (zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_Predator))
  195. {
  196. if(g_ability[id])
  197. {
  198. client_print(id, print_chat, "[ZP] Te mar igyis lathatatlan vagy!!")
  199. return PLUGIN_HANDLED
  200. }
  201.  
  202. if(!is_user_alive(id))
  203. {
  204. client_print(id, print_chat, "[ZP] Halott vagy.Halottak nem tudjak hasznalni a kepesseget.")
  205. return PLUGIN_HANDLED
  206. }
  207.  
  208. static Float: i
  209. i = get_pcvar_float(cvar_cooldown)
  210.  
  211. if (get_gametime() - g_last[id] < i) {
  212. client_print(id, print_chat, "[ZP] Varj %.f0 masodpercet hogy hasznalhasd a kepesseget!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_last[id]))
  213. return PLUGIN_HANDLED
  214. } else {
  215. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(cvar_invamount))
  216. set_user_maxspeed(id, get_pcvar_float(cvar_speed))
  217. set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800)
  218. emit_sound(id, CHAN_BODY, g_sndInv, 1.0, ATTN_NORM, 0, PITCH_HIGH)
  219. set_hudmessage(200, 100, 0, -1.0, 0.85, 0, 0.0, 3.0, 0.01, 0.01, -1)
  220. show_hudmessage(id, "You are now invisible. Time to hunt!")
  221. set_task(get_pcvar_float(cvar_ability_time), "ability_end", id)
  222. if(get_pcvar_num(cvar_icon) == 1)
  223. set_icon(id)
  224. g_ability[id] = true
  225. }
  226. }
  227. return PLUGIN_CONTINUE
  228. }
  229.  
  230. public ability_end(id)
  231. {
  232. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
  233. set_user_maxspeed(id, float(zclass_speed))
  234. set_user_gravity(id, zclass_gravity)
  235.  
  236. if (get_pcvar_num(cvar_cooldown) > 0)
  237. client_print(id, print_chat, "[ZP] Varj %i masodpercet,hogy ujra hasznald a kepesseget .", get_pcvar_num(cvar_cooldown))
  238.  
  239. if(get_pcvar_num(cvar_icon) == 1)
  240. delete_icon(id)
  241.  
  242. g_last[id] = get_gametime()
  243. g_ability[id] = false
  244. }
  245.  
  246. public fw_ppt(id)
  247. {
  248. if (!is_user_alive(id) || !zp_get_user_zombie(id))
  249. return FMRES_IGNORED
  250.  
  251. if (g_use[id])
  252. {
  253. static button, oldbutton
  254. button = get_user_button(id)
  255. oldbutton = get_user_oldbutton(id)
  256.  
  257. if (!(button & IN_USE) && (oldbutton & IN_USE))
  258. ability(id)
  259. }
  260.  
  261. if (g_ability[id] && (zp_get_user_zombie_class(id) == g_zclass_Predator) && zp_get_user_zombie(id))
  262. {
  263. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(cvar_invamount))
  264. set_user_maxspeed(id, get_pcvar_float(cvar_speed))
  265. set_pev(id, pev_flTimeStepSound, 999)
  266. set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800)
  267. }
  268.  
  269. return PLUGIN_CONTINUE
  270. }
  271.  
  272. public newround()
  273. {
  274. g_maxplayers = get_maxplayers()
  275.  
  276. for (new id = 1; id <= g_maxplayers; id++)
  277. {
  278. g_last[id] = get_gametime()
  279. g_ability[id] = false
  280. }
  281. }
  282.  
  283. public fw_TakeDamage( victim, inflictor, attacker, Float:damage, damagebits )
  284. {
  285. if ((zp_get_user_zombie_class(attacker) == g_zclass_Predator) && (get_user_weapon(attacker) == CSW_KNIFE))
  286. {
  287. SetHamParamFloat( 4, damage * get_pcvar_float(cvar_dmg_multi) )
  288. }
  289. }
  290.  
  291. public death()
  292. {
  293. new id = read_data(2)
  294. ability_end(id)
  295. return PLUGIN_HANDLED
  296. }
  297.  
  298. public set_icon(id)
  299. {
  300. static color[3], sprite[16]
  301. color = {250, 250, 250}
  302. sprite = "dmg_gas"
  303. g_icon[id] = sprite
  304.  
  305. message_begin(MSG_ONE, g_status, {0, 0, 0}, id)
  306. write_byte(1)
  307. write_string(g_icon[id])
  308. write_byte(color[0])
  309. write_byte(color[1])
  310. write_byte(color[2])
  311. message_end()
  312. }
  313.  
  314. public delete_icon(id)
  315. {
  316. message_begin(MSG_ONE, g_status, {0, 0, 0}, id)
  317. write_byte(0)
  318. write_string(g_icon[id])
  319. message_end()
  320. }
  321.  
  322. stock get_user_button(id)
  323. return pev(id, pev_button)
  324.  
  325. stock get_user_oldbutton(id)
  326. return pev(id, pev_oldbuttons)
  327. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  328. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
  329. */
  330.  
id, survivor


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Admin Zombi
HozzászólásElküldve: 2014.06.14. 12:02 
Offline
Senior Tag
Avatar

Csatlakozott: 2013.11.20. 15:40
Hozzászólások: 259
Megköszönt másnak: 7 alkalommal
Megköszönték neki: 25 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4. #include <fakemeta>
  5. #if defined _zombieplague_included
  6. #endinput
  7. #endif
  8. #define _zombieplague_included
  9.  
  10. #define ZP_TEAM_ZOMBIE (1<<0)
  11. #define ZP_TEAM_HUMAN (1<<1)
  12. #define ZP_TEAM_NEMESIS (1<<2)
  13. #define ZP_TEAM_SURVIVOR (1<<3)
  14.  
  15. enum
  16. {
  17. MODE_INFECTION = 1,
  18. MODE_NEMESIS,
  19. MODE_SURVIVOR,
  20. MODE_SWARM,
  21. MODE_MULTI,
  22. MODE_PLAGUE
  23. }
  24.  
  25. enum
  26. {
  27. WIN_NO_ONE = 0,
  28. WIN_ZOMBIES,
  29. WIN_HUMANS
  30. }
  31.  
  32. #define ZP_PLUGIN_HANDLED 97
  33.  
  34. native zp_get_user_zombie(id)
  35. native zp_get_user_nemesis(id)
  36. native zp_get_user_survivor(id)
  37. native zp_get_user_first_zombie(id)
  38. native zp_get_user_last_zombie(id)
  39. native zp_get_user_last_human(id)
  40. native zp_get_user_zombie_class(id)
  41. native zp_get_user_next_class(id)
  42. native zp_set_user_zombie_class(id, classid)
  43. native zp_get_user_ammo_packs(id)
  44. native zp_set_user_ammo_packs(id, amount)
  45. native zp_get_zombie_maxhealth(id)
  46. native zp_get_user_batteries(id)
  47. native zp_set_user_batteries(id, charge)
  48. native zp_get_user_nightvision(id)
  49. native zp_set_user_nightvision(id, set)
  50. native zp_infect_user(id, infector = 0, silent = 0, rewards = 0)
  51. native zp_disinfect_user(id, silent = 0)
  52. native zp_make_user_nemesis(id)
  53. native zp_make_user_survivor(id)
  54. native zp_respawn_user(id, team)
  55. native zp_force_buy_extra_item(id, itemid, ignorecost = 0)
  56. native zp_override_user_model(id, const newmodel[], modelindex = 0)
  57. native zp_has_round_started()
  58. native zp_is_nemesis_round()
  59. native zp_is_survivor_round()
  60. native zp_is_swarm_round()
  61. native zp_is_plague_round()
  62. native zp_get_zombie_count()
  63. native zp_get_human_count()
  64. native zp_get_nemesis_count()
  65. native zp_get_survivor_count()
  66. native zp_register_extra_item(const name[], cost, teams)
  67. native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback)
  68. native zp_get_extra_item_id(const name[])
  69. native zp_get_zombie_class_id(const name[])
  70. native zp_get_zombie_class_info(classid, info[], len)
  71. forward zp_round_started(gamemode, id)
  72. forward zp_round_ended(winteam)
  73. forward zp_user_infected_pre(id, infector, nemesis)
  74. forward zp_user_infected_post(id, infector, nemesis)
  75. forward zp_user_humanized_pre(id, survivor)
  76. forward zp_user_humanized_post(id, survivor)
  77. forward zp_user_infect_attempt(id, infector, nemesis)
  78. forward zp_user_humanize_attempt(id, survivor)
  79. forward zp_extra_item_selected(id, itemid)
  80. forward zp_user_unfrozen(id)
  81. forward zp_user_last_zombie(id)
  82. forward zp_user_last_human(id)
  83.  
  84. #define ZP_TEAM_ANY 0
  85. #define ZP_TEAM_NO_ONE 0
  86.  
  87. #include <hamsandwich>
  88.  
  89. #define PLUGIN "[ZP] Class Predator"
  90. #define VERSION "1.0"
  91. #define AUTHOR "TEo"
  92. //Magyarositotta: Ginaa
  93.  
  94. //Some vars
  95. new g_zclass_Predator, g_maxplayers, g_status
  96. new g_sndInv[] = "predator/predator.wav"
  97. new cvar_ability_time, cvar_invamount, cvar_speed, cvar_infect_hp, cvar_cooldown, cvar_gravity, cvar_icon, cvar_dmg_multi
  98. new Float:g_last[33]
  99. new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
  100. new g_icon[33][16]
  101. new bool: g_ability[33], bool: g_bind[33] = false, bool: g_use[33]
  102.  
  103. //Predator Atributes
  104. new const zclass_name[] = { "Predator" }
  105. new const zclass_info[] = { "Invisible + dmg" }
  106. new const zclass_model[] = { "Predator" }
  107. new const zclass_clawmodel[] = { "v_Predator.mdl" }
  108. const zclass_health = 1600
  109. const zclass_speed = 190
  110. const Float:zclass_gravity = 1.0
  111. const Float:zclass_knockback = 1.0
  112.  
  113. public plugin_init()
  114. {
  115.  
  116. cvar_dmg_multi = register_cvar("zp_predator_dmg_multi", "3")
  117. cvar_ability_time = register_cvar("zp_Predator_ability_long", "10")
  118. cvar_invamount = register_cvar("zp_Predator_visible_amount", "0")
  119. cvar_speed = register_cvar("zp_Predator_max_speed", "400")
  120. cvar_infect_hp = register_cvar("zp_Predator_infect_hp", "300")
  121. cvar_cooldown = register_cvar("zp_Predator_cooldown", "30")
  122. cvar_gravity = register_cvar("zp_Predator_gravity", "700")
  123. cvar_icon = register_cvar("zp_Predator_icon", "1")
  124.  
  125. register_clcmd("ability","ability", ADMIN_KICK, "bind ^"key^" ^"ability^"")
  126. register_forward(FM_PlayerPreThink, "fw_ppt")
  127. register_event("HLTV", "newround", "a", "1=0", "2=0")
  128. register_event("DeathMsg", "death", "a")
  129. register_menucmd(register_menuid("Do you want to bind P ability?"), keys, "bind_p")
  130. RegisterHam( Ham_TakeDamage, "player", "fw_TakeDamage" )
  131.  
  132. g_status = get_user_msgid("StatusIcon")
  133. }
  134.  
  135. public plugin_precache()
  136. {
  137. register_plugin(PLUGIN, VERSION, AUTHOR)
  138. g_zclass_Predator = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
  139. precache_sound(g_sndInv)
  140. }
  141.  
  142. public zp_user_infected_post(id, infector)
  143. {
  144. if (zp_get_user_zombie_class(infector) == g_zclass_Predator)
  145. {
  146. set_pev(infector, pev_health, float(pev(infector, pev_health) + get_pcvar_num(cvar_infect_hp)))
  147. set_hudmessage(255, 0, 0, -1.0, 0.45, 0, 0.0, 3.0, 0.01, 0.01, -1)
  148. show_hudmessage(infector, "+%i HP!", get_pcvar_num(cvar_infect_hp))
  149. }
  150.  
  151. if (zp_get_user_zombie_class(id) == g_zclass_Predator)
  152. {
  153. g_ability[id] = false
  154. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
  155. set_user_maxspeed(id, float(zclass_speed))
  156. set_user_gravity(id, zclass_gravity)
  157.  
  158. if (!g_bind[id])
  159. {
  160. new menu[192]
  161. format(menu, 191, "Szeretned ha bebindelnenk a kepesseget a P-beture?^n^n1. Igen^n2. Nem^n3. Az E-betuvel szeretnem hasznalni")
  162. show_menu(id, keys, menu)
  163. }
  164. }
  165. }
  166.  
  167. public zp_user_humanized_post(id)
  168. if(zp_get_user_zombie_class(id) == g_zclass_Predator)
  169. ability_end(id)
  170.  
  171. public bind_p(id, keys)
  172. {
  173. g_bind[id] = true
  174. switch(keys)
  175. {
  176. case 0:
  177. client_cmd(id, "bind p ability")
  178.  
  179. case 1:
  180. client_print(id, print_chat, "[ZP] A teljes lathatatlansaghoz ird a consolba: bind ^'^'gomb^'^' ^'^'ability^'^'. Es utana nyomd meg a kivalasztott gombot!")
  181.  
  182. case 2:
  183. g_use[id] = true
  184.  
  185. default:
  186. g_bind[id] = false
  187. }
  188.  
  189. return PLUGIN_HANDLED
  190. }
  191.  
  192. public ability(id)
  193. {
  194. if (zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_Predator))
  195. {
  196. if(g_ability[id])
  197. {
  198. client_print(id, print_chat, "[ZP] Te mar igyis lathatatlan vagy!!")
  199. return PLUGIN_HANDLED
  200. }
  201.  
  202. if(!is_user_alive(id))
  203. {
  204. client_print(id, print_chat, "[ZP] Halott vagy.Halottak nem tudjak hasznalni a kepesseget.")
  205. return PLUGIN_HANDLED
  206. }
  207.  
  208. static Float: i
  209. i = get_pcvar_float(cvar_cooldown)
  210.  
  211. if (get_gametime() - g_last[id] < i) {
  212. client_print(id, print_chat, "[ZP] Varj %.f0 masodpercet hogy hasznalhasd a kepesseget!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_last[id]))
  213. return PLUGIN_HANDLED
  214. } else {
  215. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(cvar_invamount))
  216. set_user_maxspeed(id, get_pcvar_float(cvar_speed))
  217. set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800)
  218. emit_sound(id, CHAN_BODY, g_sndInv, 1.0, ATTN_NORM, 0, PITCH_HIGH)
  219. set_hudmessage(200, 100, 0, -1.0, 0.85, 0, 0.0, 3.0, 0.01, 0.01, -1)
  220. show_hudmessage(id, "You are now invisible. Time to hunt!")
  221. set_task(get_pcvar_float(cvar_ability_time), "ability_end", id)
  222. if(get_pcvar_num(cvar_icon) == 1)
  223. set_icon(id)
  224. g_ability[id] = true
  225. }
  226. }
  227. return PLUGIN_CONTINUE
  228. }
  229.  
  230. public ability_end(id)
  231. {
  232. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
  233. set_user_maxspeed(id, float(zclass_speed))
  234. set_user_gravity(id, zclass_gravity)
  235.  
  236. if (get_pcvar_num(cvar_cooldown) > 0)
  237. client_print(id, print_chat, "[ZP] Varj %i masodpercet,hogy ujra hasznald a kepesseget .", get_pcvar_num(cvar_cooldown))
  238.  
  239. if(get_pcvar_num(cvar_icon) == 1)
  240. delete_icon(id)
  241.  
  242. g_last[id] = get_gametime()
  243. g_ability[id] = false
  244. }
  245.  
  246. public fw_ppt(id)
  247. {
  248. if (!is_user_alive(id) || !zp_get_user_zombie(id))
  249. return FMRES_IGNORED
  250.  
  251. if (g_use[id])
  252. {
  253. static button, oldbutton
  254. button = get_user_button(id)
  255. oldbutton = get_user_oldbutton(id)
  256.  
  257. if (!(button & IN_USE) && (oldbutton & IN_USE))
  258. ability(id)
  259. }
  260.  
  261. if (g_ability[id] && (zp_get_user_zombie_class(id) == g_zclass_Predator) && zp_get_user_zombie(id))
  262. {
  263. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(cvar_invamount))
  264. set_user_maxspeed(id, get_pcvar_float(cvar_speed))
  265. set_pev(id, pev_flTimeStepSound, 999)
  266. set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800)
  267. }
  268.  
  269. return PLUGIN_CONTINUE
  270. }
  271.  
  272. public newround()
  273. {
  274. g_maxplayers = get_maxplayers()
  275.  
  276. for (new id = 1; id <= g_maxplayers; id++)
  277. {
  278. g_last[id] = get_gametime()
  279. g_ability[id] = false
  280. }
  281. }
  282.  
  283. public fw_TakeDamage( victim, inflictor, attacker, Float:damage, damagebits )
  284. {
  285. if ((zp_get_user_zombie_class(attacker) == g_zclass_Predator) && (get_user_weapon(attacker) == CSW_KNIFE))
  286. {
  287. SetHamParamFloat( 4, damage * get_pcvar_float(cvar_dmg_multi) )
  288. }
  289. }
  290.  
  291. public death()
  292. {
  293. new id = read_data(2)
  294. ability_end(id)
  295. return PLUGIN_HANDLED
  296. }
  297.  
  298. public set_icon(id)
  299. {
  300. static color[3], sprite[16]
  301. color = {250, 250, 250}
  302. sprite = "dmg_gas"
  303. g_icon[id] = sprite
  304.  
  305. message_begin(MSG_ONE, g_status, {0, 0, 0}, id)
  306. write_byte(1)
  307. write_string(g_icon[id])
  308. write_byte(color[0])
  309. write_byte(color[1])
  310. write_byte(color[2])
  311. message_end()
  312. }
  313.  
  314. public delete_icon(id)
  315. {
  316. message_begin(MSG_ONE, g_status, {0, 0, 0}, id)
  317. write_byte(0)
  318. write_string(g_icon[id])
  319. message_end()
  320. }
  321.  
  322. stock get_user_button(id)
  323. return pev(id, pev_button)
  324.  
  325. stock get_user_oldbutton(id)
  326. return pev(id, pev_oldbuttons)
  327. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  328. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
  329. */

_________________
rwT* Szerverek!

Különleges játékélmény különleges szerverektől.
Bővebb információkért nézz az alábbi tartalmak után.

( FaceBook ) ( YouTube ) ( Web ) ( GameTracker )

Ők köszönték meg MISU1998 nek ezt a hozzászólást: andrisgaming (2014.06.14. 16:56)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Admin Zombi
HozzászólásElküldve: 2014.06.14. 12:33 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2011.09.18. 13:01
Hozzászólások: 4270
Megköszönt másnak: 55 alkalommal
Megköszönték neki: 513 alkalommal
MISU1998 írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4. #include <fakemeta>
  5. #if defined _zombieplague_included
  6. #endinput
  7. #endif
  8. #define _zombieplague_included
  9.  
  10. #define ZP_TEAM_ZOMBIE (1<<0)
  11. #define ZP_TEAM_HUMAN (1<<1)
  12. #define ZP_TEAM_NEMESIS (1<<2)
  13. #define ZP_TEAM_SURVIVOR (1<<3)
  14.  
  15. enum
  16. {
  17. MODE_INFECTION = 1,
  18. MODE_NEMESIS,
  19. MODE_SURVIVOR,
  20. MODE_SWARM,
  21. MODE_MULTI,
  22. MODE_PLAGUE
  23. }
  24.  
  25. enum
  26. {
  27. WIN_NO_ONE = 0,
  28. WIN_ZOMBIES,
  29. WIN_HUMANS
  30. }
  31.  
  32. #define ZP_PLUGIN_HANDLED 97
  33.  
  34. native zp_get_user_zombie(id)
  35. native zp_get_user_nemesis(id)
  36. native zp_get_user_survivor(id)
  37. native zp_get_user_first_zombie(id)
  38. native zp_get_user_last_zombie(id)
  39. native zp_get_user_last_human(id)
  40. native zp_get_user_zombie_class(id)
  41. native zp_get_user_next_class(id)
  42. native zp_set_user_zombie_class(id, classid)
  43. native zp_get_user_ammo_packs(id)
  44. native zp_set_user_ammo_packs(id, amount)
  45. native zp_get_zombie_maxhealth(id)
  46. native zp_get_user_batteries(id)
  47. native zp_set_user_batteries(id, charge)
  48. native zp_get_user_nightvision(id)
  49. native zp_set_user_nightvision(id, set)
  50. native zp_infect_user(id, infector = 0, silent = 0, rewards = 0)
  51. native zp_disinfect_user(id, silent = 0)
  52. native zp_make_user_nemesis(id)
  53. native zp_make_user_survivor(id)
  54. native zp_respawn_user(id, team)
  55. native zp_force_buy_extra_item(id, itemid, ignorecost = 0)
  56. native zp_override_user_model(id, const newmodel[], modelindex = 0)
  57. native zp_has_round_started()
  58. native zp_is_nemesis_round()
  59. native zp_is_survivor_round()
  60. native zp_is_swarm_round()
  61. native zp_is_plague_round()
  62. native zp_get_zombie_count()
  63. native zp_get_human_count()
  64. native zp_get_nemesis_count()
  65. native zp_get_survivor_count()
  66. native zp_register_extra_item(const name[], cost, teams)
  67. native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback)
  68. native zp_get_extra_item_id(const name[])
  69. native zp_get_zombie_class_id(const name[])
  70. native zp_get_zombie_class_info(classid, info[], len)
  71. forward zp_round_started(gamemode, id)
  72. forward zp_round_ended(winteam)
  73. forward zp_user_infected_pre(id, infector, nemesis)
  74. forward zp_user_infected_post(id, infector, nemesis)
  75. forward zp_user_humanized_pre(id, survivor)
  76. forward zp_user_humanized_post(id, survivor)
  77. forward zp_user_infect_attempt(id, infector, nemesis)
  78. forward zp_user_humanize_attempt(id, survivor)
  79. forward zp_extra_item_selected(id, itemid)
  80. forward zp_user_unfrozen(id)
  81. forward zp_user_last_zombie(id)
  82. forward zp_user_last_human(id)
  83.  
  84. #define ZP_TEAM_ANY 0
  85. #define ZP_TEAM_NO_ONE 0
  86.  
  87. #include <hamsandwich>
  88.  
  89. #define PLUGIN "[ZP] Class Predator"
  90. #define VERSION "1.0"
  91. #define AUTHOR "TEo"
  92. //Magyarositotta: Ginaa
  93.  
  94. //Some vars
  95. new g_zclass_Predator, g_maxplayers, g_status
  96. new g_sndInv[] = "predator/predator.wav"
  97. new cvar_ability_time, cvar_invamount, cvar_speed, cvar_infect_hp, cvar_cooldown, cvar_gravity, cvar_icon, cvar_dmg_multi
  98. new Float:g_last[33]
  99. new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
  100. new g_icon[33][16]
  101. new bool: g_ability[33], bool: g_bind[33] = false, bool: g_use[33]
  102.  
  103. //Predator Atributes
  104. new const zclass_name[] = { "Predator" }
  105. new const zclass_info[] = { "Invisible + dmg" }
  106. new const zclass_model[] = { "Predator" }
  107. new const zclass_clawmodel[] = { "v_Predator.mdl" }
  108. const zclass_health = 1600
  109. const zclass_speed = 190
  110. const Float:zclass_gravity = 1.0
  111. const Float:zclass_knockback = 1.0
  112.  
  113. public plugin_init()
  114. {
  115.  
  116. cvar_dmg_multi = register_cvar("zp_predator_dmg_multi", "3")
  117. cvar_ability_time = register_cvar("zp_Predator_ability_long", "10")
  118. cvar_invamount = register_cvar("zp_Predator_visible_amount", "0")
  119. cvar_speed = register_cvar("zp_Predator_max_speed", "400")
  120. cvar_infect_hp = register_cvar("zp_Predator_infect_hp", "300")
  121. cvar_cooldown = register_cvar("zp_Predator_cooldown", "30")
  122. cvar_gravity = register_cvar("zp_Predator_gravity", "700")
  123. cvar_icon = register_cvar("zp_Predator_icon", "1")
  124.  
  125. register_clcmd("ability","ability", ADMIN_KICK, "bind ^"key^" ^"ability^"")
  126. register_forward(FM_PlayerPreThink, "fw_ppt")
  127. register_event("HLTV", "newround", "a", "1=0", "2=0")
  128. register_event("DeathMsg", "death", "a")
  129. register_menucmd(register_menuid("Do you want to bind P ability?"), keys, "bind_p")
  130. RegisterHam( Ham_TakeDamage, "player", "fw_TakeDamage" )
  131.  
  132. g_status = get_user_msgid("StatusIcon")
  133. }
  134.  
  135. public plugin_precache()
  136. {
  137. register_plugin(PLUGIN, VERSION, AUTHOR)
  138. g_zclass_Predator = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
  139. precache_sound(g_sndInv)
  140. }
  141.  
  142. public zp_user_infected_post(id, infector)
  143. {
  144. if (zp_get_user_zombie_class(infector) == g_zclass_Predator)
  145. {
  146. set_pev(infector, pev_health, float(pev(infector, pev_health) + get_pcvar_num(cvar_infect_hp)))
  147. set_hudmessage(255, 0, 0, -1.0, 0.45, 0, 0.0, 3.0, 0.01, 0.01, -1)
  148. show_hudmessage(infector, "+%i HP!", get_pcvar_num(cvar_infect_hp))
  149. }
  150.  
  151. if (zp_get_user_zombie_class(id) == g_zclass_Predator)
  152. {
  153. g_ability[id] = false
  154. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
  155. set_user_maxspeed(id, float(zclass_speed))
  156. set_user_gravity(id, zclass_gravity)
  157.  
  158. if (!g_bind[id])
  159. {
  160. new menu[192]
  161. format(menu, 191, "Szeretned ha bebindelnenk a kepesseget a P-beture?^n^n1. Igen^n2. Nem^n3. Az E-betuvel szeretnem hasznalni")
  162. show_menu(id, keys, menu)
  163. }
  164. }
  165. }
  166.  
  167. public zp_user_humanized_post(id)
  168. if(zp_get_user_zombie_class(id) == g_zclass_Predator)
  169. ability_end(id)
  170.  
  171. public bind_p(id, keys)
  172. {
  173. g_bind[id] = true
  174. switch(keys)
  175. {
  176. case 0:
  177. client_cmd(id, "bind p ability")
  178.  
  179. case 1:
  180. client_print(id, print_chat, "[ZP] A teljes lathatatlansaghoz ird a consolba: bind ^'^'gomb^'^' ^'^'ability^'^'. Es utana nyomd meg a kivalasztott gombot!")
  181.  
  182. case 2:
  183. g_use[id] = true
  184.  
  185. default:
  186. g_bind[id] = false
  187. }
  188.  
  189. return PLUGIN_HANDLED
  190. }
  191.  
  192. public ability(id)
  193. {
  194. if (zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_Predator))
  195. {
  196. if(g_ability[id])
  197. {
  198. client_print(id, print_chat, "[ZP] Te mar igyis lathatatlan vagy!!")
  199. return PLUGIN_HANDLED
  200. }
  201.  
  202. if(!is_user_alive(id))
  203. {
  204. client_print(id, print_chat, "[ZP] Halott vagy.Halottak nem tudjak hasznalni a kepesseget.")
  205. return PLUGIN_HANDLED
  206. }
  207.  
  208. static Float: i
  209. i = get_pcvar_float(cvar_cooldown)
  210.  
  211. if (get_gametime() - g_last[id] < i) {
  212. client_print(id, print_chat, "[ZP] Varj %.f0 masodpercet hogy hasznalhasd a kepesseget!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_last[id]))
  213. return PLUGIN_HANDLED
  214. } else {
  215. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(cvar_invamount))
  216. set_user_maxspeed(id, get_pcvar_float(cvar_speed))
  217. set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800)
  218. emit_sound(id, CHAN_BODY, g_sndInv, 1.0, ATTN_NORM, 0, PITCH_HIGH)
  219. set_hudmessage(200, 100, 0, -1.0, 0.85, 0, 0.0, 3.0, 0.01, 0.01, -1)
  220. show_hudmessage(id, "You are now invisible. Time to hunt!")
  221. set_task(get_pcvar_float(cvar_ability_time), "ability_end", id)
  222. if(get_pcvar_num(cvar_icon) == 1)
  223. set_icon(id)
  224. g_ability[id] = true
  225. }
  226. }
  227. return PLUGIN_CONTINUE
  228. }
  229.  
  230. public ability_end(id)
  231. {
  232. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
  233. set_user_maxspeed(id, float(zclass_speed))
  234. set_user_gravity(id, zclass_gravity)
  235.  
  236. if (get_pcvar_num(cvar_cooldown) > 0)
  237. client_print(id, print_chat, "[ZP] Varj %i masodpercet,hogy ujra hasznald a kepesseget .", get_pcvar_num(cvar_cooldown))
  238.  
  239. if(get_pcvar_num(cvar_icon) == 1)
  240. delete_icon(id)
  241.  
  242. g_last[id] = get_gametime()
  243. g_ability[id] = false
  244. }
  245.  
  246. public fw_ppt(id)
  247. {
  248. if (!is_user_alive(id) || !zp_get_user_zombie(id))
  249. return FMRES_IGNORED
  250.  
  251. if (g_use[id])
  252. {
  253. static button, oldbutton
  254. button = get_user_button(id)
  255. oldbutton = get_user_oldbutton(id)
  256.  
  257. if (!(button & IN_USE) && (oldbutton & IN_USE))
  258. ability(id)
  259. }
  260.  
  261. if (g_ability[id] && (zp_get_user_zombie_class(id) == g_zclass_Predator) && zp_get_user_zombie(id))
  262. {
  263. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(cvar_invamount))
  264. set_user_maxspeed(id, get_pcvar_float(cvar_speed))
  265. set_pev(id, pev_flTimeStepSound, 999)
  266. set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800)
  267. }
  268.  
  269. return PLUGIN_CONTINUE
  270. }
  271.  
  272. public newround()
  273. {
  274. g_maxplayers = get_maxplayers()
  275.  
  276. for (new id = 1; id <= g_maxplayers; id++)
  277. {
  278. g_last[id] = get_gametime()
  279. g_ability[id] = false
  280. }
  281. }
  282.  
  283. public fw_TakeDamage( victim, inflictor, attacker, Float:damage, damagebits )
  284. {
  285. if ((zp_get_user_zombie_class(attacker) == g_zclass_Predator) && (get_user_weapon(attacker) == CSW_KNIFE))
  286. {
  287. SetHamParamFloat( 4, damage * get_pcvar_float(cvar_dmg_multi) )
  288. }
  289. }
  290.  
  291. public death()
  292. {
  293. new id = read_data(2)
  294. ability_end(id)
  295. return PLUGIN_HANDLED
  296. }
  297.  
  298. public set_icon(id)
  299. {
  300. static color[3], sprite[16]
  301. color = {250, 250, 250}
  302. sprite = "dmg_gas"
  303. g_icon[id] = sprite
  304.  
  305. message_begin(MSG_ONE, g_status, {0, 0, 0}, id)
  306. write_byte(1)
  307. write_string(g_icon[id])
  308. write_byte(color[0])
  309. write_byte(color[1])
  310. write_byte(color[2])
  311. message_end()
  312. }
  313.  
  314. public delete_icon(id)
  315. {
  316. message_begin(MSG_ONE, g_status, {0, 0, 0}, id)
  317. write_byte(0)
  318. write_string(g_icon[id])
  319. message_end()
  320. }
  321.  
  322. stock get_user_button(id)
  323. return pev(id, pev_button)
  324.  
  325. stock get_user_oldbutton(id)
  326. return pev(id, pev_oldbuttons)
  327. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  328. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
  329. */

Itt csak a kepesseg van admin kicken. attol meg tudja hasznalni a zombi fajt.

_________________
Idk. Csak ugy funbooo.
Kép

Ők köszönték meg DeteCT0R nek ezt a hozzászólást: andrisgaming (2014.06.14. 16:57)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Admin Zombi
HozzászólásElküldve: 2014.06.14. 12:43 
Offline
Senior Tag
Avatar

Csatlakozott: 2013.11.20. 15:40
Hozzászólások: 259
Megköszönt másnak: 7 alkalommal
Megköszönték neki: 25 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4. #include <fakemeta>
  5. #if defined _zombieplague_included
  6. #endinput
  7. #endif
  8. #define _zombieplague_included
  9.  
  10. #define ZP_TEAM_ZOMBIE (1<<0)
  11. #define ZP_TEAM_HUMAN (1<<1)
  12. #define ZP_TEAM_NEMESIS (1<<2)
  13. #define ZP_TEAM_SURVIVOR (1<<3)
  14.  
  15. enum
  16. {
  17. MODE_INFECTION = 1,
  18. MODE_NEMESIS,
  19. MODE_SURVIVOR,
  20. MODE_SWARM,
  21. MODE_MULTI,
  22. MODE_PLAGUE
  23. }
  24.  
  25. enum
  26. {
  27. WIN_NO_ONE = 0,
  28. WIN_ZOMBIES,
  29. WIN_HUMANS
  30. }
  31.  
  32. #define ZP_PLUGIN_HANDLED 97
  33.  
  34. native zp_get_user_zombie(id)
  35. native zp_get_user_nemesis(id)
  36. native zp_get_user_survivor(id)
  37. native zp_get_user_first_zombie(id)
  38. native zp_get_user_last_zombie(id)
  39. native zp_get_user_last_human(id)
  40. native zp_get_user_zombie_class(id)
  41. native zp_get_user_next_class(id)
  42. native zp_set_user_zombie_class(id, classid)
  43. native zp_get_user_ammo_packs(id)
  44. native zp_set_user_ammo_packs(id, amount)
  45. native zp_get_zombie_maxhealth(id)
  46. native zp_get_user_batteries(id)
  47. native zp_set_user_batteries(id, charge)
  48. native zp_get_user_nightvision(id)
  49. native zp_set_user_nightvision(id, set)
  50. native zp_infect_user(id, infector = 0, silent = 0, rewards = 0)
  51. native zp_disinfect_user(id, silent = 0)
  52. native zp_make_user_nemesis(id)
  53. native zp_make_user_survivor(id)
  54. native zp_respawn_user(id, team)
  55. native zp_force_buy_extra_item(id, itemid, ignorecost = 0)
  56. native zp_override_user_model(id, const newmodel[], modelindex = 0)
  57. native zp_has_round_started()
  58. native zp_is_nemesis_round()
  59. native zp_is_survivor_round()
  60. native zp_is_swarm_round()
  61. native zp_is_plague_round()
  62. native zp_get_zombie_count()
  63. native zp_get_human_count()
  64. native zp_get_nemesis_count()
  65. native zp_get_survivor_count()
  66. native zp_register_extra_item(const name[], cost, teams)
  67. native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback)
  68. native zp_get_extra_item_id(const name[])
  69. native zp_get_zombie_class_id(const name[])
  70. native zp_get_zombie_class_info(classid, info[], len)
  71. forward zp_round_started(gamemode, id)
  72. forward zp_round_ended(winteam)
  73. forward zp_user_infected_pre(id, infector, nemesis)
  74. forward zp_user_infected_post(id, infector, nemesis)
  75. forward zp_user_humanized_pre(id, survivor)
  76. forward zp_user_humanized_post(id, survivor)
  77. forward zp_user_infect_attempt(id, infector, nemesis)
  78. forward zp_user_humanize_attempt(id, survivor)
  79. forward zp_extra_item_selected(id, itemid)
  80. forward zp_user_unfrozen(id)
  81. forward zp_user_last_zombie(id)
  82. forward zp_user_last_human(id)
  83.  
  84. #define ZP_TEAM_ANY 0
  85. #define ZP_TEAM_NO_ONE 0
  86.  
  87. #include <hamsandwich>
  88.  
  89. #define PLUGIN "[ZP] Class Predator"
  90. #define VERSION "1.0"
  91. #define AUTHOR "TEo"
  92. //Magyarositotta: Ginaa
  93.  
  94. //Some vars
  95. new g_zclass_Predator, g_maxplayers, g_status
  96. new g_sndInv[] = "predator/predator.wav"
  97. new cvar_ability_time, cvar_invamount, cvar_speed, cvar_infect_hp, cvar_cooldown, cvar_gravity, cvar_icon, cvar_dmg_multi
  98. new Float:g_last[33]
  99. new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
  100. new g_icon[33][16]
  101. new bool: g_ability[33], bool: g_bind[33] = false, bool: g_use[33]
  102.  
  103. //Predator Atributes
  104. new const zclass_name[] = { "Predator" }
  105. new const zclass_info[] = { "Invisible + dmg" }
  106. new const zclass_model[] = { "Predator" }
  107. new const zclass_clawmodel[] = { "v_Predator.mdl" }
  108. const zclass_health = 1600
  109. const zclass_speed = 190
  110. const Float:zclass_gravity = 1.0
  111. const Float:zclass_knockback = 1.0
  112. const zclass_adminflags = ADMIN_KICK
  113.  
  114. public plugin_init()
  115. {
  116.  
  117. cvar_dmg_multi = register_cvar("zp_predator_dmg_multi", "3")
  118. cvar_ability_time = register_cvar("zp_Predator_ability_long", "10")
  119. cvar_invamount = register_cvar("zp_Predator_visible_amount", "0")
  120. cvar_speed = register_cvar("zp_Predator_max_speed", "400")
  121. cvar_infect_hp = register_cvar("zp_Predator_infect_hp", "300")
  122. cvar_cooldown = register_cvar("zp_Predator_cooldown", "30")
  123. cvar_gravity = register_cvar("zp_Predator_gravity", "700")
  124. cvar_icon = register_cvar("zp_Predator_icon", "1")
  125.  
  126. register_clcmd("ability","ability", ADMIN_KICK, "bind ^"key^" ^"ability^"")
  127. register_forward(FM_PlayerPreThink, "fw_ppt")
  128. register_event("HLTV", "newround", "a", "1=0", "2=0")
  129. register_event("DeathMsg", "death", "a")
  130. register_menucmd(register_menuid("Do you want to bind P ability?"), keys, "bind_p")
  131. RegisterHam( Ham_TakeDamage, "player", "fw_TakeDamage" )
  132.  
  133. g_status = get_user_msgid("StatusIcon")
  134. }
  135.  
  136. public plugin_precache()
  137. {
  138. register_plugin(PLUGIN, VERSION, AUTHOR)
  139. g_zclass_Predator = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
  140. precache_sound(g_sndInv)
  141. }
  142.  
  143. public zp_user_infected_post(id, infector)
  144. {
  145. if (zp_get_user_zombie_class(infector) == g_zclass_Predator)
  146. {
  147. set_pev(infector, pev_health, float(pev(infector, pev_health) + get_pcvar_num(cvar_infect_hp)))
  148. set_hudmessage(255, 0, 0, -1.0, 0.45, 0, 0.0, 3.0, 0.01, 0.01, -1)
  149. show_hudmessage(infector, "+%i HP!", get_pcvar_num(cvar_infect_hp))
  150. }
  151.  
  152. if (zp_get_user_zombie_class(id) == g_zclass_Predator)
  153. {
  154. g_ability[id] = false
  155. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
  156. set_user_maxspeed(id, float(zclass_speed))
  157. set_user_gravity(id, zclass_gravity)
  158.  
  159. if (!g_bind[id])
  160. {
  161. new menu[192]
  162. format(menu, 191, "Szeretned ha bebindelnenk a kepesseget a P-beture?^n^n1. Igen^n2. Nem^n3. Az E-betuvel szeretnem hasznalni")
  163. show_menu(id, keys, menu)
  164. }
  165. }
  166. }
  167.  
  168. public zp_user_humanized_post(id)
  169. if(zp_get_user_zombie_class(id) == g_zclass_Predator)
  170. ability_end(id)
  171.  
  172. public bind_p(id, keys)
  173. {
  174. g_bind[id] = true
  175. switch(keys)
  176. {
  177. case 0:
  178. client_cmd(id, "bind p ability")
  179.  
  180. case 1:
  181. client_print(id, print_chat, "[ZP] A teljes lathatatlansaghoz ird a consolba: bind ^'^'gomb^'^' ^'^'ability^'^'. Es utana nyomd meg a kivalasztott gombot!")
  182.  
  183. case 2:
  184. g_use[id] = true
  185.  
  186. default:
  187. g_bind[id] = false
  188. }
  189.  
  190. return PLUGIN_HANDLED
  191. }
  192.  
  193. public ability(id)
  194. {
  195. if (zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_Predator))
  196. {
  197. if(g_ability[id])
  198. {
  199. client_print(id, print_chat, "[ZP] Te mar igyis lathatatlan vagy!!")
  200. return PLUGIN_HANDLED
  201. }
  202.  
  203. if(!is_user_alive(id))
  204. {
  205. client_print(id, print_chat, "[ZP] Halott vagy.Halottak nem tudjak hasznalni a kepesseget.")
  206. return PLUGIN_HANDLED
  207. }
  208.  
  209. static Float: i
  210. i = get_pcvar_float(cvar_cooldown)
  211.  
  212. if (get_gametime() - g_last[id] < i) {
  213. client_print(id, print_chat, "[ZP] Varj %.f0 masodpercet hogy hasznalhasd a kepesseget!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_last[id]))
  214. return PLUGIN_HANDLED
  215. } else {
  216. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(cvar_invamount))
  217. set_user_maxspeed(id, get_pcvar_float(cvar_speed))
  218. set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800)
  219. emit_sound(id, CHAN_BODY, g_sndInv, 1.0, ATTN_NORM, 0, PITCH_HIGH)
  220. set_hudmessage(200, 100, 0, -1.0, 0.85, 0, 0.0, 3.0, 0.01, 0.01, -1)
  221. show_hudmessage(id, "You are now invisible. Time to hunt!")
  222. set_task(get_pcvar_float(cvar_ability_time), "ability_end", id)
  223. if(get_pcvar_num(cvar_icon) == 1)
  224. set_icon(id)
  225. g_ability[id] = true
  226. }
  227. }
  228. return PLUGIN_CONTINUE
  229. }
  230.  
  231. public ability_end(id)
  232. {
  233. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
  234. set_user_maxspeed(id, float(zclass_speed))
  235. set_user_gravity(id, zclass_gravity)
  236.  
  237. if (get_pcvar_num(cvar_cooldown) > 0)
  238. client_print(id, print_chat, "[ZP] Varj %i masodpercet,hogy ujra hasznald a kepesseget .", get_pcvar_num(cvar_cooldown))
  239.  
  240. if(get_pcvar_num(cvar_icon) == 1)
  241. delete_icon(id)
  242.  
  243. g_last[id] = get_gametime()
  244. g_ability[id] = false
  245. }
  246.  
  247. public fw_ppt(id)
  248. {
  249. if (!is_user_alive(id) || !zp_get_user_zombie(id))
  250. return FMRES_IGNORED
  251.  
  252. if (g_use[id])
  253. {
  254. static button, oldbutton
  255. button = get_user_button(id)
  256. oldbutton = get_user_oldbutton(id)
  257.  
  258. if (!(button & IN_USE) && (oldbutton & IN_USE))
  259. ability(id)
  260. }
  261.  
  262. if (g_ability[id] && (zp_get_user_zombie_class(id) == g_zclass_Predator) && zp_get_user_zombie(id))
  263. {
  264. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(cvar_invamount))
  265. set_user_maxspeed(id, get_pcvar_float(cvar_speed))
  266. set_pev(id, pev_flTimeStepSound, 999)
  267. set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800)
  268. }
  269.  
  270. return PLUGIN_CONTINUE
  271. }
  272.  
  273. public newround()
  274. {
  275. g_maxplayers = get_maxplayers()
  276.  
  277. for (new id = 1; id <= g_maxplayers; id++)
  278. {
  279. g_last[id] = get_gametime()
  280. g_ability[id] = false
  281. }
  282. }
  283.  
  284. public fw_TakeDamage( victim, inflictor, attacker, Float:damage, damagebits )
  285. {
  286. if ((zp_get_user_zombie_class(attacker) == g_zclass_Predator) && (get_user_weapon(attacker) == CSW_KNIFE))
  287. {
  288. SetHamParamFloat( 4, damage * get_pcvar_float(cvar_dmg_multi) )
  289. }
  290. }
  291.  
  292. public death()
  293. {
  294. new id = read_data(2)
  295. ability_end(id)
  296. return PLUGIN_HANDLED
  297. }
  298.  
  299. public set_icon(id)
  300. {
  301. static color[3], sprite[16]
  302. color = {250, 250, 250}
  303. sprite = "dmg_gas"
  304. g_icon[id] = sprite
  305.  
  306. message_begin(MSG_ONE, g_status, {0, 0, 0}, id)
  307. write_byte(1)
  308. write_string(g_icon[id])
  309. write_byte(color[0])
  310. write_byte(color[1])
  311. write_byte(color[2])
  312. message_end()
  313. }
  314.  
  315. public delete_icon(id)
  316. {
  317. message_begin(MSG_ONE, g_status, {0, 0, 0}, id)
  318. write_byte(0)
  319. write_string(g_icon[id])
  320. message_end()
  321. }
  322.  
  323. stock get_user_button(id)
  324. return pev(id, pev_button)
  325.  
  326. stock get_user_oldbutton(id)
  327. return pev(id, pev_oldbuttons)
  328. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  329. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
  330. */


Így esetleg?

_________________
rwT* Szerverek!

Különleges játékélmény különleges szerverektől.
Bővebb információkért nézz az alábbi tartalmak után.

( FaceBook ) ( YouTube ) ( Web ) ( GameTracker )

Ők köszönték meg MISU1998 nek ezt a hozzászólást: andrisgaming (2014.06.14. 16:57)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Admin Zombi
HozzászólásElküldve: 2014.06.14. 13:13 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2011.09.18. 13:01
Hozzászólások: 4270
Megköszönt másnak: 55 alkalommal
Megköszönték neki: 513 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4. #include <fakemeta>
  5. #if defined _zombieplague_included
  6. #endinput
  7. #endif
  8. #define _zombieplague_included
  9.  
  10. #define ZP_TEAM_ZOMBIE (1<<0)
  11. #define ZP_TEAM_HUMAN (1<<1)
  12. #define ZP_TEAM_NEMESIS (1<<2)
  13. #define ZP_TEAM_SURVIVOR (1<<3)
  14.  
  15. enum
  16. {
  17. MODE_INFECTION = 1,
  18. MODE_NEMESIS,
  19. MODE_SURVIVOR,
  20. MODE_SWARM,
  21. MODE_MULTI,
  22. MODE_PLAGUE
  23. }
  24.  
  25. enum
  26. {
  27. WIN_NO_ONE = 0,
  28. WIN_ZOMBIES,
  29. WIN_HUMANS
  30. }
  31.  
  32. #define ZP_PLUGIN_HANDLED 97
  33.  
  34. native zp_get_user_zombie(id)
  35. native zp_get_user_nemesis(id)
  36. native zp_get_user_survivor(id)
  37. native zp_get_user_first_zombie(id)
  38. native zp_get_user_last_zombie(id)
  39. native zp_get_user_last_human(id)
  40. native zp_get_user_zombie_class(id)
  41. native zp_get_user_next_class(id)
  42. native zp_set_user_zombie_class(id, classid)
  43. native zp_get_user_ammo_packs(id)
  44. native zp_set_user_ammo_packs(id, amount)
  45. native zp_get_zombie_maxhealth(id)
  46. native zp_get_user_batteries(id)
  47. native zp_set_user_batteries(id, charge)
  48. native zp_get_user_nightvision(id)
  49. native zp_set_user_nightvision(id, set)
  50. native zp_infect_user(id, infector = 0, silent = 0, rewards = 0)
  51. native zp_disinfect_user(id, silent = 0)
  52. native zp_make_user_nemesis(id)
  53. native zp_make_user_survivor(id)
  54. native zp_respawn_user(id, team)
  55. native zp_force_buy_extra_item(id, itemid, ignorecost = 0)
  56. native zp_override_user_model(id, const newmodel[], modelindex = 0)
  57. native zp_has_round_started()
  58. native zp_is_nemesis_round()
  59. native zp_is_survivor_round()
  60. native zp_is_swarm_round()
  61. native zp_is_plague_round()
  62. native zp_get_zombie_count()
  63. native zp_get_human_count()
  64. native zp_get_nemesis_count()
  65. native zp_get_survivor_count()
  66. native zp_register_extra_item(const name[], cost, teams)
  67. native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback)
  68. native zp_get_extra_item_id(const name[])
  69. native zp_get_zombie_class_id(const name[])
  70. native zp_get_zombie_class_info(classid, info[], len)
  71. forward zp_round_started(gamemode, id)
  72. forward zp_round_ended(winteam)
  73. forward zp_user_infected_pre(id, infector, nemesis)
  74. forward zp_user_infected_post(id, infector, nemesis)
  75. forward zp_user_humanized_pre(id, survivor)
  76. forward zp_user_humanized_post(id, survivor)
  77. forward zp_user_infect_attempt(id, infector, nemesis)
  78. forward zp_user_humanize_attempt(id, survivor)
  79. forward zp_extra_item_selected(id, itemid)
  80. forward zp_user_unfrozen(id)
  81. forward zp_user_last_zombie(id)
  82. forward zp_user_last_human(id)
  83.  
  84. #define ZP_TEAM_ANY 0
  85. #define ZP_TEAM_NO_ONE 0
  86.  
  87. #include <hamsandwich>
  88.  
  89. #define PLUGIN "[ZP] Class Predator"
  90. #define VERSION "1.0"
  91. #define AUTHOR "TEo"
  92. //Magyarositotta: Ginaa
  93.  
  94. //Some vars
  95. new g_zclass_Predator, g_maxplayers, g_status
  96. new g_sndInv[] = "predator/predator.wav"
  97. new cvar_ability_time, cvar_invamount, cvar_speed, cvar_infect_hp, cvar_cooldown, cvar_gravity, cvar_icon, cvar_dmg_multi
  98. new Float:g_last[33]
  99. new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
  100. new g_icon[33][16]
  101. new bool: g_ability[33], bool: g_bind[33] = false, bool: g_use[33]
  102.  
  103. //Predator Atributes
  104. new const zclass_name[] = { "Predator" }
  105. new const zclass_info[] = { "Invisible + dmg" }
  106. new const zclass_model[] = { "Predator" }
  107. new const zclass_clawmodel[] = { "v_Predator.mdl" }
  108. const zclass_health = 1600
  109. const zclass_speed = 190
  110. const Float:zclass_gravity = 1.0
  111. const Float:zclass_knockback = 1.0
  112.  
  113. public plugin_init()
  114. {
  115.  
  116. cvar_dmg_multi = register_cvar("zp_predator_dmg_multi", "3")
  117. cvar_ability_time = register_cvar("zp_Predator_ability_long", "10")
  118. cvar_invamount = register_cvar("zp_Predator_visible_amount", "0")
  119. cvar_speed = register_cvar("zp_Predator_max_speed", "400")
  120. cvar_infect_hp = register_cvar("zp_Predator_infect_hp", "300")
  121. cvar_cooldown = register_cvar("zp_Predator_cooldown", "30")
  122. cvar_gravity = register_cvar("zp_Predator_gravity", "700")
  123. cvar_icon = register_cvar("zp_Predator_icon", "1")
  124.  
  125. register_clcmd("ability","ability", ADMIN_ALL, "bind ^"key^" ^"ability^"")
  126. register_forward(FM_PlayerPreThink, "fw_ppt")
  127. register_event("HLTV", "newround", "a", "1=0", "2=0")
  128. register_event("DeathMsg", "death", "a")
  129. register_menucmd(register_menuid("Do you want to bind P ability?"), keys, "bind_p")
  130. RegisterHam( Ham_TakeDamage, "player", "fw_TakeDamage" )
  131.  
  132. g_status = get_user_msgid("StatusIcon")
  133. }
  134.  
  135. public plugin_precache()
  136. {
  137. register_plugin(PLUGIN, VERSION, AUTHOR)
  138. g_zclass_Predator = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
  139. precache_sound(g_sndInv)
  140. }
  141.  
  142. public zp_user_infected_pre(id) {
  143. if(!(get_user_flags(id) & ADMIN_KICK)) { //lekeri admin jogot
  144. if (zp_get_user_next_class(id) == g_zclass_Predator) {
  145. zp_set_user_zombie_class(id, 0) //ha nem admin akkor a legelso zombria valt
  146. client_print(id, print_center, "Nem vagy admin!Nem hasznalhatod!")
  147. client_print(id, print_chat, "Nem hasznalhatod a zombi fajt!Alap zombi leszel!")
  148. }
  149. }
  150. }
  151.  
  152. public zp_user_infected_post(id, infector)
  153. {
  154. if (zp_get_user_zombie_class(infector) == g_zclass_Predator)
  155. {
  156. set_pev(infector, pev_health, float(pev(infector, pev_health) + get_pcvar_num(cvar_infect_hp)))
  157. set_hudmessage(255, 0, 0, -1.0, 0.45, 0, 0.0, 3.0, 0.01, 0.01, -1)
  158. show_hudmessage(infector, "+%i HP!", get_pcvar_num(cvar_infect_hp))
  159. }
  160.  
  161. if (zp_get_user_zombie_class(id) == g_zclass_Predator)
  162. {
  163. g_ability[id] = false
  164. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
  165. set_user_maxspeed(id, float(zclass_speed))
  166. set_user_gravity(id, zclass_gravity)
  167.  
  168. if (!g_bind[id])
  169. {
  170. new menu[192]
  171. format(menu, 191, "Szeretned ha bebindelnenk a kepesseget a P-beture?^n^n1. Igen^n2. Nem^n3. Az E-betuvel szeretnem hasznalni")
  172. show_menu(id, keys, menu)
  173. }
  174. }
  175. }
  176.  
  177. public zp_user_humanized_post(id)
  178. if(zp_get_user_zombie_class(id) == g_zclass_Predator)
  179. ability_end(id)
  180.  
  181. public bind_p(id, keys)
  182. {
  183. g_bind[id] = true
  184. switch(keys)
  185. {
  186. case 0:
  187. client_cmd(id, "bind p ability")
  188.  
  189. case 1:
  190. client_print(id, print_chat, "[ZP] A teljes lathatatlansaghoz ird a consolba: bind ^'^'gomb^'^' ^'^'ability^'^'. Es utana nyomd meg a kivalasztott gombot!")
  191.  
  192. case 2:
  193. g_use[id] = true
  194.  
  195. default:
  196. g_bind[id] = false
  197. }
  198.  
  199. return PLUGIN_HANDLED
  200. }
  201.  
  202. public ability(id)
  203. {
  204. if (zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_Predator))
  205. {
  206. if(g_ability[id])
  207. {
  208. client_print(id, print_chat, "[ZP] Te mar igyis lathatatlan vagy!!")
  209. return PLUGIN_HANDLED
  210. }
  211.  
  212. if(!is_user_alive(id))
  213. {
  214. client_print(id, print_chat, "[ZP] Halott vagy.Halottak nem tudjak hasznalni a kepesseget.")
  215. return PLUGIN_HANDLED
  216. }
  217.  
  218. static Float: i
  219. i = get_pcvar_float(cvar_cooldown)
  220.  
  221. if (get_gametime() - g_last[id] < i) {
  222. client_print(id, print_chat, "[ZP] Varj %.f0 masodpercet hogy hasznalhasd a kepesseget!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_last[id]))
  223. return PLUGIN_HANDLED
  224. } else {
  225. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(cvar_invamount))
  226. set_user_maxspeed(id, get_pcvar_float(cvar_speed))
  227. set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800)
  228. emit_sound(id, CHAN_BODY, g_sndInv, 1.0, ATTN_NORM, 0, PITCH_HIGH)
  229. set_hudmessage(200, 100, 0, -1.0, 0.85, 0, 0.0, 3.0, 0.01, 0.01, -1)
  230. show_hudmessage(id, "You are now invisible. Time to hunt!")
  231. set_task(get_pcvar_float(cvar_ability_time), "ability_end", id)
  232. if(get_pcvar_num(cvar_icon) == 1)
  233. set_icon(id)
  234. g_ability[id] = true
  235. }
  236. }
  237. return PLUGIN_CONTINUE
  238. }
  239.  
  240. public ability_end(id)
  241. {
  242. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
  243. set_user_maxspeed(id, float(zclass_speed))
  244. set_user_gravity(id, zclass_gravity)
  245.  
  246. if (get_pcvar_num(cvar_cooldown) > 0)
  247. client_print(id, print_chat, "[ZP] Varj %i masodpercet,hogy ujra hasznald a kepesseget .", get_pcvar_num(cvar_cooldown))
  248.  
  249. if(get_pcvar_num(cvar_icon) == 1)
  250. delete_icon(id)
  251.  
  252. g_last[id] = get_gametime()
  253. g_ability[id] = false
  254. }
  255.  
  256. public fw_ppt(id)
  257. {
  258. if (!is_user_alive(id) || !zp_get_user_zombie(id))
  259. return FMRES_IGNORED
  260.  
  261. if (g_use[id])
  262. {
  263. static button, oldbutton
  264. button = get_user_button(id)
  265. oldbutton = get_user_oldbutton(id)
  266.  
  267. if (!(button & IN_USE) && (oldbutton & IN_USE))
  268. ability(id)
  269. }
  270.  
  271. if (g_ability[id] && (zp_get_user_zombie_class(id) == g_zclass_Predator) && zp_get_user_zombie(id))
  272. {
  273. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(cvar_invamount))
  274. set_user_maxspeed(id, get_pcvar_float(cvar_speed))
  275. set_pev(id, pev_flTimeStepSound, 999)
  276. set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800)
  277. }
  278.  
  279. return PLUGIN_CONTINUE
  280. }
  281.  
  282. public newround()
  283. {
  284. g_maxplayers = get_maxplayers()
  285.  
  286. for (new id = 1; id <= g_maxplayers; id++)
  287. {
  288. g_last[id] = get_gametime()
  289. g_ability[id] = false
  290. }
  291. }
  292.  
  293. public fw_TakeDamage( victim, inflictor, attacker, Float:damage, damagebits )
  294. {
  295. if ((zp_get_user_zombie_class(attacker) == g_zclass_Predator) && (get_user_weapon(attacker) == CSW_KNIFE))
  296. {
  297. SetHamParamFloat( 4, damage * get_pcvar_float(cvar_dmg_multi) )
  298. }
  299. }
  300.  
  301. public death()
  302. {
  303. new id = read_data(2)
  304. ability_end(id)
  305. return PLUGIN_HANDLED
  306. }
  307.  
  308. public set_icon(id)
  309. {
  310. static color[3], sprite[16]
  311. color = {250, 250, 250}
  312. sprite = "dmg_gas"
  313. g_icon[id] = sprite
  314.  
  315. message_begin(MSG_ONE, g_status, {0, 0, 0}, id)
  316. write_byte(1)
  317. write_string(g_icon[id])
  318. write_byte(color[0])
  319. write_byte(color[1])
  320. write_byte(color[2])
  321. message_end()
  322. }
  323.  
  324. public delete_icon(id)
  325. {
  326. message_begin(MSG_ONE, g_status, {0, 0, 0}, id)
  327. write_byte(0)
  328. write_string(g_icon[id])
  329. message_end()
  330. }
  331.  
  332. stock get_user_button(id)
  333. return pev(id, pev_button)
  334.  
  335. stock get_user_oldbutton(id)
  336. return pev(id, pev_oldbuttons)
  337. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  338. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
  339. */
  340.  

Teszteld.

_________________
Idk. Csak ugy funbooo.
Kép

Ők köszönték meg DeteCT0R nek ezt a hozzászólást: andrisgaming (2014.06.14. 16:58)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Admin Zombi
HozzászólásElküldve: 2014.06.14. 16:56 
Offline
Beavatott

Csatlakozott: 2014.04.29. 14:15
Hozzászólások: 68
Megköszönt másnak: 18 alkalommal
Most jó :)
Köszönöm szépen


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 6 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 0 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole