|
Member
|
06-22-2017
, 12:10
Re: Request plugin.
|
#8
|
Quote:
Originally Posted by edon1337
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_forward( FM_SetClientKeyValue, "fw_FMSetClientKeyValuePre", 0 ) ;
RegisterHam( Ham_Spawn, "player", "fw_HamSpawnPost", 1 ) ;
}
public plugin_precache( ) {
new szModel[ 64 ] ;
formatex( szModel, charsmax( szModel ), "models/player/%s/%s.mdl", g_szAdminModel, g_szAdminModel ) ;
precache_model( szModel ) ;
}
public fw_HamSpawnPost( id ) {
if( ! is_user_alive( id ) )
return HAM_IGNORED ;
if( ~ get_user_flags( id ) & ADMIN_FLAG )
return HAM_IGNORED ;
set_user_info( id, "model", g_szAdminModel ) ;
return HAM_IGNORED ;
}
public fw_FMSetClientKeyValuePre( iPlayer, const szBuffer[ ], const szKey[ ] ) {
if( equal( szKey, "model" ) ) {
if( get_user_flags( iPlayer ) & ADMIN_FLAG && get_user_team( iPlayer ) == 2 ) {
set_user_info( iPlayer, "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
|
|
|
|