Raised This Month: $32 Target: $400
 8% 

DeathMsg - TruncatedWeaponName Param


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 04-11-2015 , 15:30   DeathMsg - TruncatedWeaponName Param
Reply With Quote #1

Well i have a question about displaying a custom deathmsg.
PHP Code:
message_begin(MSG_BROADCASTget_user_msgid("DeathMsg"))
write_byte(Attacker)
write_byte(Victim)
write_byte(0)
write_string("TruncatedWeaponName")
message_end() 
What can i use as TruncatedWeaponName? Is there some list? Can i use my own sprites?
From what i understood it is about classnames, but i don't really understood how to use this parameter properly.
__________________
Jhob94 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 04-11-2015 , 15:45   Re: DeathMsg - TruncatedWeaponName Param
Reply With Quote #2

from https://wiki.alliedmods.net/Half-lif...vents#DeathMsg:
Quote:
Note: KillerID may not always be a Player ID. It would be 0 if a player died from fall/acid/radiation/fire/etc damage/lack of oxygen or from touch to a "trigger_hurt" entity, in which cases TruncatedWeaponName will be "worldspawn" and "trigger_hurt" respectively.
Note: For vehicle kills, TruncatedWeaponName could be "vehicle", "tank", etc.
Note: TruncatedWeaponName doesn't contain a "weapon_" prefix. See CS Weapons Information for more information.
Note: For a grenade kill, TruncatedWeaponName isn't "hegrenade", but rather "grenade", which is the actual classname of a thrown grenade.
as far as i know custom sprites cannot be used in deathmessages

Last edited by jimaway; 04-11-2015 at 15:46.
jimaway is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 04-11-2015 , 15:47   Re: DeathMsg - TruncatedWeaponName Param
Reply With Quote #3

I already read that, my question was:
"What can i use as TruncatedWeaponName? Is there some list? Can i use my own sprites?"

Edit:
Only saw now your edit, well i thought that too about using own sprites but could be possible so wouldn't hurt to ask
Still, is there some list where i can see all the TruncatedWeaponName available to be used?
__________________

Last edited by Jhob94; 04-11-2015 at 15:55.
Jhob94 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-11-2015 , 17:59   Re: DeathMsg - TruncatedWeaponName Param
Reply With Quote #4

Why don't you just try custom names to see if it works?
__________________
Bugsy is offline
Kz1.0
Senior Member
Join Date: Jan 2013
Location: Vietnam
Old 04-11-2015 , 23:20   Re: DeathMsg - TruncatedWeaponName Param
Reply With Quote #5

I guess "TruncatedWeaponName" is all the "d_" sprite in hud.txt, to show it you must remove the d_ prefix.

PHP Code:
d_knife                   320 640hud1    192    0    48    16
d_ak47                  320 640hud1    192    80    48    16
d_awp                      320 640hud1    192    128    48    16
d_deagle            320 640hud1    224      16    32    16
d_flashbang            320 640hud1    192    192    48    16
d_fiveseven            320 640hud16    192    0    32    16
d_g3sg1                320 640hud1    192    144    48    16
d_glock18            320 640hud1    192    16    32    16
d_grenade            320 640hud1    224    192    32    16
d_m249                320 640hud1    192    160    48    16
d_m3                320 640hud1    192    48    48    16
d_m4a1                320 640hud1    192    96    48    16
d_mp5navy            320 640hud1    192    64    32    16
d_p228                320 640hud1    224    32    32    16
d_p90                320 640hud1    192    176    48    16
d_scout                320 640hud1    192    208    48    16
d_sg550                320 640hud16    192    48    48    16
d_sg552                320 640hud1    192    112    48    16
d_ump45            320 640hud16    192    80    48    16
d_usp                320 640hud1    192    32    32    16
d_tmp                320 640hud1    224    64    32    16
d_xm1014            320 640hud1    192    224    48    16
d_skull                320 640hud1    224    240    32    16
d_tracktrain            320 640hud1    192    240    32    16
d_aug                    320 640hud1 148    240    44    16
d_mac10                320 640hud1    109    240    34    16    
d_elite                320 640hud1 52    240    57    16
d_headshot                320 640hud1 0     240   36    16 
Kz1.0 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-12-2015 , 03:50   Re: DeathMsg - TruncatedWeaponName Param
Reply With Quote #6

Just remove "weapon_" from weapon name, it should be enough.
__________________
HamletEagle is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-12-2015 , 04:36   Re: DeathMsg - TruncatedWeaponName Param
Reply With Quote #7

Kz1.0 is right, client will format a string like "d_ + string passed in message".

If there was a way to edit easily hud.txt, you could for sure use your own sprites.
__________________
Arkshine is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 04-12-2015 , 07:27   Re: DeathMsg - TruncatedWeaponName Param
Reply With Quote #8

you can't use custom sprites but you can do some cool stuff with the existing ones
the list is the one posted by kz1.0 , without d_ in front of them

check this sexy plugin out for reference , it shows the train when someone is killed by a vehicle (instead of skull) https://forums.alliedmods.net/showthread.php?p=916987
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever 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 04:57.


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