Raised This Month: $ Target: $400
 0% 

[HELP] Zombie Plague Hitboxes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 11-07-2009 , 01:43   [HELP] Zombie Plague Hitboxes
Reply With Quote #1

Ok i tried to set a zombie(headcrab) to left and right legs but it still doesn't work. Is there anything wrong with this?
Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <fun>

#define PLUGIN "[ZP] Class : Head Crab"
#define VERSION "0.1"
#define AUTHOR "~007~"
new g_zclass_headcrab

// Head Crab Attributes
new const zclass_name[] = "Head Crab" // name
new const zclass_info[] = "Small and vicious" // description
new const zclass_model[] = "headcrab" // model
new const zclass_clawmodel[] = "v_knife_headcrab.mdl" // claw model
const zclass_health = 1800 // health
const zclass_speed = 190 // speed
const Float:zclass_gravity = 1.0 // gravity
const Float:zclass_knockback = 1.0 // knockback

public plugin_init()
{    
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")

    set_user_hitzones(0, 0, 192);

}

public plugin_precache()
{
    precache_model("models/player/headcrab/headcrab.mdl")
    g_zclass_headcrab = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}

public fw_PlayerPreThink(player)
{
    if(!is_user_alive(player))
        return FMRES_IGNORED
        
    if(zp_get_user_zombie(player) && zp_get_user_zombie_class(player) == g_zclass_headcrab)
        set_pev(player, pev_flTimeStepSound, 999)
        
    return FMRES_IGNORED
}

public zp_user_infected_post(id, infector)
{
    if (zp_get_user_zombie_class(id) == g_zclass_headcrab)
    {
        client_print(id, print_chat, "[ZP] You are currently using Head Crab.")
    }
}
set_user_hitzones(0, 0, 192); 192 = 64(left leg) + 128(right leg)
Excalibur.007 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 17:32.


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