Quote:
Originally Posted by zmd94
Just make sure you have zmvip.ini file in you include folder.
|
oh yes solve problem zm_vip.amxx not install on server
tnx for help
but i want if player not have flag this class off on menu and in front of menu show massage : you are not vip
plz help for edit plz plz
i edit this code but not worked:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <zombieplague>
#include <zp50_colorchat>
#include <zp50_class_nemesis>
#include <zp50_class_assassin>
#include <zp50_class_nightcrawler>
#include <zp50_class_dragon>
#include <zmvip>
#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_H
#endif
new const zclass_name[] = "Zombie Dragon"
new const zclass_info[] = "[Super Jump |60 Jump|]"
new const zclass_model[] = "zombie_dragon"
new const zclass_clawmodel[] = "v_dragon.mdl"
const zclass_health = 2000
const zclass_speed = 250
const Float:zclass_gravity = 1.0
const Float:zclass_knockback = 0.5
new Jumpnum[33] = false
new bool:canJump[33] = false
new g_zclass_super_jumper, g_super_jumper_maxjumps, g_ZombieClassID
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", "60")
register_forward(FM_PlayerPreThink, "fm_PlayerPreThink")
register_forward(FM_PlayerPostThink, "fm_PlayerPostThink")
}
public zv_fw_class_zombie_select_pre(id, classid) {
if (classid == g_ZombieClassID) {
if (zp_get_user_flags(id) == 0) {
zp_class_zombie_menu_text_add("*VIP* only!")
return ZP_CLASS_NOT_AVAILABLE;
}
else {
zp_class_zombie_menu_text_add("*VIP*")
return ZP_CLASS_AVAILABLE;
}
}
return ZP_CLASS_AVAILABLE;
}
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_disconnected(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 && !zp_get_user_nemesis(id) && !zp_class_assassin_get(id) && !zp_class_nightcrawler_get(id) && !zp_class_dragon_get(id))
return FMRES_IGNORED
#if defined FOR_ADMINS
if ( !( get_user_flags(id) & ADMIN_LEVEL_H) )
{
zp_colored_print(id, "^x03|Zombie Dragon|^x01 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 (zp_get_user_zombie_class(id) && !zp_get_user_nemesis(id) && !zp_class_assassin_get(id) && !zp_class_nightcrawler_get(id) && !zp_class_dragon_get(id))
{
if (Jumpnum[id] < get_pcvar_num(g_super_jumper_maxjumps))
{
canJump[id] = true
Jumpnum[id]++
zp_colored_print(id, "^x03|Zombie Dragon|^x01 You Did^x04 %d^x01 Of^x04 %d^x01 Jumps", Jumpnum[id], get_pcvar_num(g_super_jumper_maxjumps))
}
else
{
zp_colored_print(id, "^x03|Zombie Dragon|^x01 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) )
{
zp_colored_print(id, "^x03|Zombie Dragon|^x01 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
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
The following photos: