zm class conversion
- /*
- /-----[ZP] Zclass CSO:Raptor Zombie-----
- /-----By Zombiezzz & NiHiLaNTh
- */
- #include <amxmodx>
- #include <fakemeta>
- #include <fun>
- #include <zombieplague>
- // Zombie Attributes
- new const zclass_name[] = { "Raptor Zombie" } // name
- new const zclass_info[] = { "[E] Invisble +speed +HP" } // description
- new const zclass_model[] = { "avh_alien" } // model
- new const zclass_clawmodel[] = { "avh_alienclaws.mdl" } // claw model
- const g_zclass_health = 1500 // health
- const zclass_speed = 350 // speed
- const Float:zclass_gravity = 0.6 // gravity
- const Float:zclass_knockback = 0.6 // knockback
- new g_zclass_infecter,invistime
- new Float:g_regendelay [ 33 ]
- public plugin_init( ){
- register_forward ( FM_PlayerPreThink, "fw_PlayerPreThink" )
- invistime = register_cvar("zp_invis_time", "30.0")
- register_clcmd( "+invisible", "die_la_bitch", ADMIN_ALL, "bind [key] +invisible" )
- }
- public plugin_precache()
- {
- register_plugin("[ZP] Zombie Class: Infecter Zombie", "1.2", "Zombiezzz")
- g_zclass_infecter = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, g_zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
- }
- public zp_user_infected_post(id, infector)
- {
- if (zp_get_user_zombie_class(id) == g_zclass_infecter && !zp_get_user_nemesis(id))
- {
- client_cmd( id, "bind E ^"+invisible^"" )
- client_print(id, print_chat, "Press E to go invisible..")
- }
- }
- public invisible( id )
- {
- set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,300)
- set_task(get_pcvar_float(invistime), "endinvis"
- )
- }
- public endinvis( id )
- {
- set_user_rendering(id, kRenderFxNone, 0,0,0, kRenderNormal, 255)
- }
- public fw_PlayerPreThink ( Player )
- {
- if ( !is_user_alive ( Player ) || !zp_get_user_zombie ( Player ) )
- return FMRES_IGNORED
- static Float:gametime
- gametime = get_gametime ( )
- static Float:health
- pev ( Player, pev_health, health )
- if ( health < g_zclass_health && g_regendelay [ Player ] < gametime )
- {
- set_pev ( Player, pev_health, health + 1.0 )
- g_regendelay [ Player ] = gametime + 1.0
- }
- return FMRES_IGNORED
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
- */
and
- #include <amxmodx>
- #include <engine>
- #include <zombieplague>
- new Float:next_fart[33]
- new farts_count[33]
- new fart_spr
- new bool:wait_damage[33]
- new g_zclass_gas
- // Gas Zombie Atributes
- new const zclass_name[] = { "Gas Zombie" } // name
- new const zclass_info[] = { "Can creat smoke screen" } // description
- new const zclass_model[] = { "gas" } // model
- new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
- const zclass_health = 1000 // health
- const zclass_speed = 250 // speed
- const Float:zclass_gravity = 1.0 // gravity
- const Float:zclass_knockback = 1.5 // knockback
- public plugin_init()
- {
- register_plugin("[ZP] Smoke Screen Zombie","1.0","Roadrage+KRoTaL")
- register_clcmd("fart","fart")
- register_cvar("amx_fart_wait","10")
- register_cvar("amx_fart_ttl","180")
- register_cvar("amx_fart_abuse","5")
- register_event("ResetHUD","reset_hud","b")
- register_logevent("endround", 2, "0=World triggered", "1=Round_End")
- }
- public plugin_precache()
- {
- g_zclass_gas = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
- precache_sound("fart.wav")
- precache_sound("gasp1.wav")
- precache_sound("gasp2.wav")
- precache_sound("player/headshot1.wav")
- fart_spr = precache_model("sprites/xsmoke1.spr")
- }
- // User Infected forward
- public zp_user_infected_post(id, infector)
- {
- if (zp_get_user_zombie_class(id) == g_zclass_gas)
- {
- client_print(id,print_chat,"[ZP] You are using gas zombie bind key to fart to create smoke screen")
- wait_damage[id] = true
- }
- }
- public reset_hud(id)
- {
- wait_damage[id] = false
- next_fart[id] = 0.0
- farts_count[id] = 0
- }
- public endround()
- {
- set_task(3.0, "kill_farts", 99999944)
- }
- public fart(id)
- {
- if(!is_user_alive(id) || !zp_get_user_zombie(id))
- return PLUGIN_HANDLED
- if(zp_get_user_zombie_class(id) != g_zclass_gas)
- return PLUGIN_CONTINUE
- if(get_gametime() < next_fart[id])
- {
- new timetowait = floatround(next_fart[id]-get_gametime())
- client_print(id, print_chat, "YOU HAVE TO WAIT %d SECOND%s BEFORE USING SMOKE SCREEN AGAIN!", timetowait, (timetowait>1)?"S":"")
- }
- else
- {
- emit_sound(id, CHAN_VOICE, "fart.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- new origin[3]
- get_user_origin(id, origin)
- for (new j = 0; j < 10; j++)
- {
- message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
- write_byte(101)
- write_coord(origin[0])
- write_coord(origin[1])
- write_coord(origin[2] - 26)
- write_coord(random_num(-100,100))
- write_coord(random_num(-100,100))
- write_coord(random_num(20,300))
- write_byte(100)
- write_byte(random_num(100,200))
- message_end()
- }
- create_fart(id)
- farts_count[id]++
- if(farts_count[id] > get_cvar_num("amx_fart_abuse"))
- {
- new health = get_user_health(id) - random_num(10,50)
- if(health > 0)
- {
- user_slap(id, health)
- client_print(id, print_chat, "Do not abuse the power of smoke screen or you will pay the consequences!")
- }
- else
- {
- emit_sound(id, CHAN_VOICE, "fart.wav", 1.0, 0.2, 0, PITCH_NORM)
- message_begin(MSG_ALL, SVC_TEMPENTITY)
- write_byte(10)
- write_coord(origin[0])
- write_coord(origin[1])
- write_coord(origin[2]-26)
- message_end()
- user_kill(id)
- new player_name[32]
- get_user_name(id, player_name, 31)
- client_print(0, print_chat, "%s abused smoke screen and he blew up! ", player_name)
- }
- }
- next_fart[id] = get_gametime() + get_cvar_float("amx_fart_wait")
- }
- return PLUGIN_HANDLED
- }
- public reset_damage(ids[])
- {
- wait_damage[ids[0]] = false
- }
- public create_fart(id)
- {
- new Float:origin[3]
- entity_get_vector(id, EV_VEC_origin, origin)
- new FartEnt
- FartEnt = create_entity("info_target")
- if(FartEnt <= 0)
- {
- return PLUGIN_HANDLED_MAIN
- }
- entity_set_string(FartEnt, EV_SZ_classname, "hazardous fart")
- new Float:MinBox[3]
- new Float:MaxBox[3]
- MinBox[0] = -80.0
- MinBox[1] = -80.0
- MinBox[2] = -80.0
- MaxBox[0] = 80.0
- MaxBox[1] = 80.0
- MaxBox[2] = 80.0
- entity_set_size(FartEnt, MinBox, MaxBox)
- entity_set_int(FartEnt, EV_INT_solid, 1)
- entity_set_edict(FartEnt, EV_ENT_owner, 33+id)
- entity_set_origin(FartEnt, origin)
- new param[1]
- param[0]= FartEnt
- set_task(1.0,"fart_fume",111111+FartEnt,param,1,"b")
- set_task(get_cvar_float("amx_fart_ttl"),"remove_fart",333333+FartEnt,param,1)
- return PLUGIN_CONTINUE
- }
- public remove_fart(param[1])
- {
- new FartEnt = param[0]
- if(is_valid_ent(FartEnt)) remove_entity(FartEnt)
- remove_task(111111+FartEnt)
- return PLUGIN_CONTINUE
- }
- public kill_farts()
- {
- new iEntity = find_ent_by_class(-1, "hazardous fart")
- while(iEntity > 0)
- {
- remove_entity(iEntity)
- remove_task(111111+iEntity)
- remove_task(333333+iEntity)
- iEntity = find_ent_by_class(-1, "hazardous fart")
- }
- return PLUGIN_CONTINUE
- }
- public fart_fume(param[1])
- {
- new FartEnt = param[0]
- new Float:forigin[3], origin[3]
- entity_get_vector(FartEnt, EV_VEC_origin, forigin)
- FVecIVec(forigin, origin)
- new players[32], inum
- get_players(players,inum)
- for(new i = 0 ;i < inum; ++i)
- {
- message_begin(MSG_ONE,SVC_TEMPENTITY,{0,0,0},players[i])
- write_byte(17)
- write_coord(origin[0])
- write_coord(origin[1])
- write_coord(origin[2]+30)
- write_short(fart_spr)
- write_byte(180)
- write_byte(100)
- message_end()
- }
- return PLUGIN_CONTINUE
- }
LOL
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
- /*
- /-----[ZP] Zclass CSO:Raptor Zombie-----
- /-----By Zombiezzz & NiHiLaNTh
- */
- #include <zombie_escape>
- #include <ze_zombie_class>
- #include <fun>
- // Zombie Attributes
- new const zclass_name[] = { "Raptor Zombie" } // name
- new const zclass_info[] = { "[E] Invisble +speed +HP" } // description
- const g_zclass_health = 1500 // health
- const zclass_speed = 350 // speed
- const zclass_gravity = 760 // gravity
- new g_zclass_infecter,invistime
- new Float:g_regendelay [ 33 ]
- public plugin_init( ){
- register_forward ( FM_PlayerPreThink, "fw_PlayerPreThink" )
- invistime = register_cvar("zp_invis_time", "30.0")
- register_clcmd( "+invisible", "die_la_bitch", ADMIN_ALL, "bind [key] +invisible" )
- }
- public plugin_precache()
- {
- register_plugin("[ZP] Zombie Class: Infecter Zombie", "1.2", "Zombiezzz")
- g_zclass_infecter = ze_register_zombie_class(zclass_name, zclass_info, g_zclass_health, zclass_speed, zclass_gravity)
- }
- public ze_user_infected(id)
- {
- if (ze_get_current_zombie_class(id) == g_zclass_infecter)
- {
- client_cmd( id, "bind E ^"+invisible^"" )
- client_print(id, print_chat, "Press E to go invisible..")
- }
- }
- public invisible( id )
- {
- set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,300)
- set_task(get_pcvar_float(invistime), "endinvis"
- )
- }
- public endinvis( id )
- {
- set_user_rendering(id, kRenderFxNone, 0,0,0, kRenderNormal, 255)
- }
- public fw_PlayerPreThink ( Player )
- {
- if ( !is_user_alive ( Player ) || !ze_is_user_zombie ( Player ) )
- return FMRES_IGNORED
- static Float:gametime
- gametime = get_gametime ( )
- static Float:health
- pev ( Player, pev_health, health )
- if ( health < g_zclass_health && g_regendelay [ Player ] < gametime )
- {
- set_pev ( Player, pev_health, health + 1.0 )
- g_regendelay [ Player ] = gametime + 1.0
- }
- return FMRES_IGNORED
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
- */
- #include <zombie_escape>
- #include <ze_zombie_class>
- #include <engine>
- new Float:next_fart[33]
- new farts_count[33]
- new fart_spr
- new bool:wait_damage[33]
- new g_zclass_gas
- // Gas Zombie Atributes
- new const zclass_name[] = { "Gas Zombie" } // name
- new const zclass_info[] = { "Can creat smoke screen" } // description
- const zclass_health = 1000 // health
- const zclass_speed = 250 // speed
- const zclass_gravity = 800 // gravity
- public plugin_init()
- {
- register_plugin("[ZP] Smoke Screen Zombie","1.0","Roadrage+KRoTaL")
- register_clcmd("fart","fart")
- register_cvar("amx_fart_wait","10")
- register_cvar("amx_fart_ttl","180")
- register_cvar("amx_fart_abuse","5")
- register_event("ResetHUD","reset_hud","b")
- register_logevent("endround", 2, "0=World triggered", "1=Round_End")
- }
- public plugin_precache()
- {
- g_zclass_gas = ze_register_zombie_class(zclass_name, zclass_info, zclass_health, zclass_speed, zclass_gravity)
- precache_sound("fart.wav")
- precache_sound("gasp1.wav")
- precache_sound("gasp2.wav")
- precache_sound("player/headshot1.wav")
- fart_spr = precache_model("sprites/xsmoke1.spr")
- }
- // User Infected forward
- public ze_user_infected(id)
- {
- if (zp_get_user_zombie_class(id) == g_zclass_gas)
- {
- ze_colored_print(id, "You are using gas zombie bind key to fart to create smoke screen.")
- wait_damage[id] = true
- }
- }
- public reset_hud(id)
- {
- wait_damage[id] = false
- next_fart[id] = 0.0
- farts_count[id] = 0
- }
- public endround()
- {
- set_task(3.0, "kill_farts", 99999944)
- }
- public fart(id)
- {
- if(!is_user_alive(id) || !ze_is_user_zombie(id))
- return PLUGIN_HANDLED
- if(ze_get_current_zombie_class(id) != g_zclass_gas)
- return PLUGIN_CONTINUE
- if(get_gametime() < next_fart[id])
- {
- new timetowait = floatround(next_fart[id]-get_gametime())
- ze_colored_print(id, "YOU HAVE TO WAIT %d SECOND%s BEFORE USING SMOKE SCREEN AGAIN!", timetowait, (timetowait>1)?"S":"")
- }
- else
- {
- emit_sound(id, CHAN_VOICE, "fart.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- new origin[3]
- get_user_origin(id, origin)
- for (new j = 0; j < 10; j++)
- {
- message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
- write_byte(101)
- write_coord(origin[0])
- write_coord(origin[1])
- write_coord(origin[2] - 26)
- write_coord(random_num(-100,100))
- write_coord(random_num(-100,100))
- write_coord(random_num(20,300))
- write_byte(100)
- write_byte(random_num(100,200))
- message_end()
- }
- create_fart(id)
- farts_count[id]++
- if(farts_count[id] > get_cvar_num("amx_fart_abuse"))
- {
- new health = get_user_health(id) - random_num(10,50)
- if(health > 0)
- {
- user_slap(id, health)
- ze_colored_print(id, "Do not abuse the power of smoke screen or you will pay the consequences!")
- }
- else
- {
- emit_sound(id, CHAN_VOICE, "fart.wav", 1.0, 0.2, 0, PITCH_NORM)
- message_begin(MSG_ALL, SVC_TEMPENTITY)
- write_byte(10)
- write_coord(origin[0])
- write_coord(origin[1])
- write_coord(origin[2]-26)
- message_end()
- user_kill(id)
- new player_name[32]
- get_user_name(id, player_name, 31)
- ze_colored_print(0, "%s abused smoke screen and he blew up! ", player_name)
- }
- }
- next_fart[id] = get_gametime() + get_cvar_float("amx_fart_wait")
- }
- return PLUGIN_HANDLED
- }
- public reset_damage(ids[])
- {
- wait_damage[ids[0]] = false
- }
- public create_fart(id)
- {
- new Float:origin[3]
- entity_get_vector(id, EV_VEC_origin, origin)
- new FartEnt
- FartEnt = create_entity("info_target")
- if(FartEnt <= 0)
- {
- return PLUGIN_HANDLED_MAIN
- }
- entity_set_string(FartEnt, EV_SZ_classname, "hazardous fart")
- new Float:MinBox[3]
- new Float:MaxBox[3]
- MinBox[0] = -80.0
- MinBox[1] = -80.0
- MinBox[2] = -80.0
- MaxBox[0] = 80.0
- MaxBox[1] = 80.0
- MaxBox[2] = 80.0
- entity_set_size(FartEnt, MinBox, MaxBox)
- entity_set_int(FartEnt, EV_INT_solid, 1)
- entity_set_edict(FartEnt, EV_ENT_owner, 33+id)
- entity_set_origin(FartEnt, origin)
- new param[1]
- param[0]= FartEnt
- set_task(1.0,"fart_fume",111111+FartEnt,param,1,"b")
- set_task(get_cvar_float("amx_fart_ttl"),"remove_fart",333333+FartEnt,param,1)
- return PLUGIN_CONTINUE
- }
- public remove_fart(param[1])
- {
- new FartEnt = param[0]
- if(is_valid_ent(FartEnt)) remove_entity(FartEnt)
- remove_task(111111+FartEnt)
- return PLUGIN_CONTINUE
- }
- public kill_farts()
- {
- new iEntity = find_ent_by_class(-1, "hazardous fart")
- while(iEntity > 0)
- {
- remove_entity(iEntity)
- remove_task(111111+iEntity)
- remove_task(333333+iEntity)
- iEntity = find_ent_by_class(-1, "hazardous fart")
- }
- return PLUGIN_CONTINUE
- }
- public fart_fume(param[1])
- {
- new FartEnt = param[0]
- new Float:forigin[3], origin[3]
- entity_get_vector(FartEnt, EV_VEC_origin, forigin)
- FVecIVec(forigin, origin)
- new players[32], inum
- get_players(players,inum)
- for(new i = 0 ;i < inum; ++i)
- {
- message_begin(MSG_ONE,SVC_TEMPENTITY,{0,0,0},players[i])
- write_byte(17)
- write_coord(origin[0])
- write_coord(origin[1])
- write_coord(origin[2]+30)
- write_short(fart_spr)
- write_byte(180)
- write_byte(100)
- message_end()
- }
- return PLUGIN_CONTINUE
- }
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 3 guests