Thread: [Suggestion / Subplugin Request] [REQ/HELP] VIP Model on ADMIN_LEVEL_H
View Single Post
WaLkMaN
Senior Member
Join Date: Oct 2010
Location: Varna, Bulgaria
Old 11-02-2014 , 12:42   Re: [REQ/HELP] VIP Model on ADMIN_LEVEL_H
Reply With Quote #11

Did you try this https://forums.alliedmods.net/showthread.php?t=219011 ?

PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < zombieplague >

new g_pluginInfo[][] =
{
    
"[ZP] Addon: VIP Model",
    
"1.0",
    
"De{a}gLe"
};

#define IsPlayer(%0) ( 1 <= (%0) <= get_maxplayers() ) // Thank you Connor !

#define ACCESS_FLAG ADMIN_LEVEL_H

new const g_vipModelHuman[][] = { "vip" };

public 
plugin_precache()
{
    
register_pluging_pluginInfo[0], g_pluginInfo[1], g_pluginInfo[2] );
    
RegisterHamHam_Spawn"player""forwardClientSpawn_Post");
    
    static 
index;
    for (
index 0index sizeof g_vipModelHumanindex++ )
    {
        static 
patch[126];
        
formatexpatchsizeof patch"models/player/%s/%s.mdl"g_vipModelHuman[index], g_vipModelHuman[index] );
        
precache_modelpatch );
    }
}

public 
forwardClientSpawn_Postclientattackergib )
{    
    if ( 
IsPlayer(client) && (get_user_flags(client) & ACCESS_FLAG) )        
        
zp_override_user_modelclientg_vipModelHuman[random_num(0sizeof g_vipModelHuman  1)] );    
}

public 
zp_user_humanized_postclientsurvivor )
{
    if ( 
zp_get_user_survivor(client) )
        return 
ZP_PLUGIN_HANDLED;
        
    if ( 
IsPlayer(client) && (get_user_flags(client) & ACCESS_FLAG) )    
        
zp_override_user_modelclientg_vipModelHuman[random_num(0sizeof g_vipModelHuman  1)] );
        
    return 
PLUGIN_CONTINUE;


Last edited by WaLkMaN; 11-09-2014 at 14:02.
WaLkMaN is offline