AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CSS] Throwing Knives (https://forums.alliedmods.net/showthread.php?t=125226)

meng 04-26-2010 01:00

[CSS] Throwing Knives
 
2 Attachment(s)
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 ^^^ .

Bacardi 04-26-2010 07:22

Re: [CSS] Throwing Knives
 
Hahahaha... Have been thinking why can't throw this knife what you have on hand :D
And it's hard to hit target.

Ok, knife disapears after many seconds when you have throw it.
But when I played with bots they stuck on ladder and when I looked, there where knife stuck on wall... and doesn't disapear.
It appears when you walk into a wall (face lean ont the wall) and start throw knifes.
Knife are inside wall and not disapear.

*Would there add cvar knife_disapear 1/0 ?
Knifes stay on field

hmm and another ideas what can be impossible ?
cvar option that
- player have that one same knife if he throw that, he don't have that knife anymore. Stripped weapon knife (model pose T position when no weapons.)
- Can collect knife on ground/wall after throwin it ??

But great plugin for fun.

Dr!fter 04-26-2010 07:43

Re: [CSS] Throwing Knives
 
Nice job meng sorry i couldn't ever finish it i just got burried work with school and work after you sent me your version to look at. Nice to see you released yours though. Aswell as added more to it nice!!

shustas 04-26-2010 07:45

Re: [CSS] Throwing Knives
 
So... on 32 slots server with all throwing knives around... Will than not give lag and all models jumping around problem?

nonick 04-26-2010 08:55

Re: [CSS] Throwing Knives
 
Cool and fun plugin. But i have little problem, i need let throw the knife after 30sec than starts round, so could someone rewrite here or PM a modified version to me
Thx ;]

meng 04-26-2010 14:09

Re: [CSS] Throwing Knives
 
Quote:

Originally Posted by Bacardi (Post 1161141)
Ok, knife disapears after many seconds when you have throw it.
But when I played with bots they stuck on ladder and when I looked, there where knife stuck on wall... and doesn't disapear.
It appears when you walk into a wall (face lean ont the wall) and start throw knifes.
Knife are inside wall and not disapear.

I can see that happening now that you mention it. I need to make sure it doesn't spawn inside anything since it needs to hit something and make a sound in order to trigger removal. Will see what I can do. Thank you for quick feedback!
Quote:

Originally Posted by Bacardi (Post 1161141)
*Would there add cvar knife_disapear 1/0 ?
Knifes stay on field
- Can collect knife on ground/wall after throwin it ??

I have a version that does this. But it requires SDK Hooks ext. and doesn't work as nicely. I think its best to remove them. Having too many knives just lying around would eventually cause problems one way or another.
Quote:

Originally Posted by YouzAMenace (Post 1161157)
Nice job meng sorry i couldn't ever finish it i just got burried work with school and work after you sent me your version to look at. Nice to see you released yours though. Aswell as added more to it nice!!

Thanks, it didn't seem like anybody else was working on it and I was still fooling around with it for a friend of mine. I thought this version without the need for an ext. would be a good release.
Quote:

Originally Posted by shustas (Post 1161160)
So... on 32 slots server with all throwing knives around... Will than not give lag and all models jumping around problem?

Maybe somebody:wink: could give feedback on that. I kept that in mind when making this somewhat simplified version of the plugin. It should be ok, just need to fix the problem Bacardi mentioned.

meng 04-26-2010 15:17

Re: [CSS] Throwing Knives
 
Updated. v1.0.

Hopefully fixed the issue Bacardi mentioned.

nonick 04-26-2010 16:51

Re: [CSS] Throwing Knives
 
meng,
Could you write for me code, wich this work than round start after 30sec you just can throw knifes??

Xp3r7 04-26-2010 21:25

Re: [CSS] Throwing Knives
 
Nice to see this man and thank you to meng and YouzAMenace for doing my request! :D

Xp3r7 04-27-2010 05:43

Re: [CSS] Throwing Knives
 
I got reports that the knives never did damage to anyone and they still stuck in the wall.

I have noblock on btw.


All times are GMT -4. The time now is 13:54.

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