Thread: [Subplugin Submission] [ZP] List of VIP Zombie Classes
View Single Post
Night Wolf90
Member
Join Date: Jan 2016
Old 07-17-2016 , 07:34   Re: [ZP] List of VIP Zombie Classes
Reply With Quote #28

Quote:
Originally Posted by zmd94 View Post
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_jumperg_super_jumper_maxjumpsg_ZombieClassID

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
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(idclassid) {
    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_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_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(playerinfector)
{
    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(idpev_button)
    new 
obut pev(idpev_oldbuttons)
    
    if ((
nbut IN_JUMP) && !(pev(idpev_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(idpev_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(idpev_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(idpev_velocityvelocity)
        
velocity[2] = random_float(265.0,285.0)
        
set_pev(idpev_velocityvelocity)
        
        
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:
Attached Thumbnails
Click image for larger version

Name:	vip.png
Views:	90
Size:	95.4 KB
ID:	156246  

Last edited by Night Wolf90; 07-17-2016 at 07:36.
Night Wolf90 is offline