Raised This Month: $ Target: $400
 0% 

[ZP] Zombie Class: Blinding Zombie


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 10-25-2010 , 00:58   Re: [ZP] Zombie Class: Blinding Zombie
Reply With Quote #1

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

new const zclass_name[] = "Blinding Zombie"
new const zclass_info[] = "Blinding humans" 
new const zclass_model[] = "zombie_source" 
new const zclass_clawmodel[] = "v_knife_zombie.mdl" 
const zclass_health 1800 
const zclass_speed 200 
const Float:zclass_gravity 1.0 
const Float:zclass_knockback 1.0 

new g_blindergmsgFadecvar_fadecolorcvar_fadealphafadealpha

public plugin_init()
{
    
register_event("StatusValue""EventStatusValue""b""1>0""2>0" );
    
    
//                                               RRR, GGG, BBB format
    
cvar_fadecolor register_cvar("zp_blinding_color""10 150 10")
    
cvar_fadealpha register_cvar("zp_blinding_alpha""250")
    
    
gmsgFade get_user_msgid("ScreenFade")
}

public 
plugin_precache()
{
    
register_plugin("[ZP] Extra Class: Blinding Zombie""0.1""fiendshard")
    
g_blinder zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)    
}

public 
plugin_cfg()
{
    
fadealpha get_pcvar_num(cvar_fadealpha)
}

public 
EventStatusValue( const id 
{
    if(!
is_user_bot(id) && is_user_connected(id) && !zp_get_user_zombie(id))     
    {
        new 
blinder read_data(2)
        
        if(
zp_get_user_zombie_class(blinder) == g_blinder)
            
blind(id)
    }
}

public 
blind(id)
{
    new 
szColor[12], szRed[4], szGreen[4], szBlue[4]
    
get_pcvar_string(cvar_fadecolorszColor11)
    
parse(szColorszRed3szGreen3szBlue4)

    new 
iRed clamp(str_to_num(szRed), 0255)
    new 
iGreen clamp(str_to_num(szGreen), 0255)
    new 
iBlue clamp(str_to_num(szBlue) , 0255)
    
    
message_begin(MSG_ONE_UNRELIABLEgmsgFade, {000}, id)
    
write_short(1<<2// fade duration 
    
write_short(1<<11// fade hold time 
    
write_short(1<<12// fade type (in / out) 
    
write_byte(iRed//  red 
    
write_byte(iGreen//  green 
    
write_byte(iBlue// blue 
    
write_byte(fadealpha//  alpha 
    
message_end()

???
Excalibur.007 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 16:26.


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