Raised This Month: $ Target: $400
 0% 

event_round_start dont work (?)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 03-24-2009 , 18:48   event_round_start dont work (?)
Reply With Quote #1

hello , i made this code [credits to connormcleod]
but when round end i still have fast attack rate whit knife
please someone fix it

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

#define PLUGIN "[ZP] Extra Item: Carnicero!"
#define VERSION "1.0"
#define AUTHOR "AlejandroSk & alan_el_more credits ConnorMcLeod"

#define    m_flNextPrimaryAttack    46 
#define    m_flNextSecondaryAttack    47 
#define    m_flTimeWeaponIdle        48 

new g_itemid1bool:g_HasCarnicero[33]
new 
cvar_attack1ratecvar_attack2ratecvar_costcvar_togglecvar_message

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
cvar_cost register_cvar("zp_carnicero_cost""15")
    
cvar_toggle register_cvar("zp_carnicero_enabled""1")
    
cvar_attack1rate register_cvar("zp_carnicero_attack1_rate""0.1")
    
cvar_attack2rate register_cvar("zp_carnicero_attack2_rate""0.8")
    
cvar_message register_cvar("zp_carnicero_hudmessage""1")
    
g_itemid1 zp_register_extra_item("Carnicero"get_pcvar_num(cvar_cost), ZP_TEAM_HUMAN)
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_knife""Knife_PrimaryAttack"1
    
RegisterHam(Ham_Weapon_SecondaryAttack"weapon_knife""Knife_SecondaryAttack"1)
}

public 
client_connect(id)
{
    
g_HasCarnicero[id] = false
}

public 
zp_extra_item_selected(iditemid)
{
    if (
itemid == g_itemid1)
    {
        if (
get_pcvar_num(cvar_toggle))
        {
            
        
g_HasCarnicero[id] = true
        client_print
(id,print_chat"Te Convertiste En Un Carnicero!")
        
fm_set_user_armor(id500)
        new 
name[32]
        
get_user_name(idname31)
        if (
get_pcvar_num(cvar_message))
        {
        
set_hudmessage(255000.030.4306.012.0)
        
show_hudmessage(id":: %s Se Ha Comprado Un Carnicero ::"name)
        }
        
        }
    }
}

public 
Knife_PrimaryAttackiEnt 

    static 
Float:flRate flRate get_pcvar_float(cvar_attack1rate)
    static 
id id peviEnt pev_owner );
    
    if (!
g_HasCarnicero[id] == true)
    {
    
set_pdata_float(iEntm_flNextPrimaryAttack1.04
    
set_pdata_float(iEntm_flNextSecondaryAttack1.04
    
set_pdata_float(iEntm_flTimeWeaponIdle1.04
    }
    else {
        
set_pdata_float(iEntm_flNextPrimaryAttackflRate4
        
set_pdata_float(iEntm_flNextSecondaryAttackflRate4
        
set_pdata_float(iEntm_flTimeWeaponIdleflRate4
    }


public 
Knife_SecondaryAttackiEnt )

    static 
Float:flRate flRate get_pcvar_float(cvar_attack2rate)
    static 
id id peviEnt pev_owner )
    
    if (!
g_HasCarnicero[id] == true)
    {
    
set_pdata_float(iEntm_flNextPrimaryAttack1.04
    
set_pdata_float(iEntm_flNextSecondaryAttack1.04
    
set_pdata_float(iEntm_flTimeWeaponIdle1.04)
    }
    else {
        
set_pdata_float(iEntm_flNextPrimaryAttackflRate4
        
set_pdata_float(iEntm_flNextSecondaryAttackflRate4
        
set_pdata_float(iEntm_flTimeWeaponIdleflRate4)
    }
}
    
public 
event_round_start(id)
{
    
g_HasCarnicero[id] = false
}
        
stock fm_set_user_armor(indexarmor
{
    
set_pev(indexpev_armorvaluefloat(armor));

AlejandroSk is offline
Send a message via MSN to AlejandroSk
 



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 08:52.


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