It is currently 15 Feb 2019 21:03






Reply to topic  [ 1 post ] 
 ZP Class: Cerberus Dog v.0.1 
Author Message
Manager servere
Manager servere
User avatar

Joined: 21 Jul 2015 18:50
Posts: 2516
Location: Bucuresti
Detinator Steam: Da
CS Status: Busy
Detinator server CS: ---
Reputatie: Fost moderator - suspendat pe perioada nedeterminata
Manager ZM
Fost Membru Club eXtreamCS (trei luni)
1 / 3
Fond eXtream: 0
Descriere: Acest zombie are puterea de a se enerva adica atunci cand se enerveaza prin tasta E gloantele nu-l mai afecteaza,e un fel de madness


Descarcare: LINK RESURSE!

| Afiseaza codul
#include <amxmodx>
#include <zombieplague>
#include <engine>
#include <fun>
#include <fakemeta>
#include <hamsandwich>

#define ID_FURY (taskid - TASK_FURY)

// Task offsets
enum (+= 100)
{
TASK_FURY
}

/*================================================================================
[Customizations]
=================================================================================*/

// Zombie Attributes
new const zclass10_name[] = { "Mummy Zombie"}
new const zclass10_info[] = { ">> Fury press[E] <<" }
new const zclass10_model[] = { "firy_mumia" }
new const zclass10_clawmodel[] = { "v_knife_zombie3.mdl" }

const zclass10_health = 10000
const zclass10_speed = 285

const Float:zclass10_gravity = 0.8
const Float:zclass10_knockback = 0.5

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_cerberus, 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", "5")
cvar_furytime = register_cvar("zp_cerberus_fury_time", "10.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_cerberus = zp_register_zombie_class(zclass10_name, zclass10_info, zclass10_model, zclass10_clawmodel, zclass10_health, zclass10_speed, zclass10_gravity, zclass10_knockback)

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_cerberus)
{
client_print(id, print_chat, "[ZP] You have %d fury to use press - ^"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_cerberus))
{
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_cerberus)
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, "[ZP] You dont have more fury.")
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_cerberus)
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, "Fury: %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[i] = get_pcvar_num(cvar_furytime)
remove_task(i)
}
}


Nume: ZP Class: Cerberus Dog
Versiune: v.0.1
Link oficial: click


Instalare:
1. Fisierul zp_zclass_cerberusdog.sma il puneti in addons/amxmodx/scripting
2. Fisierul zp_zclass_cerberusdog.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins-zplague.ini si adaugati la urma:
Code:
zp_zclass_cerberusdog.amxx

4. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
zp_cerberus_fury 5 (de cate ori o poate folosi)
zp_cerberus_fury_time 10.0 (cate secunde sa tina furia)


Imagini: -

_________________
Dai un vot aici !
Image
connect ZM.eXtreamCS.COM # OFFICIAL SERVER
Leul si tigru sunt mai puternici ca lupul,dar lupul la circ nu participa.
Image
Image


13 Feb 2019 13:04
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: Exabot [Bot] and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group