Raised This Month: $ Target: $400
 0% 

Spade/Knife [humiliation] for DODS announce in txt and on screen option


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Happy DODs player
AlliedModders Donor
Join Date: Sep 2009
Old 07-22-2024 , 14:33   Spade/Knife [humiliation] for DODS announce in txt and on screen option
Reply With Quote #1

https://forums.alliedmods.net/showthread.php?p=1317255

Hi, Guys and Galls,

Can someone create a plugin for Dods, when you get killed by the knife or spade,

you get a annouce for this on screen or ingame txt ( keep this a option if possible with cvars )

Thank you for reading this

Eric.
__________________
Happy DODs player is offline
Bacardi
BANNED
Join Date: Jan 2010
Location: mom's basement
Old 08-09-2024 , 19:03   Re: Spade/Knife [humiliation] for DODS announce in txt and on screen option
Reply With Quote #2

Here is quick dirty example plugin.
This should work on other games as well, which have event player_death AND you know weapon names.

Cvar to enable/disable chat message: sm_humiliationannounce 1


Install test.smx into plugins folder.
Extract and move file humiliationannounce.kv into ...addons/sourcemod/configs/ folder.

Edit humiliationannounce.kv file with txt editor. Notepad++ or another program is better than regular notepad.exe

Kv file look like this inside zip file
Code:
// double slash is comment line.


"humiliation"
{
	"k98"	// weapon name, you can find more from event player_death (net_showevents 2)
	{
	}

	"mp40"
	{
	}

	"mg42"
	{
	}

	"riflegren_us"
	{
	}

	"pschreck"
	{
		//"1"		"%N died by rocket blast!"	// This line is disabled
	}

	"spade"
	{
		"1"		"Oh no! %N got a shovel in the face."				// multiple phrases, are choosed randomly.
		"2"		"%N was killed with a spade. How humiliating!"			// Victim name can be added in phrase, once, using %N.
		"3"		"%N is eating DIRT!"
		"4"		"Archaeologist dug long lost soldier, %N."
	}

	"punch"
	{
		"1"		"Oh no! %N got a fist in the face."
		"2"		"%N was killed with a knuckles. How humiliating!"
	}

	"amerknife"
	{
		"1"		"%N was killed with a amerknife. How humiliating!"
	}
}
...for extra, phrases contain some hidden character what change chat message color, you wont see those in here forum post.
But you can see from Notepad++
Attached Files
File Type: sp Get Plugin or Get Source (test.sp - 46 views - 1.8 KB)
File Type: zip humiliationannounce.zip (600 Bytes, 30 views)
Bacardi is offline
Happy DODs player
AlliedModders Donor
Join Date: Sep 2009
Old 08-11-2024 , 12:59   Re: Spade/Knife [humiliation] for DODS announce in txt and on screen option
Reply With Quote #3

Nice work, gracias,

Gone upload it this week and test.
__________________
Happy DODs player is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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