Raised This Month: $ Target: $400
 0% 

meTaLiCroSS help me


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rhyme
Member
Join Date: Aug 2010
Location: Russia (Moscow)
Old 08-18-2010 , 10:40   meTaLiCroSS help me
Reply With Quote #1

do (add) please make this plugin was in fact someone bought, it
yet that it was 1 round, if (infected, death, turn in survivor,
nemesis), speed disappears,
this plugin gives speed knife (rate x2) and 500 armor
idea was got from meTaLiCroSS
-----------------------------------------------------------------------------
Quote:
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <hamsandwich>
#include <zombieplague>
#include <fun>

//Variables
new g_sh

//Cvar pointers
new cvar_pattack_rate, cvar_sattack_rate

//Offsets
const m_pPlayer = 41
const m_flNextPrimaryAttack = 46
const m_flNextSecondaryAttack = 47
const m_flTimeWeaponIdle = 48

public plugin_init()
{
register_plugin("[ZP] Extra Item: Speed Hammer", "0.1", "Rhyme")
g_sh = zp_register_extra_item("Speed Hammer (+armor)", 15, ZP_TEAM_HUMAN)

//Cvars
cvar_pattack_rate = register_cvar("zp_sh_attack1_rate", "0.3")
cvar_sattack_rate = register_cvar("zp_sh_attack2_rate", "0.7")

//Ham forwards
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_knife", "fw_Knife_PrimaryAttack_Post", 1)
RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fw_Knife_SecondaryAttack_Post", 1)

}

public zp_extra_item_selected(player, itemid)
{
if (itemid ==g_sh)
{
set_user_armor(player, 500)
give_item(player, "weapon_knife")
}
}

public fw_Knife_PrimaryAttack_Post(knife)
{

{
// Get new fire rate
static Float:flRate
flRate = get_pcvar_float(cvar_pattack_rate)

// Set new rates
set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4)
set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4)
set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4)
}

return HAM_IGNORED
}

public fw_Knife_SecondaryAttack_Post(knife)
{
{
// Get new fire rate
static Float:flRate
flRate = get_pcvar_float(cvar_sattack_rate)

// Set new rates
set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4)
set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4)
set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4)
}

return HAM_IGNORED
}

Last edited by Rhyme; 08-18-2010 at 10:45.
Rhyme is offline
Send a message via ICQ to Rhyme Send a message via Skype™ to Rhyme
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 21:05.


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