AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with Death Messages (https://forums.alliedmods.net/showthread.php?t=24568)

Bruno 02-26-2006 09:42

Help with Death Messages
 
How can I show a hudmessage that shows who killed a certain player and who that certain player is?

v3x 02-26-2006 09:48

Code:
#include <amxmodx> public plugin_init() {   register_event("DeathMsg" , "on_death" , "a"); } public on_death() {   new victim_id = read_data(2);   new killer_id = read_data(1);   new killer_name[33];   get_user_name(killer_id , killer_name , 32);   // set_hudmessage   show_hudmessage(victim_id , "%s just killed you!!" , killer_name); }

Bruno 02-26-2006 09:54

Is there any way to make it so it tells everyone who killed that certain person? (not the victim)

By the way thanks for posting so fast.

Bruno 02-26-2006 09:59

Will this still work if I just want it used on one player that was picked randomly?

[ --<-@ ] Black Rose 02-26-2006 10:40

Code:
#include <amxmodx> public plugin_init() {   register_event("DeathMsg" , "on_death" , "a") } public on_death() {   new victim_id = read_data(2)   new killer_id = read_data(1)   new killer_name[33]   get_user_name(killer_id , killer_name , 32)   new victim_name[33]   get_user_name(victim_id , victim_name , 32)   // set_hudmessage   show_hudmessage(0 , "%s just killed %s!!" , killer_name, victim_name) }

Bruno 02-26-2006 10:43

Thanks, but how do I make this work on only the certain person picked randomly?

[ --<-@ ] Black Rose 02-26-2006 10:44

just to show this message to one rendom player??

Bruno 02-26-2006 10:47

No, I just want it to work for the random player picked. The death message that says who killed that random person picked.

[ --<-@ ] Black Rose 02-26-2006 11:17

what?
you want to kill a random player and then show a message WHO killed WHO and to all players?

Bruno 02-26-2006 11:20

Yep. A random player is chosen. When someone kill that certain player, then the death message with the hud goes up. I can't seem to get it to work.


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

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