AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Custom DeathMsg? (https://forums.alliedmods.net/showthread.php?t=88366)

Spunky 03-23-2009 17:49

Custom DeathMsg?
 
So far, this is what I have...

Code:
public cmd_deathmsg(id) {     message_begin(MSG_ALL, get_user_msgid("DeathMsg"), {0, 0, 0}, 0)     write_byte(0) // killer     write_byte(id) // victim     write_string("starvation") // weapon     message_end()     return PLUGIN_HANDLED }

Which prints "Spunky killed self with starvation" in the console. What I want is for the actual DeathMsg in the top right to show "Starvation" as the killer instead of the weapon, which doesn't work. Is there a way to do this? If not, then I want to fix it so that it will actually display as the weapon.

Exolent[jNr] 03-23-2009 22:48

Re: Custom DeathMsg?
 
You could change the player's name before you send the message, then change the name back.

Hunter-Digital 03-24-2009 07:18

Re: Custom DeathMsg?
 
I think he wants a fake killer named "starvation" to kill a player... you could rename another player for that but what if the server only has one player ?! you could do a bot for that... named with the mod name or something... then when the player starves to death.. rename the bot quickly, set him as the killer and rename him back... there's a plugin that allows players to change name while they are dead...

Spunky 03-24-2009 13:10

Re: Custom DeathMsg?
 
Quote:

Originally Posted by Hunter-Digital (Post 787856)
I think he wants a fake killer named "starvation" to kill a player...

Yeah, that's exactly what I want.

Hunter-Digital 03-24-2009 13:34

Re: Custom DeathMsg?
 
Well, I told you what you need to do... don't you know how ?

to create a spectator bot just search for a kz plugin, and see there how it's made :) I think you can manage the rest

fysiks 03-24-2009 18:31

Re: Custom DeathMsg?
 
There is a dod plugin that replaces the X symbol with the persons weapon for suicides. Maybe code from that can be useful, idk.


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

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