Small features:
- Not create throwing knive if player slash another player.
- Creates ricochet effect when knives collide to each other.
- Knives stay longer on field, max 30 sec if not collide with player or another knive.
- Throwing knive model is selected by player own knive world model what he/she carry, otherwise default model.
cvars:
Code:
weapon_reticle_knife_show "1" // CSGO, enable crosshair when knive
sm_throwingknives_count "3" //Amount of knives players spawn with. 0 = Disable, -1 = infinite
sm_throwingknives_steal "1" //If enabled, knife kills get the victims remaining knives.
sm_throwingknives_velocity "2250" //Velocity (speed) adjustment.
sm_throwingknives_damage "57" //Damage adjustment.
sm_throwingknives_hsdamage "127" //Headshot damage adjustment.
sm_throwingknives_modelscale "1.0" //Knife size scale
sm_throwingknives_gravity "1.0" //Knife gravity scale
sm_throwingknives_elasticity "0.2" //Knife elasticity
sm_throwingknives_maxlifetime "1.5" //Knife max life time, 1 - 30 sec
sm_throwingknives_trails "1" //Knive leave trail effect
sm_throwingknives_admins "0" //Admins only when enabled, who have access to admin override "throwingknives", flag "o" by default
Missing:
- most cvars and damage, trails settings.
- dev, callbacks and forwards
Bugs I know:
- When previous throwing knive hit player as same time you try throw new knive, not gonna happen. *fixed...
Note:
I started build this plugin from scratch because original is so messy and have annoying bugs in csgo.
Replaced SoundHook with SDKHook touch.
Replace point_hurt entity with SDKHooks_TakeDamage.
Replace flashbang_projectile with smokegrenade_projectile, flashbang did get detonated when hit wall...
etc. etc.
Future: - support dod:s ??
update 2016-5-20:
- sm_throwingknives_count 0 will now disable throwing knives in the middle of the game.
update 2016-2-11:
-fixed csgo event weapon_fire, weapon_knife
-Seems knife collision bug not happen anymore as before... ??
- typo in this topic cvar list, sm_throwingknives_admins
update 2015-9-27:
-added new cvar
sm_throwingknives_admins with override "throwingknives"
flag "o" by default
- fix trail by change knife world model w_knife_*.mdl to w_knife_*_dropped.mdl
update 2015-8-15:
-added new cvar
sm_throwingknives_trails
- fix false headshot announcement in death event
- changed sm_throwingknives_velocity back to use speed value and not multiplier.
- add check, player knive view model path did get replaced with world model path and it does exist.
otherwise use game defaults models.
update 2015-8-12:
+minor update, changed damagetype and few coments
- default settings changed, more speed on knive, short life time
-added new cvars and settings
sm_throwingknives_steal
sm_throwingknives_velocity
sm_throwingknives_damage
sm_throwingknives_hsdamage
sm_throwingknives_modelscale
sm_throwingknives_gravity
sm_throwingknives_elasticity
sm_throwingknives_maxlifetime