Raised This Month: $ Target: $400
 0% 

free kevlar only admins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
bibu
Veteran Member
Join Date: Sep 2010
Old 12-24-2011 , 17:57   Re: free kevlar only admins
Reply With Quote #3

It is this plugin, and I modified it, that it effects just admins. So you can see the cvars from the link.

http://forums.alliedmods.net/showthread.php?p=806660

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define SetUserAdmin(%1)    g_bAdmin |= 1<<(%1 & 31)
#define ClearUserAdmin(%1)    g_bAdmin &= ~( 1<<(%1 & 31))
#define IsUserAdmin(%1)        ( g_bAdmin &  1<<(%1 & 31))

new g_bAdmin;

new 
gCvarArmor;
new 
gCvarAmount;

public 
plugin_init() {
    
register_plugin"Admin Spawn with Armor""1.0""xPaw" );
    
    
gCvarArmor register_cvar"sv_armor",    "2" );
    
gCvarAmount register_cvar"sv_armor_amount",    "100" );
    
    
RegisterHamHam_Spawn"player""fwdPlayerSpawn");
}

public 
client_authorized(id)
{
    if(
is_user_admin(id))
    {
        
SetUserAdmin(id)
    }
    else
    {
        
ClearUserAdmin(id)
    }
}

public 
fwdPlayerSpawnid ) {
    if( 
is_user_aliveid ) && IsUserAdminid ) ) {
        new 
iPluginArmorType clampget_pcvar_numgCvarArmor ), 0);
        
        if( 
iPluginArmorType ) {
            new 
CsArmorType:iPlayerArmorType;
            new 
iPlayerAmount cs_get_user_armoridiPlayerArmorType );
            new 
iPluginAmount minget_pcvar_numgCvarAmount ), 0xFF );

            
cs_set_user_armoridmaxiPluginAmountiPlayerAmount ), CsArmorType:maxiPluginArmorType_:iPlayerArmorType ) );
        }
    }

__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
 



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 20:54.


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