AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   free kevlar only admins (https://forums.alliedmods.net/showthread.php?t=174750)

unscarred 12-24-2011 17:02

free kevlar only admins
 
hi all
someone can make plugin admins respaw with kevlar ?
thx
*zombie plague server

OxfordL 12-24-2011 17:43

Re: free kevlar only admins
 
You are on the wrong section.. Go to Suggestions/Requests

bibu 12-24-2011 17:57

Re: free kevlar only admins
 
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 ) );
        }
    }



unscarred 12-24-2011 18:37

Re: free kevlar only admins
 
thank u brother !!
i tested now, work fine
:wink:


All times are GMT -4. The time now is 20:54.

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