ZP Class: Fleshpound
Posted: 14 Mar 2019, 20:09
Descriere: Acest zombie are speed cand apasati pe E ,e un fel de madness cu viteza.
Descarcare: LINK RESURSE!
Nume: ZP Class: Fleshpound
Versiune: 0.1
Link oficial: click
Instalare:
1. Fisierul zp_zclass_fleshpound.sma il puneti in addons/amxmodx/scripting
2. Fisierul zp_zclass_fleshpound.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins-zplague.ini si adaugati la urma:
4. Alti pasi necesari....
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
zp_fleshpound_cooldown 15.0 (cat timp dureaza sa se reincarce)
Imagini: -
Descarcare: LINK RESURSE!
Code: Select all
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <zombieplague>
// Task offsets
enum (+= 100) {
TASK_AURA
}
#define ID_AURA (taskid - TASK_AURA)
// Fleshpound Zombie
new const zclass_name[] = { "Zombie Fleshpound" }
new const zclass_info[] = { ">> Have Rage <<" }
new const zclass_model[] = { "Fleshpound" }
new const zclass_clawmodel[] = { "v_fleshpound_claws.mdl" }
const zclass_health = 2100
const zclass_speed = 190
const Float:zclass_gravity = 1.0
const Float:zclass_knockback = 1.0
new g_Rage[] = "zombie_plague/fleshpound_rage.wav"
// Cooldown hook
new Float:g_iLastFury[33]
new g_speed[33]
new r, g, b
new g_maxplayers
new cvar_fury_cooldown
new g_KfFleshpound
public plugin_init()
{
register_plugin("[ZP] ZP Class: Zombie Fleshpound", "0.1", "DJHD!")
cvar_fury_cooldown = register_cvar("zp_fleshpound_cooldown", "15.0")
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
register_forward(FM_PlayerPreThink, "client_prethink")
register_logevent("roundStart", 2, "1=Round_Start")
g_maxplayers = get_maxplayers()
}
public plugin_precache()
{
g_KfFleshpound = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
precache_sound(g_Rage)
}
public zp_user_infected_post(id, infector)
{
if (zp_get_user_zombie_class(id) == g_KfFleshpound)
{
if(zp_get_user_nemesis(id))
return
print_chatColor(id, "\g[ZP]\n To use your rage press \g^"E^"\n.")
r = 255
g = 255
b = 0
set_task(0.1, "fleshpound_aura", id+TASK_AURA, _, _, "b")
}
}
public zp_user_humanized_post(id)
{
remove_task(id+TASK_AURA)
g_speed[id] = 0
}
public client_disconnect(id)
remove_task(id+TASK_AURA)
// Ham Player Spawn Post Forward
public fw_PlayerSpawn_Post(id)
{
// Not alive or didn't join a team yet
if (!is_user_alive(id) || !cs_get_user_team(id))
return;
// Remove previous tasks
remove_task(id+TASK_AURA)
}
public fw_PlayerPreThink(id)
{
if(!is_user_alive(id))
return;
static iButton; iButton = pev(id, pev_button)
static iOldButton; iOldButton = pev(id, pev_oldbuttons)
if(zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_KfFleshpound) && !zp_get_user_nemesis(id))
{
if((iButton & IN_USE) && !(iOldButton & IN_USE))
MakeRage(id)
}
}
public MakeRage(id)
{
if(get_gametime() - g_iLastFury[id] < get_pcvar_float(cvar_fury_cooldown))
{
print_chatColor(id, "\g[ZP]\n Wait \g%.1f\n seconds, to return to rage.", get_pcvar_float(cvar_fury_cooldown)-(get_gametime() - g_iLastFury[id]))
return PLUGIN_HANDLED
}
g_iLastFury[id] = get_gametime()
r = 255
g = 0
b = 0
g_speed[id] = 1
emit_sound(id, CHAN_STREAM, g_Rage, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
set_task(5.0, "normal", id)
return PLUGIN_HANDLED
}
public normal(id)
{
r = 255
g = 255
b = 0
g_speed[id] = 0
print_chatColor(id, "\g[ZP]\n You're back to normal.")
}
public client_prethink(id)
{
if (zp_get_user_zombie_class(id) == g_KfFleshpound)
{
if(is_user_alive(id) && zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_KfFleshpound) && !zp_get_user_nemesis(id))
Action(id)
}
}
public Action(id)
{
if(g_speed[id] == 1)
{
set_pev(id, pev_maxspeed, 650.0)
}
else if(g_speed[id] == 0)
{
set_pev(id, pev_maxspeed, 190.0)
}
return PLUGIN_HANDLED;
}
// Fleshpound aura task
public fleshpound_aura(taskid)
{
if(!is_user_alive(ID_AURA))
{
// Task not needed anymore
remove_task(taskid);
return;
}
if(zp_get_user_nemesis(ID_AURA))
{
// Task not needed anymore
remove_task(taskid);
return;
}
// Set aura for fleshpound
if (zp_get_user_zombie_class(ID_AURA) == g_KfFleshpound)
{
// Get player's origin
static origin[3]
get_user_origin(ID_AURA, origin)
// Colored Aura
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(13) // radius
write_byte(r) // r
write_byte(g) // g
write_byte(b) // b
write_byte(1) // life
write_byte(0) // decay rate
message_end()
}
else
{
// Task not needed anymore
remove_task(taskid);
return;
}
}
public roundStart()
{
for (new i = 1; i <= g_maxplayers; i++)
{
remove_task(i+TASK_AURA)
g_speed[i] = 0
}
}
stock print_chatColor(const id,const input[], any:...)
{
new msg[191], players[32], count = 1;
vformat(msg,190,input,3);
replace_all(msg,190,"\g","^4");// green
replace_all(msg,190,"\n","^1");// normal
replace_all(msg,190,"\t","^3");// team
if (id) players[0] = id; else get_players(players,count,"ch");
for (new i=0;i<count;i++)
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
*/
Versiune: 0.1
Link oficial: click
Instalare:
1. Fisierul zp_zclass_fleshpound.sma il puneti in addons/amxmodx/scripting
2. Fisierul zp_zclass_fleshpound.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins-zplague.ini si adaugati la urma:
Code: Select all
zp_zclass_fleshpound.amxx
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
zp_fleshpound_cooldown 15.0 (cat timp dureaza sa se reincarce)
Imagini: -