Descarcare:
Code: Select all
/*
[ZP] Class : Mega Jumper Zombie
(new zombie class)
by Fry!
Description :
This is new zombie class but this zombie can Jump very high even on the highest building, however jumps are limited so use them wisely.
Note :
If you want to use this class for admins only comment out this //#define FOR_ADMINS
Cvars :
zp_super_jumper_zombie_maxjumps "50" - How much you can jump per round.
Credits :
twistedeuphoria - for his Multi Jump plugin
Changelog :
10/10/2008 - v1.0 - First test
17/10/2008 - v1.1 - fixed that jumps worked only once in round, rewrited half of code, removed unnecessary code/lines, changed plugin and zombie name. ^^
06/11/2008 - v1.1.2 - fixed bug that mega jump works for all zombie classes, changed plugin name.
07/11/2008 - v1.1.3 - fixed last bug that jumps work for humans not for zombie class.
26/12/2008 - v1.1.6 - removed chat message, fixed admin acces... Admins with flag A can use it already, fixed plugin crash.
27/12/2008 - v1.1.8 - fixed my mistake that this zombie was only for admins, added simple way to use it for admins just comment out #define FOR_ADMINS.
18/07/2009 - v1.2.4 - changed zombie and plugin name, fixed none working cvar, fixed now jumps are limited per round, added chat message how much jumps you have left, added chat message if this class is for admins only, dropped engine and using fakemeta instead.
*/
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <zombieplague>
#define PLUGIN "[ZP] Class : Super Jumper Zombie"
#define VERSION "1.2.4"
#define AUTHOR "Fry!"
//#define FOR_ADMINS
#if defined FOR_ADMINS
#define ADMINACCESS ADMIN_LEVEL_A
#endif
new const zclass_name[] = "Jumper Zombie"
new const zclass_info[] = ">> 50 JUMPURI <<"
new const zclass_model[] = "zombie_source"
new const zclass_clawmodel[] = "v_knife_zombie.mdl"
const zclass_health = 8500
const zclass_speed = 280
const Float:zclass_gravity = 0.6
const Float:zclass_knockback = 0.5
new Jumpnum[33] = false
new bool:canJump[33] = false
new g_zclass_super_jumper, g_super_jumper_maxjumps
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("zp_zclass_mega_jumper_zombie",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
g_super_jumper_maxjumps = register_cvar("zp_super_jumper_zombie_maxjumps", "50")
register_forward(FM_PlayerPreThink, "fm_PlayerPreThink")
register_forward(FM_PlayerPostThink, "fm_PlayerPostThink")
}
public plugin_precache()
{
g_zclass_super_jumper = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
public client_putinserver(id)
{
Jumpnum[id] = 0
canJump[id] = false
}
public client_disconnect(id)
{
Jumpnum[id] = 0
canJump[id] = false
}
public zp_user_infected_post(player, infector)
{
if (zp_get_user_zombie_class(player) == g_zclass_super_jumper)
{
canJump[player] = true
Jumpnum[player] = true
}
}
public fm_PlayerPreThink(id)
{
if (!is_user_alive(id) || !zp_get_user_zombie(id))
return FMRES_IGNORED
if (zp_get_user_zombie_class(id) != g_zclass_super_jumper)
return FMRES_IGNORED
#if defined FOR_ADMINS
if ( !( get_user_flags(id) & ADMINACCESS) )
{
client_print(id, print_chat, "[ZP] Sorry, but this class is available for admins only")
return FMRES_IGNORED
}
#endif
new nbut = pev(id, pev_button)
new obut = pev(id, pev_oldbuttons)
if ((nbut & IN_JUMP) && !(pev(id, pev_flags) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if (Jumpnum[id] < get_pcvar_num(g_super_jumper_maxjumps))
{
canJump[id] = true
Jumpnum[id]++
client_print(id, print_chat, "[ZP] You did %d of %d jumps", Jumpnum[id], get_pcvar_num(g_super_jumper_maxjumps))
}
else
{
client_print(id, print_chat, "[ZP] You did max jumps in this round")
}
}
else if ((nbut & IN_JUMP) && !(pev(id, pev_flags) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if (Jumpnum[id] == get_pcvar_num(g_super_jumper_maxjumps) || (nbut & IN_JUMP))
{
canJump[id] = false
Jumpnum[id] = false
}
}
return FMRES_IGNORED
}
public fm_PlayerPostThink(id)
{
if (!is_user_alive(id) || !zp_get_user_zombie(id))
return FMRES_IGNORED
if (zp_get_user_zombie_class(id) != g_zclass_super_jumper)
return FMRES_IGNORED
#if defined FOR_ADMINS
if ( !( pev(id, pev_flags) & ADMINACCESS) )
{
client_print(id, print_chat, "[ZP] Sorry, but this class is only available for admins")
return FMRES_IGNORED
}
#endif
if (canJump[id] == true)
{
new Float:velocity[3]
pev(id, pev_velocity, velocity)
velocity[2] = random_float(265.0,285.0)
set_pev(id, pev_velocity, velocity)
canJump[id] = false
return FMRES_IGNORED
}
return FMRES_IGNORED
}
Versiune: -
Link oficial:
Instalare:
1. Fisierul zp_zclass_super_jumper_zombie.sma il puneti in addons/amxmodx/scripting
2. Fisierul zp_zclass_super_jumper_zombie.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_super_jumper_zombie.amxx
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
zp_super_jumper_zombie_maxjumps 50 (aici il setati cat vreti)
Imagini: -