Raised This Month: $51 Target: $400
 12% 

[REQ] Executioner item


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
myusername
Senior Member
Join Date: Aug 2012
Old 05-05-2013 , 12:05   [REQ] Executioner item
Reply With Quote #1

Hello allied coders. U all know executioner zombie right. Hes fast. So idea is when someone buys (only zombie) it he can attack fast 3-5sec.
__________________
Rest in piece.
myusername is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 05-06-2013 , 11:11   Re: [REQ] Executioner item
Reply With Quote #2

It shud be easy to code.. check the code from the original plugin..
Catastrophe is offline
being noob
Senior Member
Join Date: Jan 2012
Location: Hindustan!!
Old 05-06-2013 , 12:45   Re: [REQ] Executioner item
Reply With Quote #3

knife blink?
__________________
<3<3
being noob is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 05-07-2013 , 01:04   Re: [REQ] Executioner item
Reply With Quote #4

Original plugin =

Quote:
Executioner
-_- .... duh
Catastrophe is offline
myusername
Senior Member
Join Date: Aug 2012
Old 05-08-2013 , 12:21   Re: [REQ] Executioner item
Reply With Quote #5

Just give me a example ^-^
__________________
Rest in piece.
myusername is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 05-09-2013 , 14:12   Re: [REQ] Executioner item
Reply With Quote #6

Try

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <zp50_core>
#include <zp50_items>
#include <zp50_class_nemesis>
#include <zp50_class_survivor> 
#include <zp50_colorchat>

// weapon const
const OFFSET_WEAPONOWNER 41
const OFFSET_LINUX_WEAPONS 4
const m_flNextPrimaryAttack 46
const m_flNextSecondaryAttack 47

new g_bExecutioner[33]

new 
g_maxplayersitem_fastattack 

new cvar_Primarycvar_PrimarySpeedcvar_Secondarycvar_SecondarySpeed


public plugin_init() 
{
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_knife""fwd_Knife_PriAtk_Post"1)
    
RegisterHam(Ham_Weapon_SecondaryAttack"weapon_knife""fwd_Knife_SecAtk_Post"1)
    
    
cvar_Primary register_cvar("zp_executioner_pri""1")
    
cvar_PrimarySpeed register_cvar("zp_executioner_pri_speed""0.33")
    
cvar_Secondary register_cvar("zp_executioner_sec""1")
    
cvar_SecondarySpeed register_cvar("zp_executioner_sec_speed""0.33")
    
    
g_maxplayers get_maxplayers()

    
item_fastattack zp_items_register ("Fast Attack"1)    
    
}

 public 
zp_fw_items_select_pre(iditemidignorecost)
{
                
          if (
itemid == item_fastattack)
       {
                        
                if (
zp_class_nemesis_get(id) || !zp_core_is_zombie(id) || zp_class_survivor_get(id))
                  {
                                
                     return 
ZP_ITEM_DONT_SHOW;
                  }
       }
               
           return 
ZP_ITEM_AVAILABLE;
}  
    
public 
zp_fw_items_select_post(iditemidignorecost)
{
    if (
itemid == item_fastattack
    {
        
g_bExecutioner[id] = true
        set_task
(5.0"remove_fastattack"id)
        
zp_colored_print(id"^x04You have fast attack^x01");
    }
}

public 
zp_fw_core_infect_post(id)
{
    
g_bExecutioner[id] = false
}

public 
zp_fw_core_cure_post(id)
{
    
g_bExecutioner[id] = false
}

public 
fw_PlayerKilled(victimattackershouldgib)
{
    
g_bExecutioner[victim] = false
}

public 
zp_round_ended(winteam)
{
    for (new 
id=1id<=g_maxplayersid++)
        
g_bExecutioner[id] = false
}

public 
client_connect(id)
{
    
g_bExecutioner[id] = false

}
public 
fwd_Knife_PriAtk_Post(ent)
{

    if (!
get_pcvar_num(cvar_Primary))
        return 
HAM_IGNORED;
    
    static 
owner
    owner 
ham_cs_get_weapon_ent_owner(ent)
    
    if (!
g_bExecutioner[owner])
        return 
HAM_IGNORED
    
    
static Float:SpeedFloat:PrimaryFloat:Secondary
    Speed 
get_pcvar_float(cvar_PrimarySpeed)
    
Primary get_pdata_float(entm_flNextPrimaryAttackOFFSET_LINUX_WEAPONS) * Speed
    Secondary 
get_pdata_float(entm_flNextSecondaryAttackOFFSET_LINUX_WEAPONS) * Speed
    
    
if (Primary 0.0 && Secondary 0.0)
    {
        
set_pdata_float(entm_flNextPrimaryAttackPrimaryOFFSET_LINUX_WEAPONS)
        
set_pdata_float(entm_flNextSecondaryAttackSecondaryOFFSET_LINUX_WEAPONS)
    }
    
    return 
HAM_IGNORED;
}

public 
fwd_Knife_SecAtk_Post(ent)
{
    if (!
get_pcvar_num(cvar_Secondary))
        return 
HAM_IGNORED;
    
    static 
owner
    owner 
ham_cs_get_weapon_ent_owner(ent)
    
    if (!
g_bExecutioner[owner])
        return 
HAM_IGNORED
    
    
static Float:SpeedFloat:PrimaryFloat:Secondary
    Speed 
get_pcvar_float(cvar_SecondarySpeed)
    
Primary get_pdata_float(entm_flNextPrimaryAttackOFFSET_LINUX_WEAPONS) * Speed
    Secondary 
get_pdata_float(entm_flNextSecondaryAttackOFFSET_LINUX_WEAPONS) * Speed
    
    
if (Primary 0.0 && Secondary 0.0)
    {
        
set_pdata_float(entm_flNextPrimaryAttackPrimaryOFFSET_LINUX_WEAPONS)
        
set_pdata_float(entm_flNextSecondaryAttackSecondaryOFFSET_LINUX_WEAPONS)
    }
    
    return 
HAM_IGNORED;
}

public 
remove_fastattack(id)
{

g_bExecutioner[id] = false
zp_colored_print
(id"^x04You're fast attack is finished^x01")

}

stock ham_cs_get_weapon_ent_owner(entity)
{
    if (
pev_valid(entity) != 2)
        return 
0;
    
    return 
get_pdata_cbase(entityOFFSET_WEAPONOWNEROFFSET_LINUX_WEAPONS);


Last edited by wicho; 05-09-2013 at 16:24.
wicho is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 05-10-2013 , 00:30   Re: [REQ] Executioner item
Reply With Quote #7

Whose code is this ?
Catastrophe 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 19:58.


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