Raised This Month: $ Target: $400
 0% 

[REQ] Very Simple Plugin (I think) - Human Knife Zombie


Post New Thread Reply   
 
Thread Tools Display Modes
tempito
Senior Member
Join Date: Feb 2009
Location: Peru
Old 01-30-2014 , 18:47   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #31

it doesnt work with my zp, i guess is because of the old version that i am using, but thank you anyway (:
__________________
My very first zp server movie.
http://www.youtube.com/watch?v=yvTmlFr_Y-4 <- now with translation in english

tempito is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 01-31-2014 , 00:25   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #32

Maybe its cuz i added bot support which is not there in zp43.... try this....

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

#define PLUGIN "[ZP]Addon: Stab kill"
#define VERSION "1.0"
#define AUTHOR "Catastrophe"

new is_stab[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)

        
RegisterHam(Ham_Weapon_SecondaryAttack"weapon_knife""fw_secondary_attack_knife")

        
RegisterHam(Ham_TakeDamage"player""fw_damage")
       
}

public 
fw_damage(victiminflictorattackerFloat:damagedmgbits)

       if(!
is_user_alive(attacker) || !zp_get_user_zombie(victim) || zp_get_user_zombie(attacker) || zp_get_user_nemesis(victim))
       return

       new 
weaponb_part
       attacker 
get_user_attacker(victimweaponb_part)

       if(!
is_user_alive(attacker))
       return

       if(
weapon == CSW_KNIFE && b_part == HIT_HEAD && is_stab[attacker])
       {    
       
ExecuteHam(Ham_TakeDamagevictim0attackerfloat(get_user_health(victim)) + 1.0DMG_BULLET)
       
is_stab[attacker] = false
       
}
}

public 
fw_secondary_attack_knife(ent)
{
       if(!
pev_valid(ent))
       return

       new 
owner pev(entpev_owner)

       if(!
pev_valid(owner))
       return
       
       if(
is_user_alive(owner))
       {
           
is_stab[owner] = true
       
}              

__________________
You will find everything u need :-
Catastrophe is offline
tempito
Senior Member
Join Date: Feb 2009
Location: Peru
Old 02-02-2014 , 15:44   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #33

thanks again, its weird because it doesnt work for 4.3, thank you anyway (: I appreciate your help!
__________________
My very first zp server movie.
http://www.youtube.com/watch?v=yvTmlFr_Y-4 <- now with translation in english

tempito 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 12:39.


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