AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   Kill Messages (https://forums.alliedmods.net/showthread.php?t=149758)

Black Haze 02-11-2011 06:48

Kill Messages
 
4 Attachment(s)
Credits:
  • Original by Martin, but abandoned and left not working
  • Plugin finished by Black Haze (code) and Siang Chun (overlays)
  • Massaļ Fou overlays by Skabull
  • Loads of thanks to Thetwistedpanda and Psychonic for helping me fix things

What does it do?
Simply put, on a kill, it'll render and overlay onto the attackers screen, showing him messages like headshot, grenade kill, those kinds of things. Think of it as Quake Sounds, but visual.

These are two plugins, sm_killmessage_framework and sm_killmessage_overlays_basicsupport.

Framework contains the core functions, like precaching custom overlays and adding em to the download table, and showing overlays to a specific user. This plugin should always be in place.

Basic support is a sample plugin that shows how to use the framework. It tracks killstreaks, headshot, knife and HE grenade kills, and uses overlays for this.
On mapstart it'll send commands to the framework telling it to precache the different overlays. On kill, it'll send the right overlay to the right person.

How do I make custom overlays?
Siang Chun wrote a tutorial after he finetuned the overlays for the plugin:
Quote:

Originally Posted by siangc (Post 1411470)
Ok here's a quick how to:
You need photoshop and vtfedit which you can get here:
http://nemesis.thewavelength.net/index.php?p=40


Then follow this tutorial on how to make a transparent spray:
http://www.youtube.com/watch?v=SqeRc...layer_embedded

The only important thing is making the alpha map properly, and instead of 256x256, use 512x512 or 1024x1024.

vtfedit
Import (file>import) your tga file, use these settings
[IMG]http://img211.**************/img211/5457/67781449.th.jpg[/IMG]
Save it as vtf. Find the vtf file you just saved, at the same location there will be a .vmt file with the same name, open it in notepad, replace everything inside with this

"UnlitGeneric"
{
"$translucent" 1
"$basetexture" "killmessages\yourfile"
"$no_fullbright" 1
"$ignorez" 1
}



Replace the name here, without the file extension.
"$basetexture" "killmessages\yourfile"

Then you are done.

How do I make a custom plugin for a different style of game, ie gungame?
Basically call sm_killmessage_prepare on MapStart for every overlay you use, and call sm_killmessage_show on any given time to show the plugin. That's all, the rest you can and have to make up for yourself. Use sm_killmessage_overlays_basicsupport as an example.

CVars
sm_killmessage_framework
sm_killmessage_overlays_length
Length of time an overlay is showed
Default 3.0
sm_killmessage_overlays_basicsupport
sm_killmessage_bs_grenade
Name of the grenade kill overlay (no extension)
Default "kill_grenade"
sm_killmessage_bs_headshot
Name of the headshot kill overlay (no extension)
Default "kill_headshot"
sm_killmessage_bs_knife
Name of the knife kill overlay (no extension)
Default "kill_knife"
sm_killmessage_bs_killnaming
Naming convention for the kill overlays (numbers are added automatically,no extension)
Default "kill_"
sm_killmessage_bs_maxkillstreak
Amount of kills allowed in a killstreak (it'll restart at 1 after the end)
Default 4



http://beernweed.com/Ian/killoverlays/1kill_thumb.jpghttp://beernweed.com/Ian/killoverlays/2kills_thumb.jpghttp://beernweed.com/Ian/killoverlays/3kills_thumb.jpghttp://beernweed.com/Ian/killoverlays/4kills_thumb.jpghttp://beernweed.com/Ian/killoverlays/HEKill_thumb.jpghttp://beernweed.com/Ian/killoverlays/HSKill_thumb.jpghttp://beernweed.com/Ian/killoverlay...Kill_thumb.jpg

Don't mind the white text all over it, it's not part of the plugin. It's quake sounds I believe, just couldn't be arsed to clean out a server off mods just for some screenshots ;)

http://beernweed.com/Ian/killoverlays/vtfedit_thumb.jpg
This is how it looks in VTFEdit, as you can see you can position the message everywhere on the screen, the 1024x1024 overlay is stretched over the screen.

Update log
sm_killmessage_framework
Update 1.1
  • Removed UnlockConsoleCommandAndConvar, was unnecessary
Update 1.2
  • Added bot checks
  • Removed an unnecessary timer kill

sm_killmessage_overlays_basicsupport
Update 1.1
  • Moved preload code and CVar initiation to OnConfigsExecuted() because config wouldn't be read
Update 1.2
  • Added bot checks
  • Added killstreak saving, so your killstreak stays intact when the round ends
  • Added overlays for round end (CT / T wins!)
  • Defaulted to Siang Chun's silver killoverlays
Update 1.2fixed
  • Killstreak saving wasn't reset correctly

Update notes:
Next update will go live when these are fixed:

Update 1.3
  • Sounds
    Not Yet Done
  • Skip killstreak numbers - MoM
    Needs to be redone
  • Integrate psychonic's optimisations, noted here
    Not Yet Done
  • Add support for disabling certain overlays by keeping their values empty in the config
    Not Yet Done
  • Add a teamkill check to the player death event
    Not Yet Done
  • Add adminflag support
    Not Yet Done
  • Add userpref support
    Not Yet Done

That's it! Good luck, enjoy the plugin, lemme know if something is broken and all that.

Attached are the two plugins, and a zip to run it out of the box containing:
  • Plugins source (addons\sourcemod\scripting)
  • Plugins compiled (addons\sourcemod\plugins)
  • Config file (cfg\sourcemod)
  • Kill overlays (materials\killmessages)

Also attached are Skabull's Massaļ Fou Overlays, which look just awesome!
In order to use these, just download them, and use the config and materials instead of the ones in the default package.

Snake60 02-11-2011 09:52

Re: Kill Messages
 
Works like a сharm! GJ :up:

Black Haze 02-11-2011 10:02

Re: Kill Messages
 
Quote:

Originally Posted by Snake60 (Post 1412572)
Works like a сharm! GJ :up:

Nice, have fun with it!

Snake60 02-11-2011 10:30

Re: Kill Messages
 
1 Attachment(s)
Thanks :)
Find small bug. If you kill fast the two enemies in a row, then we get here is a picture:
(It seems the first sprite prevents got a second or something in that spirit)

Black Haze 02-11-2011 10:54

Re: Kill Messages
 
1 Attachment(s)
Quote:

Originally Posted by Snake60 (Post 1412614)
Thanks :)
Find small bug. If you kill the two enemies in a row (when 1st enemy kill in head and 2nd in body), then we get here is a picture:
(It seems the first sprite prevents got a second or something in that spirit)

Wow I've never had that, even on DM. Can probably fix it by clearing the screen before putting up a new one. Compiled a fixed version of the framework, could you test it for me and confirm the issue is gone before I update the first post?

Oh shit I did it again, sorry psyconic not doin it on purpose :p here's the source and autobuild thingy

Snake60 02-11-2011 10:56

Re: Kill Messages
 
OK. Give me couple of minute

Snake60 02-11-2011 11:07

Re: Kill Messages
 
Nope. Same thing :(
May be this only my local problem (plugins conflict o e.t.)... I will try to switch of 1 by 1 plugin, to find out.

Black Haze 02-11-2011 11:10

Re: Kill Messages
 
Quote:

Originally Posted by Snake60 (Post 1412657)
Nope. Same thing :(
May be this only my local problem (plugins conflict o e.t.)... I will try to switch of 1 by 1 plugin, to find out.

Any plugins using r_overlay? Could you do a "sm plugins list" in console so I could take a look at what could be it? Probably is a conflict, but I'll try n solve it if possible. On your screenshot it says -15XN, might be that plugin.

Black Haze 02-11-2011 19:30

Re: Kill Messages
 
Plugin description and version vanished from first post info?

Black Haze 02-12-2011 07:55

Re: Kill Messages
 
Ok this is the third and last time I filled that out. Next time I'll just take the lot down.


All times are GMT -4. The time now is 17:21.

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