AlliedModders

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

stigma 03-25-2005 18:15

Death Announcement
 
I've made a little death msg script here, but it wont work, i think it's something with the 'register_event' because i dont know what i should set the flags to, i've forgotten it.. But take a look:

Code:
#include <amxmodx> public plugin_init() {   register_event("DeathMsg","death","abd") } public DeathMsg(id) {   new killer = read_data(1)   new khealth[32]   get_user_health(id,khealth,31)   new karmor[32]   get_user_armor(id,karmor,31)   new message[100]   format(message,99,"You where killed by %s^nHe still has %i HP and %i AP", killer, khealth, karmor);     set_hudmessage(100, 50, 200, 1.50, 1.50, 2, 2.0, 5.0, 0.3, 0.2, 6)   show_hudmessage(id,message) }

xeroblood 03-25-2005 23:12

Code:
#include <amxmodx> public plugin_init() {   register_event( "DeathMsg",  "Event_Death",  "a" ) } public Event_Death() {   new killer = read_data(1)   new victim = read_data(2)   new khealth = get_user_health(killer)   new karmor = get_user_armor(killer)   new killer_name[32]   get_user_name( killer, killer_name, 31 )   new message[100]   format(message,99,"You were killed by %s^nHe/She still has %i HP and %i AP", killer_name, khealth, karmor);     set_hudmessage(100, 50, 200, 1.50, 1.50, 2, 2.0, 5.0, 0.3, 0.2, 6)   show_hudmessage(id,message)   return PLUGIN_CONTINUE }

v3x 03-25-2005 23:31

Take a look at my nade messages plugin for another example. :D

stigma 03-26-2005 04:52

Kay :)

Edit: Well i cant find it :/

v3x 03-26-2005 05:27

:arrow:
http://forums.alliedmods.net/showthread.php?t=11525


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

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