Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Armor Free


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vechta
Veteran Member
Join Date: Jun 2010
Old 12-10-2010 , 14:04   Re: [ZP] Armor Free
Reply With Quote #1

Here you have

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <zombieplague>

#define ACCESS ADMIN_LEVEL_H

new cvar_armor_valueg_SayText
 
new sound_armor[] = { "items/tr_kevlar.wav" }
 
public 
plugin_init() 
{
    
register_plugin("[ZP] Free Armor for Admins""1.0""Vechta")
    
    
RegisterHam(Ham_Spawn"player""fw_Give_Armor"1)
    
cvar_armor_value register_cvar("zp_armor""200")
    
    
g_SayText get_user_msgid("SayText")
}

public 
fw_Give_Armor(id)
{
    if (
is_user_alive(id) && !zp_get_user_zombie(id))
    {
        if (
get_user_flags(id) & ACCESS)
        {
            
set_user_armor(idget_pcvar_num(cvar_armor_value))
            
ColorPrint(id"^x04[ZP]^x01 You got^x04 %i^x01Armor!"get_pcvar_num(cvar_armor_value))
            
client_cmd(id"spk %s"sound_armor)
        }
    }
}
  

stock ColorPrint(const id, const input[], any:...)
{
    if( !
is_user_connectedid ) )
        return

    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!y""^1")
    
replace_all(msg190"!t""^3")
    
    
message_begin(MSG_ONE_UNRELIABLEg_SayText_id)
    
write_byte(id)
    
write_string(msg)
    
message_end()


Last edited by Vechta; 12-10-2010 at 14:07.
Vechta is offline
Reply



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 15:36.


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