Jump to content

modificare plugin clasa zombie plague


Zp.Mihai

Recommended Posts

Nume : furiosul cerbus


Versiune : zombie plague special 3.2


Descriere detaliata : as dori ca acest plugin sa nu isi mai poata folosi abilitatea la moduri [abilitatea lui este ca adunci cand este activata trece prin lasermine si  cel care trage in el nu ii poate lua dmg cainelui  as vrea ca atunci cand ruleaza un mod sa nu isi mai poata folosi abilitatea respectiva]


 


plugin zombie cerbus:

#include <amxmodx>


#include <zombieplague>

#include <engine>

#include <fun>

#include <fakemeta>

#include <hamsandwich>

#include <zombiexp>

 

#define ID_FURY (taskid - TASK_FURY)

 

// Task offsets

enum (+= 100)

{

TASK_FURY

}

 

/*================================================================================

 [Customizations]

=================================================================================*/

 

// Zombie Attributes

new const zclass_name[] = { "Furiosul"}

new const zclass_info[] = { "Cainele Furios Trece Prin Laser" }

new const zclass_model[] = { "Cerberus_frk_14" }

new const zclass_clawmodel[] = { "v_doghands.mdl" }

const zclass_health = 13500

const zclass_speed = 770

const Float:zclass_gravity = 0.6

const Float:zclass_knockback = 0.5

const zclass_level = 14 // level required to use

 

new const idle[] = "zombie_plague/cerberus_idle.wav"

new const fury[] = "zombie_plague/cerberus_fury.wav"

new const normaly[] = "zombie_plague/cerberus_normaly.wav"

 

/*================================================================================

 Customization ends here!

 Any edits will be your responsibility

=================================================================================*/  

 

// Plugin info.

#define PLUGIN "[ZP] Zombie Class: Cerberus Dog"

#define VERSION "0.1"

#define AUTHOR "DJHD!"

 

// Variables

new g_zclassid, g_veces[33], i_fury_time[33], g_maxplayers

 

// Cvar Pointers

new cvar_fury, cvar_furytime

 

/*================================================================================

 [init, CFG and Precache]

=================================================================================*/

 

public plugin_init()

{

register_plugin(PLUGIN, VERSION, AUTHOR)

 

cvar_fury = register_cvar("zp_cerberus_fury", "1")

cvar_furytime = register_cvar("zp_cerberus_fury_time", "30.0")

 

static szCvar[30]

formatex(szCvar, charsmax(szCvar), "v%s by %s", VERSION, AUTHOR)

register_cvar("zp_zclass_cerberus", szCvar, FCVAR_SERVER|FCVAR_SPONLY)

 

register_logevent("roundStart", 2, "1=Round_Start")

register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")

 

g_maxplayers = get_maxplayers()

}

 

public plugin_precache()

{

g_zclassid = zpxp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback, zclass_level) 

 

precache_sound(idle)

precache_sound(fury)

precache_sound(normaly)

}

 

/*================================================================================

 [Zombie Plague Forwards]

=================================================================================*/

 

public zp_user_infected_post(id, infector)

{

if (zp_get_user_zombie_class(id) == g_zclassid)

{

client_print(id, print_chat, "[Zombi Cerberus] Puteti Folosi Abilitatea %d Apasand Tasta - ^"E^"", get_pcvar_num(cvar_fury))

 

g_veces[id] = get_pcvar_num(cvar_fury)

i_fury_time[id] = get_pcvar_num(cvar_furytime)

emit_sound(id, CHAN_STREAM, idle, 1.0, ATTN_NORM, 0, PITCH_HIGH)

remove_task(id)

}

}

 

public zp_user_humanized_post(taskid)

{

new id = ID_FURY

remove_task(id+TASK_FURY)

set_user_godmode(id, 0)

}

 

 

/*================================================================================

 [Main Forwards]

=================================================================================*/

 

public fw_PlayerPreThink(id)

{

if (!is_user_alive(id))

return FMRES_IGNORED

 

new button = get_user_button(id)

new oldbutton = get_user_oldbutton(id)

 

if (zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclassid))

{

if (!(oldbutton & IN_USE) && (button & IN_USE))

clcmd_furia(id)

}

 

return PLUGIN_CONTINUE

}

 

/*================================================================================

 [internal Functions]

=================================================================================*/

 

public clcmd_furia(taskid)

{

new id = ID_FURY

 

if(!is_user_alive(id) || !is_user_connected(id)|| !zp_get_user_zombie(id) || zp_get_user_nemesis(id) || zp_get_user_zombie_class(id) != g_zclassid)

return PLUGIN_HANDLED

 

if(g_veces[id] > 0)

{

g_veces[id] = g_veces[id] -1

 

set_task(0.1, "effects", id+TASK_FURY, _, _, "b")

i_fury_time[id] = get_pcvar_num(cvar_furytime)

 

set_task(1.0, "ShowHUD", id+TASK_FURY, _, _, "a", i_fury_time[id])

 

emit_sound(id, CHAN_STREAM, fury, 1.0, ATTN_NORM, 0, PITCH_HIGH)

}

else

{

client_print(id, print_chat, "[Zombi Cerberus] Furia A Fost Epuizata.")

return PLUGIN_HANDLED

}

 

return PLUGIN_HANDLED

}

 

public effects(id)

{

if(!is_user_alive(id) || !is_user_connected(id)|| !zp_get_user_zombie(id) || zp_get_user_nemesis(id) || zp_get_user_zombie_class(id) != g_zclassid)

return

 

static origin[3]

get_user_origin(id, origin)

 

message_begin(MSG_PVS, SVC_TEMPENTITY, origin)

write_byte(TE_PARTICLEBURST) // TE id

write_coord(origin[0]) // x

write_coord(origin[1]) // y

write_coord(origin[2]) // z

write_short(130) // radius

write_byte(70) // color

write_byte(3) // duration (will be randomized a bit)

message_end()

 

message_begin(MSG_PVS, SVC_TEMPENTITY, origin)

write_byte(TE_DLIGHT) // TE id

write_coord(origin[0]) // x

write_coord(origin[1]) // y

write_coord(origin[2]) // z

write_byte(22) // radius

write_byte(255) // r

write_byte(0) // g

write_byte(30) // b

write_byte(2) // life

write_byte(0) // decay rate

message_end()

 

set_user_godmode(id, 1)

 

set_task(get_pcvar_float(cvar_furytime), "remove_fury", id)

}

 

public ShowHUD(id)

{

if(is_user_alive(id))

{

i_fury_time[id] = i_fury_time[id] - 1;

set_hudmessage(200, 100, 0, -1.0, -0.46, 0, 1.0, 1.1, 0.0, 0.0, -1)

show_hudmessage(id, "Furie Zombi: %d", i_fury_time[id]+1)

}

else

{

remove_task(id+TASK_FURY)

}

}

 

public remove_fury(taskid)

{

new id = ID_FURY

 

remove_task(id+TASK_FURY)

 

set_user_godmode(id, 0)

emit_sound(id, CHAN_STREAM, normaly, 1.0, ATTN_NORM, 0, PITCH_HIGH)

}

 

public roundStart()

{

for(new i = 1; i <= g_maxplayers; i++)

{

i_fury_time = get_pcvar_num(cvar_furytime)

remove_task(i)

}

}

 


 


am aceasta clasa de zm infector care interzice grenda la moduri adica cand incepe un mod nu ii mai da grenada si as vrea sa fie ca aceta

#include <amxmodx> 


#include <cstrike> 

#include <fun> 

#include <zombie_plague_special>

#include <zombiexp> 

 

// Zombie Attributes 

new const zclass_name[] = { "Infectorul" } // name 

new const zclass_info[] = { "\rLa Fiecare Runda Primeste 1 HE" } // description 

new const zclass_model[] = { "infector_ZM" } // model 

new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model 

const zclass_health = 10100 // health 

const zclass_speed = 730 // speed 

const Float:zclass_gravity = 0.6 // gravity 

const Float:zclass_knockback = 1.0 // knockback 

const zclass_level = 12 // level required to use 

 

new g_zclassid, Ammo 

 

public plugin_init(){ 

Ammo = register_cvar("zp_infecter_amt", "1") 


 

public plugin_precache() 


register_plugin("[ZP] Zombie Class: Infecter Zombie", "1.2", "Zombiezzz") 

 

// Register the new class and store ID for reference 

g_zclassid = zpxp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback, zclass_level) 


 

public zp_user_infected_post(id, infector) 


if (zp_get_user_zombie_class(id) == g_zclassid && !zp_get_user_nemesis(id)) 


client_print(id, print_chat, "[ZP] Zombie Infector Nu Primeste Grenada La Moduri!") 

if(zp_is_nemesis_round() || zp_is_survivor_round() || zp_is_assassin_round() || zp_is_sniper_round() || zp_is_predator_round() || zp_is_bombardier_round() || zp_is_dragon_round() || zp_is_berserker_round() || zp_is_wesker_round() || zp_is_spy_round()) 


client_print(id, print_chat, "[ZP] Nu primesti grenada la moduri !!!") 

return PLUGIN_HANDLED 

}else{ 

give_item (id, "weapon_hegrenade") 

set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,300) 

cs_set_user_bpammo(id, CSW_HEGRENADE, get_pcvar_num(Ammo)) 



return PLUGIN_HANDLED 


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE 

*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } 

*/ 

public zp_user_humanized_post(id) 


if (zp_get_user_zombie_class(id) != g_zclassid) return; 

 

//user turned human 

zp_round_started_human(id); 


 

public zp_round_started_human(id) 


if (zp_get_user_zombie_class(id) != g_zclassid) return; 

 

// User turned human 

// Undo any additional changes we have made here 

 

 


 


 


Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...