Raised This Month: $ Target: $400
 0% 

hats only for admin level h


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
LightScribe16
Junior Member
Join Date: Jul 2011
Old 11-27-2011 , 17:02   hats only for admin level h
Reply With Quote #1

Hello all, i need make this plugin to work that hats should be only those who have t flag (ADMIN_LEVEL_H)

here is source
PHP Code:
#include <amxmodx> 
#include <fakemeta> 
#include <hamsandwich> 

new g_Enable;
new 
g_bwEnt[33];
new 
g_CachedStringInfoTarget;

public 
plugin_init() {
    
register_plugin"Santa Hat""1.2""xPaw" );
    
register_cvar("santa_hat""1.2"FCVAR_SERVER);
    
g_Enable register_cvar("amx_santahat""1");

    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1);
    
g_CachedStringInfoTarget engfuncEngFunc_AllocString"info_target" );
}

public 
plugin_precache()
    
precache_model("models/santa_hat.mdl");

public 
fwHamPlayerSpawnPost( const player ) {
    if ( 
get_pcvar_numg_Enable ) && is_user_aliveplayer ) ) {
        new 
iEnt g_bwEntplayer ];
        if( !
pev_validiEnt ) ) {
            
g_bwEntplayer ] = iEnt engfunc EngFunc_CreateNamedEntityg_CachedStringInfoTarget );
            
set_peviEntpev_movetypeMOVETYPE_FOLLOW );
            
set_peviEntpev_aimentplayer );
            
engfuncEngFunc_SetModeliEnt"models/santa_hat.mdl" );
        }
    }

LightScribe16 is offline
Send a message via Skype™ to LightScribe16
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode