Raised This Month: $ Target: $400
 0% 

Help me to make it works...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hueyjie
Junior Member
Join Date: Oct 2009
Location: Internet
Old 11-26-2009 , 22:50   Help me to make it works...
Reply With Quote #1

I am trying to make a zombie class that can drain speed from the human it infected, so I edited the source file for leech zombie. There is no error but the zombie can't drain speed from human it infects. Can someone teach me how to make it works? To compile this, you need to have the zombieplague.inc in your include folder.
Thanks.

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

// Speed Zombie Attributes
new const zclass_name[] = "Speed Stealer Zombie" // name
new const zclass_info[] = "Drains human speed." // description
new const zclass_model[] = "zombie_source" // model
new const zclass_clawmodel[] = "v_knife_zombie.mdl" // claw model
const zclass_health 1350 // health
const zclass_speed 190 // speed
const Float:zclass_gravity 1.0 // gravity
const Float:zclass_knockback 1.0 // knockback
const zclass_infectspeed 240 // extra speed for infections

/*===============================================================================*/

// Class IDs
new g_zclass_speedstealer

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
    
register_plugin("[ZP] Speed Zombie Class""1.0 Beta""hueyjie")
    
    
// Register the new class and store ID for reference
    
g_zclass_speedstealer zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)    
}

// User Infected forward
public zp_user_infected_post(idinfector)
{
    
// If attacker is a speed zombie, gets extra 240 speed
    
if (zp_get_user_zombie_class(infector) == g_zclass_speedstealer)
        
set_pev(infectorpev_speedfloat(pev(infectorpev_speed) + zclass_infectspeed))

Attached Files
File Type: sma Get Plugin or Get Source (zp_zclass_speed_drainer.sma - 407 views - 1.8 KB)
File Type: inc zombieplague.inc (12.0 KB, 48 views)
hueyjie is offline
 


Thread Tools
Display Modes

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 13:43.


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