AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   KnifeSyphon (https://forums.alliedmods.net/showthread.php?t=59418)

bl4nk 08-13-2007 21:44

KnifeSyphon
 
10 Attachment(s)
KnifeSyphon

Gives players a health boost when they make a knife kill.

CVars:
  • sm_knifesyphon_enable - Enables\Disables the KnifeSyphon plugin.
    • 0 = off
    • 1 = on (default)
  • sm_knifesyphon_announce - Enables\Disables announcing of the plugin at the beginning of the round.
    • 0 = off
    • 1 = on (default)
  • sm_knifesyphon_life - Amount of life to give to the killer.
    • Ranges from 0 to 100. (default = 25)
Notes:
  • This mod currently supports the following mods:
    • Counter-Strike: Source
    • Day of Defeat: Source
    • Half-Life 2: Deathmatch
    • Any mod that uses knife as it's melee weapon.
  • If sm_knifesyphon_announce is set to 1 and sm_knifesyphon_enable is set to 0, the plugin will not announce.
Thanks to:
  • 1695 for requesting the plugin.
  • pRED* | NZ for help with fixing my translation problems.
  • FlyingMongoose for writing the KnifeMug plugin.
  • blue zebra for de/hu translations
  • noPASARAN for ru translations
Changelog:
  • 1.0
    • Initial Release
  • 1.1
    • Added support for other mods that use 'knife' as a weapon.
    • Shortened the length of the announcement.
  • 1.2
    • Added weapon support for DOD:S and HL2:MP.
    • Added announcement support for DOD:S.
  • 1.3
    • Removed unnecessary code.
    • Changed announcement from each round to the first time the player spawns.
  • 1.4
    • Cvar changes are hooked regardless of default setting (see this post for details).
  • 1.5
    • Plugin will no longer announce if sm_knifesyphon_announce is set to 1 and sm_knifesyphon_enable is set to 0.
  • 1.6
    • Fixed announcement problems.
    • Colorized messages.
  • 1.7
    • Fixed bug where killing with any weapon netted extra HP.
    • Fixed bug where shooting somebody gave HP.
    • Made announcements work properly (without errors!)
    • Shortened the translations a bit (need new ones please) to fit one one line
    • Added TF2 support
  • 1.8
    • Added support for new TF2 weapons:
      • The Sandman
      • The Axtinguisher
      • KGB
      • Ubersaw

FlyingMongoose 08-13-2007 23:52

Re: KnifeSyphon
 
To make this plugin more universal throw this into it instead of CCSPlayer::m_iHealth:

Code:
stock SetClientHealth(client, amount) {     new HPOffs = FindDataMapOffs(client,"m_iHealth");     SetEntData(client,HPOffs,amount,true); }

Most mods use the word "knife" for their knife identification and usually identifying the weapon only requires part of the name, so "knife" will suffice throughout most mods including dods, and css

bl4nk 08-14-2007 00:44

Re: KnifeSyphon
 
Good idea, FlyingMongoose.

Updated to version 1.1

dalto 08-14-2007 00:57

Re: KnifeSyphon
 
If it's helpful, here is what quakesounds defines as a "knife"

CS:S
knife

DOD:S
spade
amerknife
punch

HL2:DM
stunstick
crowbar

bl4nk 08-14-2007 02:50

Re: KnifeSyphon
 
Thanks for that, dalto. It seems that it wouldn't have worked very well with "knife" as the only weapon afterall (at least for those two mods).

Updated to version 1.2

1695 08-14-2007 03:16

Re: KnifeSyphon
 
Woah, quick lol :P !

thx a lot !

bolinux 08-14-2007 04:33

Re: KnifeSyphon
 
sm_knifesyphon_announce is set to 0 but still shown in chat!

Quote:

cvarlist sm_knifesyphon_announce
cvar list
--------------
sm_knifesyphon_announce : 0 : : Enables/Disables the KnifeSyphon announcement at the beginning of the round.

btw nice plugin

bolinux 08-14-2007 10:00

Re: KnifeSyphon
 
same at sm_knifesyphon_enable 0 announce is still shown in chat!

--------------
sm_knifesyphon_enable : 0 : : Enables/Disables the KnifeSyphon plugin.
--------------

^BuGs^ 08-14-2007 14:56

Re: KnifeSyphon
 
Update StrEqual with strcmp. StrEqual is old school checking. :)

Kaschenko 08-14-2007 15:18

Re: KnifeSyphon
 
1 Attachment(s)
correct please
"dod_round"? :)


All times are GMT -4. The time now is 00:51.

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