Thread: Request plugin.
View Single Post
Raul3w
Member
Join Date: Apr 2017
Old 06-22-2017 , 12:10   Re: Request plugin.
Reply With Quote #8

Quote:
Originally Posted by edon1337 View Post
PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >

#define ADMIN_FLAG ADMIN_RCON

new const g_szAdminModel[ ] = "yourmodel" ;

public 
plugin_init( ) {

    
register_plugin"Admin Model""1.0""DoNii" ) ;

    
register_forwardFM_SetClientKeyValue"fw_FMSetClientKeyValuePre") ;
    
    
RegisterHamHam_Spawn"player""fw_HamSpawnPost") ;
}

public 
plugin_precache( ) {

    new 
szModel64 ] ;
    
formatexszModelcharsmaxszModel ), "models/player/%s/%s.mdl"g_szAdminModelg_szAdminModel ) ;

    
precache_modelszModel ) ;
}

public 
fw_HamSpawnPostid ) {

    if( ! 
is_user_aliveid ) )
    return 
HAM_IGNORED ;

    if( ~ 
get_user_flagsid ) & ADMIN_FLAG )
    return 
HAM_IGNORED ;
    
    
set_user_infoid"model"g_szAdminModel ) ;

    return 
HAM_IGNORED ;
}

public 
fw_FMSetClientKeyValuePreiPlayer, const szBuffer[ ], const szKey[ ] ) {

    if( 
equalszKey"model" ) ) {

        if( 
get_user_flagsiPlayer ) & ADMIN_FLAG && get_user_teamiPlayer ) == ) {

            
set_user_infoiPlayer"model"g_szAdminModel ) ;
            return 
FMRES_SUPERCEDE ;
        }
    }
    
    return 
FMRES_IGNORED ;

God,

But I want to be the man's skin and skin cape.
http://imgur.com/UpJGRKF.png
Raul3w is offline