Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Class: Sniper Zombie [UpDATE!]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Zombie-rus
Senior Member
Join Date: Feb 2010
Location: Russia, Tomsk
Old 06-26-2010 , 06:25   [ZP] Class: Sniper Zombie [UpDATE!]
Reply With Quote #1

[ZP] Class: Sniper Zombie

This class is a zombie AWP with 10
bullet.
When hitting a bullet into the man he becomes a zombie too.


PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <cstrike>
#include <fun>

new g_zclassid1cvar_ammocvar_fov

new const model_weapon_mac10[] = "models/v_mac10.mdl"

new g_zombies_fov

public plugin_init()
{
    
register_plugin("[ZP] Class: Sniper Zombie""0.3""Zombie-rus")

    
cvar_ammo register_cvar("zp_ammo_bullets""0")
    
cvar_fov register_cvar("zp_class_fov""135")
}

public 
plugin_precache()
{
    
g_zclassid1 zp_register_zombie_class("Sniper Zombie""has mac10+""zombie_source""v_knife_zombie.mdl"12002201.01.0)

    
engfunc(EngFunc_PrecacheModelmodel_weapon_mac10)
}


public 
plugin_cfg()
{
    
g_zombies_fov get_cvar_pointer("zp_zombie_fov")
}

public 
zp_user_infected_post(idinfector)
{
    if (
zp_get_user_zombie_class(id) == g_zclassid1)
    {
        
strip_user_weapons(id)
        
give_item(id"weapon_mac10")
        
cs_set_user_bpammo(idCSW_MAC10get_pcvar_num(cvar_ammo))

        new 
weapon get_user_weapon(id)

        if (
weapon == CSW_MAC10)
        {
            
set_pev(idpev_viewmodel2model_weapon_mac10)
        }

        
msg_one_unreliable(id)
    }
}

public 
msg_one_unreliable(id)
{
    if (
zp_get_user_zombie_class(id) == g_zclassid1)
    {
        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SetFOV"), {0,0,0}, id)
        
write_byte(get_pcvar_num(cvar_fov))
        
message_end()
    }
    else 
    {
        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SetFOV"), {0,0,0}, id)
        
write_byte(g_zombies_fov// fov angle
        
message_end()
    }

Attached Files
File Type: sma Get Plugin or Get Source (zp_zclass_sniper.sma - 3367 views - 1.6 KB)
__________________
[ZP] Extra Item: Dynamite Zombie - completed

Last edited by Zombie-rus; 12-26-2010 at 00:49.
Zombie-rus 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 15:35.


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