Raised This Month: $ Target: $400
 0% 

Zp Extra Item Sword/knife With 1000 Damage With Specified Models..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shubhamgulati12
Senior Member
Join Date: Oct 2010
Location: Inida The Holy Place!!
Old 09-24-2012 , 06:22   Zp Extra Item Sword/knife With 1000 Damage With Specified Models..
Reply With Quote #1

Hi friends i want a plugin ..
As the topic tells , i want the same thing in the plugin i want an extra item named zp Sword With 1000 Damage or damage that can be edited with cvars..
And i can place my v_ and p_ models..
Thanks ..
__________________

Join Free File hosting - http://db.tt/VvebKSSW
[Free 2 GB cloud storage]
shubhamgulati12 is offline
DeMNiX
Veteran Member
Join Date: Nov 2011
Location: Russia
Old 09-24-2012 , 08:54   Re: Zp Extra Item Sword/knife With 1000 Damage With Specified Models..
Reply With Quote #2

Knife mode generator
http://zombie-mod.ru/services/cso-knife/
__________________
My channel with test codes
https://www.youtube.com/user/demnix03

Zombie Riot [Scenario & bots-zombie 11.11.2023]
https://youtu.be/8ZZan-aq2sc
DeMNiX is offline
shubhamgulati12
Senior Member
Join Date: Oct 2010
Location: Inida The Holy Place!!
Old 09-27-2012 , 05:46   Re: Zp Extra Item Sword/knife With 1000 Damage With Specified Models..
Reply With Quote #3

Quote:
Originally Posted by DeMNiX View Post
Thanks bro but i am facing a sad problem .. :
If i install this plugin i get a really sad problem that when we take this extra item we get a knife .
But when we go from a place higher in altitude to a place lower in altitude we cant land on the floor that
means i was floating in air
please i want normal gravity with it i tried doing gravity 800 in this plugin
Please someone suggest me a solution ... Scripting in attachment...
Thanks!!
Attached Files
File Type: sma Get Plugin or Get Source (1000 damage knife.sma - 575 views - 5.0 KB)
__________________

Join Free File hosting - http://db.tt/VvebKSSW
[Free 2 GB cloud storage]
shubhamgulati12 is offline
gogicaa
Veteran Member
Join Date: Aug 2011
Location: //
Old 09-27-2012 , 07:39   Re: Zp Extra Item Sword/knife With 1000 Damage With Specified Models..
Reply With Quote #4

I deleted gravity function. try it.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <xs>

#define NAME        "::Knife Generator ::"
#define VERSION        "1.0"
#define AUTHOR        "Zombie-Mod.ru"


#define KNIFE_NAME    "Knife 1000 Damager"
#define KNIFE_COST    25

#define KNIFE_SPEED    800.0
#define SEC_DMG        53.3
#define PRIM_DMG    18.1
#define SEC_HEAD_DMG    90.0
#define PRIM_HEAD_DMG    25.0
#define    KNIFE_KNOCK    5
#define BLOOD        9
#define ADMIN        "0"

static const v_knife[] = "models that i used thatz not issue .."
static const p_knife[] = "models that i used thatz not issue .."

static const SoundList[][] =
{
    
"my sound files...",    // 0
    
"my sound files...",    // 1
    
"my sound files...",    // 2
    
"my sound files...",    // 3
    
"my sound files...",    // 4
    
"my sound files..."    // 5
}

static const 
Blood[][] =
{
    
"sprites/blood.spr",
    
"sprites/bloodspray.spr"
}
static 
g_Blood[sizeof Blood]
static 
g_Item_Knife
static bool:Knife[33]

public 
plugin_init()
{
    
register_plugin(NAMEVERSIONAUTHOR)
    
    
g_Item_Knife zp_register_extra_item(KNIFE_NAMEKNIFE_COSTZP_TEAM_HUMAN)
    
    
register_event("CurWeapon""ChangeModel""be""1=1")
    
RegisterHam(Ham_TakeDamage"player""TakeDamage_Pre"0)
    
RegisterHam(Ham_TakeDamage"player""TakeDamage_Post"1)
    
RegisterHam(Ham_Player_PreThink"player""PreThink")
    
register_forward(FM_EmitSound"KnifeSound")
}
public 
zp_user_infected_post(idKnife[id] = false
public zp_extra_item_selected(iditemid)
{
    if(
itemid == g_Item_Knife)
    {    if(
Knife[id]) return ZP_PLUGIN_HANDLED
        
new num str_to_num(ADMIN)
        if(
num)
        {
            if(!
is_user_admin(id))
            return 
ZP_PLUGIN_HANDLED
        
}
        
engclient_cmd(id"weapon_knife")
        
Knife[id] = true
        change
(id)
    }
    return 
PLUGIN_CONTINUE
}

public 
ChangeModel(id)
{
    if(!
is_user_alive(id) || zp_get_user_zombie(id))
        return
        
    static 
weaponid
    weaponid 
read_data(2)
    
    if(!
Knife[id] || weaponid != CSW_KNIFE)
        return
        
    
change(id)
}

public 
KnifeSound(idchannelsample[], Float:volumeFloat:attnflagspitch)
{
    if(!
equal(sample"weapons/knife_"14) || !Knife[id])
        return 
FMRES_IGNORED
            
    
if(equal(sample[8], "knife_hitwall"13))
        
PlaySound(id1)    
    else
    if(
equal(sample[8], "knife_hit"9))
        switch(
random(2))
        {
            case 
0:PlaySound(id4)
            case 
1:PlaySound(id5)
        }        
    if(
equal(sample[8], "knife_slash"11)) PlaySound(id2)
    if(
equal(sample[8], "knife_stab"10)) PlaySound(id3)
    if(
equal(sample[8], "knife_deploy"12)) PlaySound(id0)
    return 
FMRES_SUPERCEDE
}

public 
TakeDamage_Pre(victiminflictorattackerFloat:damagedamagetype)
{
    if(!
is_user_alive(attacker))
    return 
HAM_IGNORED
        
    
if(!Knife[attacker] || get_user_weapon(attacker) != CSW_KNIFE)
     return 
HAM_IGNORED
    
    
new hittarget
    get_user_aiming
(attackertargethit)

    new 
bool:head = (hit == HIT_HEAD)
    new 
Float:mult_dmg 1.0
    
if(pev(attackerpev_buttonIN_ATTACK))
        
mult_dmg head PRIM_HEAD_DMG PRIM_DMG
    
else
        
mult_dmg head SEC_HEAD_DMG SEC_DMG
    SetHamParamFloat
(4damage mult_dmg)
    return 
HAM_HANDLED
}

public 
TakeDamage_Post(victiminflictorattackerFloat:damagedamagetype)
{
    if(!
is_user_alive(attacker) || !is_user_alive(victim)) 
    return 
HAM_IGNORED
        
    
if(!Knife[attacker] || get_user_weapon(attacker) != CSW_KNIFE)
     return 
HAM_IGNORED
        
    
new Float:Origin[3], Float:Origin2[3], Float:Velocity[3]
    
pev(attackerpev_originOrigin)
    
pev(victimpev_originOrigin2)
    
xs_vec_sub(Origin2OriginVelocity)
    
xs_vec_normalize(VelocityVelocity)
    
xs_vec_mul_scalar(Velocity, (KNIFE_KNOCK 100.0), Velocity)
    if(
Velocity[2] <= 100.0)
        
Velocity[2] = random_float(150.0250.0)
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(TE_BLOODSPRITE);
    
engfunc(EngFunc_WriteCoordOrigin2[0])
    
engfunc(EngFunc_WriteCoordOrigin2[1])
    
engfunc(EngFunc_WriteCoordOrigin2[2])
    
write_short(g_Blood[0])
    
write_short(g_Blood[1])
    
write_byte(77)
    
write_byte(BLOOD)
    
message_end()
    
set_pev(victimpev_velocityVelocity)
    return 
HAM_HANDLED
}

public 
PreThink(id)
{
    if(!
is_user_alive(id)) return HAM_IGNORED
    
if(!Knife[id]) return HAM_IGNORED
    
if(get_user_weapon(id) != CSW_KNIFE
    {
        
set_pev(idpev_maxspeedget_cvar_float("zp_human_speed"))
        return 
HAM_IGNORED
    
}

    
set_pev(idpev_maxspeedKNIFE_SPEED)
    return 
HAM_HANDLED
}

public 
plugin_precache()
{
    
precache_model(v_knife)
    
precache_model(p_knife)
    
    static 
i
    
for(0<= charsmax(SoundList); i++)
        
precache_sound(SoundList[i])
        
    for(
0<= charsmax(Blood); i++)
        
g_Blood[i] = precache_model(Blood[i])
}

change(id)
{
    
set_pev(idpev_viewmodel2v_knife)
    
set_pev(idpev_weaponmodel2p_knife)
}

stock PlaySound(EntSound)
    
engfunc(EngFunc_EmitSoundEntCHAN_WEAPONSoundList[_:Sound], VOL_NORMATTN_NORM0PITCH_NORM)
    
stock is_user_admin(id)
{
    new 
__flags=get_user_flags(id);
    return (
__flags>&& !(__flags&ADMIN_USER));

gogicaa is offline
shubhamgulati12
Senior Member
Join Date: Oct 2010
Location: Inida The Holy Place!!
Old 09-27-2012 , 09:23   Re: Zp Extra Item Sword/knife With 1000 Damage With Specified Models..
Reply With Quote #5

Quote:
Originally Posted by gogicaa View Post
I deleted gravity function. try it.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <xs>

#define NAME        "::Knife Generator ::"
#define VERSION        "1.0"
#define AUTHOR        "Zombie-Mod.ru"


#define KNIFE_NAME    "Knife 1000 Damager"
#define KNIFE_COST    25

#define KNIFE_SPEED    800.0
#define SEC_DMG        53.3
#define PRIM_DMG    18.1
#define SEC_HEAD_DMG    90.0
#define PRIM_HEAD_DMG    25.0
#define    KNIFE_KNOCK    5
#define BLOOD        9
#define ADMIN        "0" 
Worked Thanks!
__________________

Join Free File hosting - http://db.tt/VvebKSSW
[Free 2 GB cloud storage]
shubhamgulati12 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 04:58.


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