Raised This Month: $32 Target: $400
 8% 

NEW knife Mod powred By Me [ By NiV ]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
niv ra bhoper
Junior Member
Join Date: Jul 2013
Old 08-10-2013 , 14:48   NEW knife Mod powred By Me [ By NiV ]
Reply With Quote #1

Knife mods By NiV
Hi Guys

i présent my new plugin Knife .
knife mods

....
Attached Files
File Type: sma Get Plugin or Get Source (knife-mod modifier By NiV.sma - 942 views - 7.4 KB)
File Type: zip Knifes By NiV.zip (1.49 MB, 345 views)
niv ra bhoper is offline
Mauricio Frb
Member
Join Date: Jul 2013
Old 08-10-2013 , 14:53   Re: NEW knife Mod powred By Me [ By NiV ]
Reply With Quote #2

You have to use new menu system and not the older.
Mauricio Frb is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-10-2013 , 14:54   Re: NEW knife Mod powred By Me [ By NiV ]
Reply With Quote #3

Quote:
Originally Posted by Mauricio Frb View Post
You have to use new menu system and not the older.
No such requirement exists
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 08-10-2013 , 15:14   Re: NEW knife Mod powred By Me [ By NiV ]
Reply With Quote #4

He didn't write the plugin, here's the original plugin.

Here's the original code.

PHP Code:
public display_knife(id) {
    new 
menuBody[512]
    
add(menuBody511"\rKnife Mod\w^n^n")
    
add(menuBody511"1. Machete \y(More Damage/Low Speed)\w^n")
    
add(menuBody511"2. Bak Knife \y(No Footsteps)\w^n")
    
add(menuBody511"3. Pocket Knife \y(High Speed)\w^n")
    
add(menuBody511"4. Butcher Knife \y(Low Gravity)\w^n")
    
add(menuBody511"5. Default Knife \y(Health Regeneration)\w^n^n")
    
add(menuBody511"0. Exit^n")
    
    new 
keys = ( 1<<1<<1<<1<<1<<1<<)
    
show_menu(idkeysmenuBody, -1"Knife Mod")
}

public 
knifemenu(idkey) {
    switch(
key
    {
        case 
0SetKnife(id 4)
        case 
1SetKnife(id 2)
        case 
2SetKnife(id 3)
        case 
3SetKnife(id 1)
        case 
4SetKnife(id 0)
        default: return 
PLUGIN_HANDLED
    
}
    
SaveData(id)
    return 
PLUGIN_HANDLED


public 
SetKnife(id Knife) {
    
knife_model[id] = Knife
    
    
new ClipAmmoWeapon get_user_weapon(idClipAmmo
    if ( 
Weapon != CSW_KNIFE )
        return 
PLUGIN_HANDLED
    
    
new vModel[56],pModel[56]
    
    switch(
Knife)
    {
        case 
0: {
            
format(vModel,55,"models/v_knife.mdl")
            
format(pModel,55,"models/p_knife.mdl")
        }
        case 
1: {
            
format(vModel,55,"models/knife-mod/v_butcher.mdl")
            
format(pModel,55,"models/knife-mod/p_butcher.mdl")
        }
        case 
2: {
            
format(vModel,55,"models/knife-mod/v_bak.mdl")
            
format(pModel,55,"models/knife-mod/p_bak.mdl")
        }
        case 
3: {
            
format(vModel,55,"models/knife-mod/v_pocket.mdl")
            
format(pModel,55,"models/knife-mod/p_pocket.mdl")
        }
        case 
4: {
            
format(vModel,55,"models/knife-mod/v_machete.mdl")
            
format(pModel,55,"models/knife-mod/p_machete.mdl")
        }
    } 
    
    
entity_set_string(idEV_SZ_viewmodelvModel)
    
entity_set_string(idEV_SZ_weaponmodelpModel)
    
    return 
PLUGIN_HANDLED;  
}

public 
event_damageid ) {
    
    new 
victim_id id;
    if( !
is_user_connectedvictim_id ) ) return PLUGIN_CONTINUE
    
new dmg_take read_data);
    new 
dmgtype read_data);
    new 
Float:multiplier get_pcvar_float(CVAR_DAMAGE);
    new 
Float:damage dmg_take multiplier;
    new 
health get_user_healthvictim_id );
    
    new 
iWeapIDattacker_id get_user_attackervictim_idiWeapID );
    
    if( !
is_user_connectedattacker_id ) || !is_user_alivevictim_id ) ) {
        return 
PLUGIN_HANDLED
    
}
    
    if( 
iWeapID == CSW_KNIFE && knife_model[attacker_id] == ) {
        
        if( 
floatround(damage) >= health ) {
            if( 
victim_id == attacker_id ) {
                return 
PLUGIN_CONTINUE
                
}else{
                
log_killattacker_idvictim_id"knife");
            }
            
            return 
PLUGIN_CONTINUE
            
}else {
            if( 
victim_id == attacker_id ) return PLUGIN_CONTINUE
            
            fakedamage
victim_id"weapon_knife"damagedmgtype );
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
CurWeapon(id)
    {
    new 
Weapon read_data(2)
    
    
// Set Knife Model
    
SetKnife(idknife_model[id])   
    
    
// Task Options
    
    
if(knife_model[id] == && !task_exists(id) && Weapon == CSW_KNIFE)
        
set_task(TASK_INTERVAL "task_healing",id,_,_,"b")
    else if(
task_exists(id))
        
remove_task(id)
    
    
// Abilities
    
set_user_footsteps(id , ( (knife_model[id] == && Weapon == CSW_KNIFE) ? 0) )
    
    new 
Float:Gravity = ((knife_model[id] == && Weapon == CSW_KNIFE)? get_pcvar_float(CVAR_LOWGRAV) : get_pcvar_float(CVAR_NORMGRAV)) / 800.0
    set_user_gravity
(id Gravity)
    
    
// Speed
    
new Float:Speed
    
if(Weapon != CSW_KNIFE || knife_model[id] < 3)
        return 
PLUGIN_CONTINUE
    
else if(knife_model[id] == 3)
        
Speed get_pcvar_float(CVAR_HIGHSPEED)
    else if(
knife_model[id] == 4)
        
Speed get_pcvar_float(CVAR_LOWSPEED)
    
    
set_user_maxspeed(idSpeed)
    
    return 
PLUGIN_HANDLED   
    
}

stock log_kill(killervictimweapon[],headshot) {
    
user_silentkillvictim );
    
    
message_beginMSG_ALLget_user_msgid"DeathMsg" ), {0,0,0}, );
    
write_bytekiller );
    
write_bytevictim );
    
write_byteheadshot );
    
write_stringweapon );
    
message_end();
    
    new 
kfrags get_user_fragskiller );
    
set_user_fragskillerkfrags++ );
    new 
vfrags get_user_fragsvictim );
    
set_user_fragsvictimvfrags++ );
    
    return  
PLUGIN_CONTINUE



public 
task_healing(id) {  
    new 
addhealth get_pcvar_num(CVAR_HEALTH_ADD)  
    if (!
addhealth)
        return  
    
    new 
maxhealth get_pcvar_num(CVAR_HEALTH_MAX)  
    if (
maxhealth MAX_HEALTH) { 
        
set_pcvar_num(CVAR_HEALTH_MAXMAX_HEALTH)  
        
maxhealth MAX_HEALTH 
    
}  
    
    new 
health get_user_health(id)   
    
    if (
is_user_alive(id) && (health maxhealth)) { 
        
set_user_health(idhealth addhealth)
        
set_hudmessage(02550, -1.00.2501.02.00.10.14)
        
show_hudmessage(id,"<< !!HEAL IN PROGRESS!! >>")
        
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, id)
        
write_short(1<<10)
        
write_short(1<<10)
        
write_short(0x0000)
        
write_byte(0)
        
write_byte(200)
        
write_byte(0)
        
write_byte(75)
        
message_end()
    }
    
    else {
        if (
is_user_alive(id) && (health maxhealth))
            
remove_task(id)
    }
}  

public 
client_disconnect(id) {  
    if(
task_exists(id)) remove_task(id)  
}  


public 
kmodmsg() { 
    
    
client_print(0,print_chat,"[AMXX] Type /knife to change your knife skins")
}  

public 
client_authorized(id)
    {
    
LoadData(id)
}

SaveData(id)

    
    new 
authid[32]
    
get_user_authid(idauthid31)
    
    new 
vaultkey[64]
    new 
vaultdata[64]
    
    
format(vaultkey63"KMOD_%s"authid)
    
format(vaultdata63"%d"knife_model[id])
    
set_vaultdata(vaultkeyvaultdata)
}

LoadData(id

    new 
authid[32
    
get_user_authid(id,authid,31)
    
    new 
vaultkey[64], vaultdata[64]
    
    
format(vaultkey63"KMOD_%s"authid)
    
get_vaultdata(vaultkeyvaultdata63)
    
knife_model[id] = str_to_num(vaultdata)
    

and here's niv code

PHP Code:
public display_knife(id) {
    new 
menuBody[512]
    
add(menuBody511"\rKnife Mod\w^n^n")
    
add(menuBody511"1. GOLD \y(More Damage/Low Speed)\w^n")
    
add(menuBody511"2. Green kn \y(No Footsteps)\w^n")
    
add(menuBody511"3. red \y(High Speed)\w^n")
    
add(menuBody511"4. white \y(Low Gravity)\w^n")
    
add(menuBody511"5. server Knife By NiV \y(Health Regeneration)\w^n^n")
    
add(menuBody511"0. Exit^n")
    
    new 
keys = ( 1<<1<<1<<1<<1<<1<<)
    
show_menu(idkeysmenuBody, -1"Knife Mod")
}

public 
knifemenu(idkey) {
    switch(
key
    {
        case 
0SetKnife(id 4)
        case 
1SetKnife(id 2)
        case 
2SetKnife(id 3)
        case 
3SetKnife(id 1)
        case 
4SetKnife(id 0)
        default: return 
PLUGIN_HANDLED
    
}
    
SaveData(id)
    return 
PLUGIN_HANDLED


public 
SetKnife(id Knife) {
    
knife_model[id] = Knife
    
    
new ClipAmmoWeapon get_user_weapon(idClipAmmo
    if ( 
Weapon != CSW_KNIFE )
        return 
PLUGIN_HANDLED
    
    
new vModel[56],pModel[56]
    
    switch(
Knife)
    {
        case 
0: {
            
format(vModel,55,"models/Knifes By NiV/v_knife.mdl")
            
format(pModel,55,"models/Knifes By NiV/p_knife.mdl")
        }
        case 
1: {
            
format(vModel,55,"models/Knifes By NiV/v_GOLD.mdl")
            
format(pModel,55,"models/Knifes By NiV/p_GOLD.mdl")
        }
        case 
2: {
            
format(vModel,55,"models/Knifes By NiV/v_green.mdl")
            
format(pModel,55,"models/Knifes By NiV/p_green.mdl")
        }
        case 
3: {
            
format(vModel,55,"models/Knifes By NiV/v_red.mdl")
            
format(pModel,55,"models/Knifes By NiV/p_red.mdl")
        }
        case 
4: {
            
format(vModel,55,"models/Knifes By NiV/v_white.mdl")
            
format(pModel,55,"models/Knifes By NiV/p_white.mdl")
        }
    } 
    
    
entity_set_string(idEV_SZ_viewmodelvModel)
    
entity_set_string(idEV_SZ_weaponmodelpModel)
    
    return 
PLUGIN_HANDLED;  
}

public 
event_damageid ) {
    
    new 
victim_id id;
    if( !
is_user_connectedvictim_id ) ) return PLUGIN_CONTINUE
    
new dmg_take read_data);
    new 
dmgtype read_data);
    new 
Float:multiplier get_pcvar_float(CVAR_DAMAGE);
    new 
Float:damage dmg_take multiplier;
    new 
health get_user_healthvictim_id );
    
    new 
iWeapIDattacker_id get_user_attackervictim_idiWeapID );
    
    if( !
is_user_connectedattacker_id ) || !is_user_alivevictim_id ) ) {
        return 
PLUGIN_HANDLED
    
}
    
    if( 
iWeapID == CSW_KNIFE && knife_model[attacker_id] == ) {
        
        if( 
floatround(damage) >= health ) {
            if( 
victim_id == attacker_id ) {
                return 
PLUGIN_CONTINUE
                
}else{
                
log_killattacker_idvictim_id"knife");
            }
            
            return 
PLUGIN_CONTINUE
            
}else {
            if( 
victim_id == attacker_id ) return PLUGIN_CONTINUE
            
            fakedamage
victim_id"weapon_knife"damagedmgtype );
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
CurWeapon(id)
    {
    new 
Weapon read_data(2)
    
    
// Set Knife Model
    
SetKnife(idknife_model[id])   
    
    
// Task Options
    
    
if(knife_model[id] == && !task_exists(id) && Weapon == CSW_KNIFE)
        
set_task(TASK_INTERVAL "task_healing",id,_,_,"b")
    else if(
task_exists(id))
        
remove_task(id)
    
    
// Abilities
    
set_user_footsteps(id , ( (knife_model[id] == && Weapon == CSW_KNIFE) ? 0) )
    
    new 
Float:Gravity = ((knife_model[id] == && Weapon == CSW_KNIFE)? get_pcvar_float(CVAR_LOWGRAV) : get_pcvar_float(CVAR_NORMGRAV)) / 800.0
    set_user_gravity
(id Gravity)
    
    
// Speed
    
new Float:Speed
    
if(Weapon != CSW_KNIFE || knife_model[id] < 3)
        return 
PLUGIN_CONTINUE
    
else if(knife_model[id] == 3)
        
Speed get_pcvar_float(CVAR_HIGHSPEED)
    else if(
knife_model[id] == 4)
        
Speed get_pcvar_float(CVAR_LOWSPEED)
    
    
set_user_maxspeed(idSpeed)
    
    return 
PLUGIN_HANDLED   
    
}

stock log_kill(killervictimweapon[],headshot) {
    
user_silentkillvictim );
    
    
message_beginMSG_ALLget_user_msgid"DeathMsg" ), {0,0,0}, );
    
write_bytekiller );
    
write_bytevictim );
    
write_byteheadshot );
    
write_stringweapon );
    
message_end();
    
    new 
kfrags get_user_fragskiller );
    
set_user_fragskillerkfrags++ );
    new 
vfrags get_user_fragsvictim );
    
set_user_fragsvictimvfrags++ );
    
    return  
PLUGIN_CONTINUE



public 
task_healing(id) {  
    new 
addhealth get_pcvar_num(CVAR_HEALTH_ADD)  
    if (!
addhealth)
        return  
    
    new 
maxhealth get_pcvar_num(CVAR_HEALTH_MAX)  
    if (
maxhealth MAX_HEALTH) { 
        
set_pcvar_num(CVAR_HEALTH_MAXMAX_HEALTH)  
        
maxhealth MAX_HEALTH 
    
}  
    
    new 
health get_user_health(id)   
    
    if (
is_user_alive(id) && (health maxhealth)) { 
        
set_user_health(idhealth addhealth)
        
set_hudmessage(02550, -1.00.2501.02.00.10.14)
        
show_hudmessage(id,"<< !!HEAL IN PROGRESS!! >>")
        
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, id)
        
write_short(1<<10)
        
write_short(1<<10)
        
write_short(0x0000)
        
write_byte(0)
        
write_byte(200)
        
write_byte(0)
        
write_byte(75)
        
message_end()
    }
    
    else {
        if (
is_user_alive(id) && (health maxhealth))
            
remove_task(id)
    }
}  

public 
client_disconnect(id) {  
    if(
task_exists(id)) remove_task(id)  
}  


public 
kmodmsg() { 
    
    
client_print(0,print_chat,"[NRB ] change your knife skins now with type say /knife ")
}  

public 
client_authorized(id)
    {
    
LoadData(id)
}

SaveData(id)

    
    new 
authid[32]
    
get_user_authid(idauthid31)
    
    new 
vaultkey[64]
    new 
vaultdata[64]
    
    
format(vaultkey63"KMOD_%s"authid)
    
format(vaultdata63"%d"knife_model[id])
    
set_vaultdata(vaultkeyvaultdata)
}

LoadData(id

    new 
authid[32
    
get_user_authid(id,authid,31)
    
    new 
vaultkey[64], vaultdata[64]
    
    
format(vaultkey63"KMOD_%s"authid)
    
get_vaultdata(vaultkeyvaultdata63)
    
knife_model[id] = str_to_num(vaultdata)
    

__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-10-2013 , 15:29   Re: NEW knife Mod powred By Me [ By NiV ]
Reply With Quote #5

Don't release again an existing plugin with minor modifications, niv ra bhoper.

Unapproved.
__________________
Arkshine is offline
niv ra bhoper
Junior Member
Join Date: Jul 2013
Old 08-13-2013 , 08:19   Re: NEW knife Mod powred By Me [ By NiV ]
Reply With Quote #6

it's work for you it dase'nt work for me why
niv ra bhoper is offline
niv ra bhoper
Junior Member
Join Date: Jul 2013
Old 08-13-2013 , 08:20   Re: NEW knife Mod powred By Me [ By NiV ]
Reply With Quote #7

put i dent know how to make an knife for server only for server how i can make script for my server
niv ra bhoper is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 08-13-2013 , 14:19   Re: NEW knife Mod powred By Me [ By NiV ]
Reply With Quote #8

Seriously, why is it in unapproved section and not in trash?
__________________
Jhob94 is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 08-13-2013 , 15:39   Re: NEW knife Mod powred By Me [ By NiV ]
Reply With Quote #9

Quote:
Originally Posted by niv ra bhoper View Post
put i dent know how to make an knife for server only for server how i can make script for my server
this amazing english
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos 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 00:56.


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