Sunday, December 22

Knife It Up v2.0

I have noticed that players are crazy about killing any enemy player with a knife. Knife It Up is a plugin for AMX Mod X. This plugins allows to print a custom message to everyone (HUD) which tells them who was knifed by whom. It can also optionally give that player extra frags and/or additional health depending on the cvar values. HUD Messages are in random colors and the text message color can be customized from the language file by using !g for green, !t for team-color and !n for normal color.

Edit (24-12-2013 10:10 PM) : Added mp3 version of this plugin with 1 additional cvar. Default sound file also attached. You can change the cvar to whatever mp3 file you want.

INSTALLATION
  • Copy knifeitup.amxx or knifeitup_sound.amxx to addons/amxmodx/plugins folder.
  • Edit addons/amxmodx/configs/plugins.ini and add knifeitup.amxx or knifeitup_sound.amxx in it on a new line.
  • Restart the server or change the map for changes to take effect.
  • The language file addons/amxmodx/data/lang/knifeitup.txt is automatically created the first time you run this plugin on your server.
  • Edit the lang file according to your needs.


CVARS
  • amx_knifeitup_health - Number of health to give the killer in case of a knife kill. Keep 0 to disable this feature.
     
  • amx_knifeitup_frags - Number of frags to give the killer in case of a knife kill. Keep 0 to disable this feature.
     
  • amx_knifeitup_mp3 "sound/knifeitup.mp3" - Location of the mp3 file to be played when knifed. (Works only for knifeitup_sound.amxx). Keep blank to disable.



Servers Using This Plugin

Note: If you get any problems with this plugin or find out any bugs in it, please use this page to report them back to me so that I can fix them.

50 comments:

  1. Replies
    1. Please verify if you have downloaded and installed only knifeitup_sound.amxx
      Also verify that amx_knifeitup_mp3 "sound/YOURMP3FILE.mp3" is added added in your amxx.cfg or server.cfg and that the sound file exists in your server directory.
      If your sound file is in other format then use media.io to convert it to MP3 Format.

      Delete
  2. Sounds are not coming I placed file correctly and also the path is right

    ReplyDelete
    Replies
    1. Copy that file to your local CS folder as on the server. Start the game and then try this command
      mp3 play /sound/knifeitup.mp3
      Replace the path with your mp3 location. If you can hear the sound then install the same on the server. If not then something is wrong with your mp3. Convert it to mp3 128kbit/s using the converter website above.

      Delete
  3. Replies
    1. The source snippet is in the AMX Mod X's default cstrike package. Open miscstats.sma and check the knife kill announcement part.

      Delete
    2. When i changed the name of the soundtrack from knifeitup (i wanted to use a diff track),
      the hud message and the track stopped coming...(i added the line in amxx.cfg and server.cfg)..please help

      Delete
    3. Verify if you have the plugin correctly installed and you did not accidentally remove/rename it. I have tested the plugin with 6-7 different sounds and all are working fine. Also verify if you have correct mp3 format. Use media.io to convert it to necessary format if not.

      Delete
  4. yeah got that fixed..the prob was with the mp3 format...i chngd it to 128kbps and worked..
    ..but another prob. came...now only i can hear the sound...others who are connecting to my svr isn't down;oading the mp3 file automatically..and hence can't hear the track..

    ReplyDelete
    Replies
    1. If you change the cvar of the sound file then the new file download for players begins after the server restarts or the map changes.

      Delete
    2. Reason: If I add the precache command to check the new file on every player connect then the plugin will eat up a lot of CPU unnecessarily. So to make the plugin light on resources the file is updated only after the map change or server restart.

      Delete
    3. Restarting didn't solve the problem although one or two downloaded the new file while map changing...but some others who are using the same cs version didn't ......:(

      Delete
    4. If one or two downloaded the new file means that it is not a plugin issue. Try altering the file name so that the server forces everyone to re-download the sound file.

      Delete
    5. tnx bro..!!!..worked..and gr8 job with the plugin!!!!!

      Delete
  5. frag r not working an in cvar i wrote 2 frag and 50 hp helt but it gives +aoo hp not 50hp and no frag r coming help plZ ?????

    ReplyDelete
    Replies
    1. amx_knifeitup_health 50
      amx_knifeitup_frags 2
      Add these cvars to your amxx.cfg and after that edit the addons/amxmodx/data/lang/knifeitup.txt with the values or words your like.

      Delete
  6. Where can I change the cvars permanently ? I can't find cvar in cpanel. plz help asap

    ReplyDelete
    Replies
    1. You have to add those cvars in your addons/amxmodx/configs/amxx.cfg so that they get executed after every map change.

      Delete
  7. I cannot get sound working
    i added amx_knifeitup_mp3 "sound/knifeitup.mp3" in amxx.cfg too
    and also tried amx_Cvar amx_knifeitup_mp3 "sound/knifeitup.mp3" command on the server
    It doesnt works and give this error

    [AMXX] Unknown cvar: amx_knifeitup_mp
    please help

    ReplyDelete
    Replies
    1. If you are getting that error, it means that you have not installed the plugin properly.
      There is nothing wrong with the plugin. Make sure you have installed the plugin correctly. ATM more than 22 servers are using this plugin without any errors.

      Delete
  8. shaliwaha patil i have added sound the default it works and when it change the cvar of sound i want to change sound like /sound/misc/lol.mp3 it doesnt work

    ReplyDelete
    Replies
    1. Check your mp3 format. Convert to standard format using media.io website.
      Make sure you have put the cvar in your amxx and that the cvar value is surrounded with double quotes.

      Delete
  9. Replies
    1. Nope you cannot add that to this plugin.
      But if you want to make it yourself look for the sample source code in miscstats.sma and add an array of sounds and play randomly from the array.
      If you don't know what I just said then you probably should not ask me more about it. Go directly to AM forums Plugin Request Section and post a request there.

      Delete
  10. Hey admin need help . I want to add multiple sounds in knife it up . How to do that ?

    ReplyDelete
    Replies
    1. I already answered it but I'm gonna do it once more -

      Nope you cannot add that to this plugin.
      But if you want to make it yourself look for the sample source code in miscstats.sma and add an array of sounds and play randomly from the array.

      If you don't know what I just said then you probably should not ask me more about it. Go directly to AM forums Plugin Request Section and post a request there.

      Delete
  11. prince got!t 2 !gfrags and!t 25HP!g for knifing shock
    prince got!t 2 !gfrags and!t 25HP!g for knifing shock
    two hud message coming please give me solution

    ReplyDelete
    Replies
    1. Make sure that you do not install both the plugins together. Use only one.
      knifeitup_sound.amxx or knifeitup.amxx
      Both plugins do the same job, just sound plugin will play additional sound which is optional as not everyone wants sound.

      Delete
  12. Great Plugin ! Thanks Works Like Charm In My Server !

    ReplyDelete
  13. this plugin is working fine and i can hear sound when i join my hlds sv.... but when my friends are joining they cannot hear the sound...plz help

    ReplyDelete
    Replies
    1. Make sure that the sound file is uploaded to the server. If correctly done then you should not face any problems as such.

      Delete
  14. i am getting this error bro please help me
    Player got XX frags and XXHP for knifing Wil
    it should show me like this way

    Player got 2 frags and 25HP for knifing Wil

    please help me

    ReplyDelete
    Replies
    1. You need to edit the Lang file as per your settings. I did not hardcode the variables as it was not much flexible.
      Open addons/amxmodx/data/lang/knifeitup.txt and change the text accordingly.

      Delete
  15. Replies
    1. You should re-download and try to install it again. I can use it just fine.

      Delete
  16. This comment has been removed by a blog administrator.

    ReplyDelete
  17. can u tell me how can i put sound on knifeitup tell me step by step/ plzz bro ...

    ReplyDelete
  18. Is it possible to increase the volume of sound, it is a little low than the bullets and other sound...

    ReplyDelete
  19. I NEED LINK TO DOWNLOAD!!! PLZZ RECHECK U R LINK...AND IF IT IS MINE MOB. PROB THENN PLZ GIVE ME IN COMMENT

    ReplyDelete

Comment anything you want. Just be polite and give respect to others!
I am simply going to remove the comments which are offensive or are off topic.
And please don't spam your website links in comments. I don't, neither should you.