Raised This Month: $114 Target: $400
 28% 

[HL] Combat Knife


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Half-Life        Category:   Gameplay        Approver:   Arkshine (91)
KORD_12.7
Senior Member
Join Date: Aug 2009
Location: Russia, Vladivostok
Old 05-04-2012 , 09:20   [HL] Combat Knife
Reply With Quote #1

Combat Knife [AGHL.ru link]
version 1.0
by KORD_12.7



Supported mods:
  • Half-Life only.

Needed modules:

Description:
This plugin will add new weapon to game: Combat Knife, another mle weapon that delivers less damage, but is very fast and effective against headcrabs or already wounded or weak enemies. Stabbing enemies in the back can result in a one-hit kill.

Settings:
Code:
// Weapon settings
#define WEAPON_NAME 			"weapon_knife"
#define WEAPON_SLOT			1
#define WEAPON_POSITION			3 // NULL
#define WEAPON_PRIMARY_AMMO		""
#define WEAPON_PRIMARY_AMMO_MAX		-1
#define WEAPON_SECONDARY_AMMO		"" // NULL
#define WEAPON_SECONDARY_AMMO_MAX	-1
#define WEAPON_MAX_CLIP			-1
#define WEAPON_DEFAULT_AMMO		-1
#define WEAPON_FLAGS			0
#define WEAPON_WEIGHT			0
#define WEAPON_DAMAGE			10.0
#define WEAPON_DAMAGE_STAB		40.0
#define WEAPON_DAMAGE_BACK		1000.0

#define	KNIFE_BODYHIT_VOLUME		128
#define	KNIFE_WALLHIT_VOLUME		512

// Hud
#define WEAPON_HUD_TXT			"sprites/weapon_knife.txt"
#define WEAPON_HUD_SPR			"sprites/weapon_knife.spr"

// Models
#define MODEL_WORLD			"models/w_knife.mdl"
#define MODEL_VIEW			"models/v_knife.mdl"
#define MODEL_PLAYER			"models/p_knife.mdl"

// Sounds
#define SOUND_MISS_1			"weapons/knife1.wav"
#define SOUND_MISS_2			"weapons/knife2.wav"
#define SOUND_MISS_3			"weapons/knife3.wav"
#define SOUND_HIT_WALL_1		"weapons/knife_hit_wall1.wav"
#define SOUND_HIT_WALL_2		"weapons/knife_hit_wall2.wav"
#define SOUND_HIT_FLESH_1		"weapons/knife_hit_flesh1.wav"
#define SOUND_HIT_FLESH_2		"weapons/knife_hit_flesh2.wav"

// Animation
#define ANIM_EXTENSION			"crowbar"

Credits:
  • Gearbox - for awesome mod Opposing Force.
  • Gordon Freeman - for help with hud and testing.
  • Koshak - for model editing.

Video:

Changelog:
1.0
  • First release.
Note:
Do not use webcompiler aka "Get Plugin" button. Get Source and compile it manually.
Attached Files
File Type: zip resources.zip (127.4 KB, 1238 views)
File Type: sma Get Plugin or Get Source (knife.sma - 2524 views - 16.4 KB)
__________________

Vi Veri Veniversum Vivus Vici
Russian Half-Life and Adrenaline Gamer community

Last edited by KORD_12.7; 11-14-2012 at 04:28.
KORD_12.7 is offline
Send a message via ICQ to KORD_12.7
Bos93
Veteran Member
Join Date: Jul 2010
Old 05-06-2012 , 15:09   Re: [HL] Combat Knife
Reply With Quote #2

Cool. Good music on the video
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-30-2012 , 06:58   Re: [HL] Combat Knife
Reply With Quote #3

Approved.
__________________
Arkshine is offline
KORD_12.7
Senior Member
Join Date: Aug 2009
Location: Russia, Vladivostok
Old 06-01-2012 , 08:46   Re: [HL] Combat Knife
Reply With Quote #4

Arkshine
Spoiler
__________________

Vi Veri Veniversum Vivus Vici
Russian Half-Life and Adrenaline Gamer community
KORD_12.7 is offline
Send a message via ICQ to KORD_12.7
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-01-2012 , 08:55   Re: [HL] Combat Knife
Reply With Quote #5

No idea, but I think someone already asked about this problem but got no news. Will try to ask to an admin.

EDIT: https://bugs.alliedmods.net/show_bug.cgi?id=5145
__________________

Last edited by Arkshine; 06-01-2012 at 08:58.
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-01-2012 , 13:47   Re: [HL] Combat Knife
Reply With Quote #6

Fixed by psychonic. Big thanks to him. It should be good now.
__________________

Last edited by Arkshine; 06-01-2012 at 13:50.
Arkshine is offline
hasanmerkit
Junior Member
Join Date: Jan 2016
Old 09-09-2016 , 04:10   Re: [HL] Combat Knife
Reply With Quote #7

I need disable knife's decals and secondary attack for my game mod.
Please help!
hasanmerkit is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 09-09-2016 , 05:40   Re: [HL] Combat Knife
Reply With Quote #8

Quote:
knife's decals
Remove those 2 lines:
Code:
wpnmod_set_think(iItem, "Knife_Smack");
        set_pev(iItem, pev_nextthink, get_gametime() + 0.2);

Quote:
secondary attack
Remove this line:
Code:
wpnmod_register_weapon_forward(iKnife, Fwd_Wpn_SecondaryAttack, "Knife_SecondaryAttack");
Don't forget to recompile.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
hasanmerkit
Junior Member
Join Date: Jan 2016
Old 09-12-2016 , 14:12   Re: [HL] Combat Knife
Reply With Quote #9

@NiHiLaNTh you are amazing! Worked! Very thanks!
hasanmerkit is offline
Reply


Thread Tools
Display Modes

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 11:54.


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