Raised This Month: $ Target: $400
 0% 

[HELP] Zombie Plague Hitboxes


Post New Thread Reply   
 
Thread Tools Display Modes
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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-07-2009 , 05:58   Re: [HELP] Zombie Plague Hitboxes
Reply With Quote #2

I'm not sure it's a good idea to use this native, if I remember it's broken. You should try something like : http://forums.alliedmods.net/showthr...638#post585638
__________________
Arkshine is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 11-08-2009 , 04:25   Re: [HELP] Zombie Plague Hitboxes
Reply With Quote #3

Thanks for your information Arkshine. Testing now. I will edit this post when i tested it fully.
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 17:32.


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