AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Modifying the Death Message (https://forums.alliedmods.net/showthread.php?t=229489)

wiwi249 11-08-2013 16:28

Modifying the Death Message
 
Hello guys!
I'm making my mod now and I need to change the DeathMessage weapon...
I'm gonna work on sprites with it.
For example - someone gets killed with "sg552" and now, i want to firstly change it to "acr" and then to show the death message with "acr" as inflictor/weapon. I know that there a "skull" sprite will appear instead of sg552 sprite, but that's what I want.
Any ideas how to?

NiHiLaNTh 11-08-2013 16:34

Re: Modifying the Death Message
 
Code:

new wpn[32];
get_msg_arg_string(4, wpn, charsmax(wpn));

if (equal(wpn, "sg552"))
{
    set_msg_arg_string(4, "acr");
}


baneado 11-08-2013 16:44

Re: Modifying the Death Message
 
The skull sprite appears when you change the weapon kill to a non existing weapon (like the example)

wiwi249 11-08-2013 16:47

Re: Modifying the Death Message
 
yeah, I know that, with this I will be able to work on sprites now.
Nihi, this code should be put in which function? deathmsg?

NiHiLaNTh 11-09-2013 13:38

Re: Modifying the Death Message
 
hook Deathmsg with register_message


All times are GMT -4. The time now is 23:14.

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