View Single Post
Author Message
meng
Veteran Member
Join Date: Oct 2005
Location: us
Old 04-26-2010 , 01:00   [CSS] Throwing Knives
Reply With Quote #1

CSS Throwing Knives

Credit & Thanks
MaTi, pimpinjuice, blodia, YouzAMenace, Greyscale

Features
  • Primary attack throws a knife
  • Obeys mp_friendlyfire
  • Headshot detection
  • Steal other player's knives (optional)
  • Trail effect (optional)
CVars *Auto generated config (cfg/sourcemod folder)
PHP Code:
// Amount of knives players spawn with.
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "100.000000"
sm_throwingknives_count "3"

// Damage adjustment.
// -
// Default: "57"
// Minimum: "10.000000"
// Maximum: "200.000000"
sm_throwingknives_damage "57"

// Enable/disable dev. mode.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_throwingknives_dev "0"

// Knives remaining display location. 1 = Hint | 2 = Key Hint
// -
// Default: "1"
// Minimum: "1.000000"
// Maximum: "2.000000"
sm_throwingknives_display "1"

// Enable/disable plugin.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_throwingknives_enable "1"

// Headshot damage adjustment.
// -
// Default: "127"
// Minimum: "20.000000"
// Maximum: "200.000000"
sm_throwingknives_hsdamage "127"

// Set to "1" if using noblock for players.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_throwingknives_noblock "0"

// If enabled, knife kills get the victims remaining knives. 0 = Disabled | 1 = Melee kills only | 2 = All knife kills
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "2.000000"
sm_throwingknives_steal "1"

// Enable/disable trail effect.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_throwingknives_trail "0"

// Velocity (speed) adjustment.
// -
// Default: "5"
// Minimum: "1.000000"
// Maximum: "10.000000"
sm_throwingknives_velocity "5" 
Natives
PHP Code:
SetClientThrowingKnives(clientnum);
GetClientThrowingKnives(client); 
Global Forwards *Enabled with sm_throwingknives_dev
PHP Code:
Action:OnKnifeThrow(client)
Action:OnKnifeHit(victimattackerbool:headshot)
OnPostKnifeKill(victimattackerbool:headshot
More on that ^^^ .
Attached Files
File Type: inc cssthrowingknives.inc (850 Bytes, 12336 views)
File Type: sp Get Plugin or Get Source (cssthrowingknives.sp - 28401 views - 13.3 KB)
__________________
.
[ 1 Dumerils Boa | 1 Cali King ]...
.
I'm a lil' spirituous.

Last edited by meng; 04-22-2011 at 14:38. Reason: Updated again. Again.
meng is offline
Send a message via Yahoo to meng