Raised This Month: $ Target: $400
 0% 

SuperKnife Damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bloody806
Member
Join Date: Jun 2012
Location: Czech Republic
Old 02-02-2013 , 16:47   SuperKnife Damage
Reply With Quote #1

Hi all i have shop with SuperKnife and I need to SuperKnife give hits for 400
Now i was bought SK but hes damage is same than Normal Knife. Help me pls...

Here is part of the plugin.

PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >
#include < cstrike >
#include < fun >
#include < nvault >

#define PLAYER_JUMP            6

#define ACT_HOP         7 

#define m_Activity         73
#define m_IdealActivity        74
#define m_flNextAttack          83
#define m_afButtonPressed          246 

enum eMenu {
    
szMenu32 ],
    
iAccess,
    
iCost
};

// VLASTNÍ ÚPRAVA PLUGINU //
#define ADMIN_VIP ADMIN_LEVEL_H // zvolení VIP levelu

new g_szPrefix[] = "!g[!yShop!g]"// Systémové zprávy

new g_szModel_Terrorist[] = "aNathrax-Team_f"// Název modelu furienů (bez připony -> .mdl <-)
new g_szModel_Counter[] = "aNathrax-Team_antif"// Název modelu anti-furienů (bez připony -> .mdl <-)

new g_szView_Knife[] = "models/anathrax/zbrane/v_newsupernuz.mdl"// Cesta k view modelu superknife
new g_szPerson_Knife[] = "models/anathrax/zbrane/p_newsupernuz.mdl"// Cesta k person modelu superknife

new const g_szMenuItems_Terrorist[][ eMenu ] = 
{
    { 
""0}, // Nic nedoplňovat
    
"Super Knife"0120 },
    { 
"HE Grenade"040 },
    { 
"Flash Grenade"030 },
    { 
"+50 HP"040 },
    { 
"No-Flash"045 },
    { 
"Wallhang"ADMIN_VIP90 },
    { 
"Health Regen [10\rHP\w/2sek.]"ADMIN_VIP80 }
};

new const 
g_szMenuItems_Counter[][ eMenu ] = 
{
    { 
""0}, // Nic nedoplňovat
    
"+50 HP"040 },
    { 
"Defuse"010 },
    { 
"Flash Grenade"030 },
    { 
"No-Flash"045 },
    { 
"Rychly Beh"ADMIN_VIP50 },
    { 
"Nekonecko naboju"ADMIN_VIP70 },
    { 
"Furien Radar [10sek.]"ADMIN_VIP70 },
    { 
"Health Regen [10\rHP\w/2sek.]"ADMIN_VIP80 }
};

new const 
v_Model1[] = "models/anathrax/zbrane/v_mp5.mdl"  
new const v_Model2[] = "models/anathrax/zbrane/v_m4a1.mdl"
new const v_Model3[] = "models/anathrax/zbrane/v_ak47.mdl"
new const v_Model4[] = "models/anathrax/zbrane/v_m3.mdl"
new const v_Model5[] = "models/anathrax/zbrane/v_xm1014.mdl"
new const v_Model6[] = "models/anathrax/zbrane/v_deagle.mdl"
new const v_Model7[] = "models/anathrax/zbrane/v_ctknife.mdl"
new const p_Model8[] = "models/anathrax/zbrane/p_kulomet.mdl"
new const v_Model8[] = "models/anathrax/zbrane/v_kulomet.mdl"
new const v_Model9[] = "models/anathrax/zbrane/v_elites.mdl"
new const v_Model10[] = "models/anathrax/zbrane/v_usp.mdl"
new const v_Model11[] = "models/anathrax/zbrane/v_glock.mdl"
new const p_Model12[] = "models/anathrax/zbrane/p_hegrenade.mdl"
new const v_Model12[] = "models/anathrax/zbrane/v_hegrenade.mdl"
new const p_Model13[] = "models/anathrax/zbrane/p_flashbang.mdl"
new const v_Model13[] = "models/anathrax/zbrane/v_flashbang.mdl"
new const p_Model14[] = "models/anathrax/zbrane/p_smokegrenade.mdl"
new const v_Model14[] = "models/anathrax/zbrane/v_smokegrenade.mdl"

new const g_szTer_Sounds[][] = 
{
    
"aNathrax-Team/furien_t1.mp3"
    
"aNathrax-Team/furien_t2.mp3",
    
"aNathrax-Team/furien_t3.mp3",
    
"aNathrax-Team/furien_t4.mp3",
    
"aNathrax-Team/furien_t5.mp3",
    
"aNathrax-Team/furien_t6.mp3"
}

new const 
g_szCt_Sounds[][] = 
{
    
"aNathrax-Team/furien_ct1.mp3",
    
"aNathrax-Team/furien_ct2.mp3",
    
"aNathrax-Team/furien_ct3.mp3",
    
"aNathrax-Team/furien_ct4.mp3",
    
"aNathrax-Team/furien_ct5.mp3",
    
"aNathrax-Team/furien_ct6.mp3"
}

// KONEC VLASTNÍ ÚPRAVY PLUGINU //

#define PISTOL_WEAPONS_BIT    (1<<CSW_GLOCK18|1<<CSW_USP|1<<CSW_DEAGLE|1<<CSW_P228|1<<CSW_FIVESEVEN|1<<CSW_ELITE)
#define SHOTGUN_WEAPONS_BIT    (1<<CSW_M3|1<<CSW_XM1014)
#define SUBMACHINE_WEAPONS_BIT    (1<<CSW_TMP|1<<CSW_MAC10|1<<CSW_MP5NAVY|1<<CSW_UMP45|1<<CSW_P90)
#define RIFLE_WEAPONS_BIT    (1<<CSW_FAMAS|1<<CSW_GALIL|1<<CSW_AK47|1<<CSW_SCOUT|1<<CSW_M4A1|1<<CSW_SG550|1<<CSW_SG552|1<<CSW_AUG|1<<CSW_AWP|1<<CSW_G3SG1)
#define MACHINE_WEAPONS_BIT    (1<<CSW_M249)

#define PRIMARY_WEAPONS_BIT    (SHOTGUN_WEAPONS_BIT|SUBMACHINE_WEAPONS_BIT|RIFLE_WEAPONS_BIT|MACHINE_WEAPONS_BIT)
#define SECONDARY_WEAPONS_BIT    (PISTOL_WEAPONS_BIT)

#define IsPrimaryWeapon(%1) ( (1<<%1) & PRIMARY_WEAPONS_BIT )
#define IsSecondaryWeapon(%1) ( (1<<%1) & PISTOL_WEAPONS_BIT )

#define MAX_WEAPON CSW_P90

#define FFADE_IN 0x0000

enum ( += 100 ) {
    
TASK_MODELS 30000,
    
TASK_HEALTHREGEN,
    
TASK_RADAR
};

new const 
g_iMaxClipAmmoMAX_WEAPON ] =
{
    
0130100703030030202530352512201030
    
1008303020073030050
};

new const 
g_szWeaponClassnamesMAX_WEAPON ][ ] =
{
    
"""weapon_p228""""weapon_scout""weapon_hegrenade",
    
"weapon_xm1014""weapon_c4""weapon_mac10""weapon_aug",
    
"weapon_smokegrenade""weapon_elite""weapon_fiveseven",
    
"weapon_ump45""weapon_sg550""weapon_galil""weapon_famas",
    
"weapon_usp""weapon_glock18""weapon_awp""weapon_mp5navy",
    
"weapon_m249""weapon_m3""weapon_m4a1""weapon_tmp""weapon_g3sg1",
    
"weapon_flashbang""weapon_deagle""weapon_sg552""weapon_ak47",
    
"weapon_knife""weapon_p90"
};

new 
msg_ScreenFade;
new 
msg_HostagePos;
new 
msg_HostageK;

new 
g_nVault

new g_iMaxPlayers;

new 
bool:g_bIsAlive33 ];
new 
bool:g_bActived_NoFlash33 ];
new 
bool:g_bActived_SuperKnife33 ];
new 
bool:g_bActived_Speed33 ];
new 
bool:g_bActived_UnlimitedAmmo33 ];
new 
bool:g_bActived_Wallhang33 ];
new 
bool:g_bActived_Radar33 ];

new 
bool:g_bHanged33 ];
new 
bool:g_bSkins33 ] = true;
new 
bool:g_bRoundSound33 ] = true;
new 
bool:g_bWeapons33 ];

new 
g_iPoints33 ];

new 
Float:g_fVecMins33 ][ ];
new 
Float:g_fVecMaxs33 ][ ];
new 
Float:g_fVecOrigin33 ][ ];

new 
g_szPlayerModel33 ][ 32 ];


public 
plugin_precache()
{
    new 
szPath128 ], i;
    
    
formatexszPathcharsmaxszPath ), "models/player/%s/%s.mdl"g_szModel_Terroristg_szModel_Terrorist )
    
precache_modelszPath )
    
formatexszPathcharsmaxszPath ), "models/player/%s/%s.mdl"g_szModel_Counterg_szModel_Counter )
    
precache_modelszPath )
    
    
precache_modelg_szView_Knife )
    
precache_modelg_szPerson_Knife )
    
    
precache_model(v_Model1)
    
precache_model(v_Model2)
    
precache_model(v_Model3)
    
precache_model(v_Model4)
    
precache_model(v_Model5)
    
precache_model(v_Model6)
    
precache_model(v_Model7)
    
precache_model(v_Model8)
    
precache_model(p_Model8)
    
precache_model(v_Model9)
    
precache_model(v_Model10)
    
precache_model(v_Model11)
    
precache_model(p_Model12)
    
precache_model(v_Model12)
    
precache_model(p_Model13)
    
precache_model(v_Model13)
    
precache_model(p_Model14)
    
precache_model(v_Model14)
    
    for( 
0sizeof g_szTer_Sounds i++ )
        
precache_soundg_szTer_Sounds] )
        
    for( 
0sizeof g_szCt_Sounds i++ )    
        
precache_soundg_szCt_Sounds] )
}

public 
plugin_init() 
{
    
register_plugin"Furien Shop""1.0""Pur3" )
    
    
msg_ScreenFade get_user_msgid"ScreenFade" );
    
msg_HostagePos get_user_msgid"HostagePos" );
    
msg_HostageK get_user_msgid"HostageK" );
    
    
RegisterHamHam_Spawn"player""ham_Player_Spawn_Post")
    
RegisterHamHam_TakeDamage"player""ham_Player_TakeDamage_Post")
    
RegisterHamHam_Player_PostThink"player""ham_Player_PostThink_Post")
    
RegisterHamHam_Player_PreThink"player""ham_Player_PreThink_Pre")
    
RegisterHamHam_Killed"player""ham_Player_Killed_Pre")
    
RegisterHamHam_Player_Jump"player""ham_Player_Jump_Pre")
    
RegisterHamHam_Touch"func_wall""ham_Touch_Pre")
    
RegisterHamHam_Touch"func_breakable""ham_Touch_Pre")
    
RegisterHamHam_Touch"worldspawn""ham_Touch_Pre")
    
    
register_event"CurWeapon""event_CurWeapon""be""1=1" )
    
register_event"SendAudio""event_SendAudio_Ter""a""2&%!MRAD_terwin" )
    
register_event"SendAudio""event_SendAudio_Ct""a""2&%!MRAD_ctwin" 
    
    
register_messagemsg_ScreenFade"message_ScreenFade" )
    
    
register_clcmd"say /shop""command_Shop" )
    
register_clcmd"say shop""command_Shop" )
    
register_clcmd"say /furien""command_FurMenu" )
    
register_clcmd"say /nastaveni""command_Nastaveni" )
    
register_clcmd("hFur""command_FurMenu")
    
    
g_iMaxPlayers get_maxplayers();
    
    
g_nVault nvault_open"fur_points" );
    
    
set_task0.5"fn_RadarScan"___"b" )
}

public 
plugin_end()
{
    
nvault_closeg_nVault )
}

public 
client_connectid )
{
    
g_bIsAliveid ] = false;
    
g_bActived_NoFlashid ] = false;
    
g_bActived_SuperKnifeid ] = false;
    
g_bActived_Speedid ] = false;
    
g_bActived_UnlimitedAmmoid ] = false;
    
g_bActived_Wallhangid ] = false;
    
g_bActived_Radarid ] = false;
    
g_bSkinsid ] = true;
    
g_bRoundSoundid ] = true;
    
g_iPointsid ] = 0;
    
LoadDataid )
    
    
client_cmd(id"bind ^"n^" ^"hFur^"")
}

public 
client_disconnectid )
{
    
SaveDataid )
}

public 
ham_Player_Spawn_Postid )
{
    if( !
is_user_aliveid ) )
    {
        return 
HAM_IGNORED;
    }
    
    
g_bIsAliveid ] = true;
    
    
g_bActived_NoFlashid ] = false;
    
g_bActived_Speedid ] = false;
    
g_bActived_UnlimitedAmmoid ] = false;
    
g_bActived_Wallhangid ] = false;
    
g_bActived_Radarid ] = false;
    
g_bWeaponsid ] = false;
    
    
set_user_maxspeedid )
    
    
remove_taskid TASK_HEALTHREGEN )
    
remove_taskid TASK_RADAR )
    
    if( 
get_user_flagsid ) & ADMIN_VIP )
    {
        new 
CsTeams:iTeam cs_get_user_teamid );
        
        
remove_taskid TASK_MODELS )
        
        switch( 
iTeam )
        {
            case 
CS_TEAM_Tcopyg_szPlayerModelid ], charsmax(g_szPlayerModel[]), g_szModel_Terrorist )
            case 
CS_TEAM_CTcopyg_szPlayerModelid ], charsmax(g_szPlayerModel[]), g_szModel_Counter )
            default: return 
HAM_IGNORED;
        }
        
        
set_task0.4"Task_SetModels"id TASK_MODELS )
    }
    
    
Open_Primaryid )
    
SaveDataid )
    
    return 
HAM_IGNORED;
}

public 
ham_Player_TakeDamage_PostiVictimiInfictoriAttackerFloat:fDamageiDmgBits )
{
    if( 
g_bActived_SuperKnifeiAttacker ] )
    {
        new 
iTempiWepId;
        
iWepId get_user_weaponiAttackeriTempiTemp );
    
        if( 
cs_get_user_teamiAttacker ) == CS_TEAM_T && iWepId == CSW_KNIFE )
        {
            
SetHamParamFloat4fDamage )
        }
    }
    
    return 
HAM_IGNORED;
}
public 
ham_Player_PreThink_Preid )
{    
    new 
iButton pevidpev_button );
    
    if( 
g_bActived_SuperKnifeid ] )
    {
        new 
iTempiWepId;
        
iWepId get_user_weaponidiTempiTemp );
        
        if( 
cs_get_user_teamid ) == CS_TEAM_T && iWepId == CSW_KNIFE )
        {
            if( 
iButton IN_ATTACK )
            {
                
iButton = ( iButton & ~IN_ATTACK ) | IN_ATTACK2;
                
set_pevidpev_buttoniButton )
            }
        }
    }
    
    return 
HAM_IGNORED;
}

public 
ham_Player_Killed_PreiVictimiKilleriShouldGib )
{
    if( !
is_user_connectediVictim ) )
        return 
HAM_IGNORED;
    
    
g_bActived_SuperKnifeiVictim ] = false;
    
g_bIsAliveiVictim ] = false;
    
    if( !
is_user_connectediKiller ) || iVictim == iKiller )
        return 
HAM_IGNORED;
        
    
g_iPointsiKiller ] += ( get_user_flagsiKiller ) & ADMIN_VIP ) ? 15 10;
    
    return 
HAM_IGNORED;


And here:


PHP Code:
    case 1// Superknife
            
{
                if( !
g_bActived_SuperKnifeid ] )
                {
                    
g_bActived_SuperKnifeid ] = true;
                    
ham_strip_weaponid"weapon_knife" )
                    
give_itemid"weapon_knife" )
                    
color_chatid"%s !yKoupil sis !tSuper Knife!y!"g_szPrefix )
                } else 
color_chatid"%s !yUz sis koupil !tSuper Knife!y!"g_szPrefix )
            } 

Last edited by bloody806; 02-05-2013 at 07:47.
bloody806 is offline
Send a message via Skype™ to bloody806
 



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 20:35.


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