Raised This Month: $ Target: $400
 0% 

do_deathmsg - Hegrenade bug! :(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RuleBreaker
Senior Member
Join Date: May 2011
Old 02-16-2013 , 10:33   do_deathmsg - Hegrenade bug! :(
Reply With Quote #1

When I do do_deathmsg with szWeaponLong = "weapon_hegrenade" instead of bomb icon for deathmsg I get skull icon...

Error log is empty :


EDIT: Rest of the code

I want to do custom deathmsg with normal icon

Code:
if(equali(szWeapon, "grenade"))
			szWeaponLong = "weapon_grenade"
		else
			formatex(szWeaponLong, 31, "weapon_%s", szWeapon)

		new args[4]
		
		args[0] = iVictim
		args[1] = iKiller
		args[2] = iHS
		args[3] = get_weaponid(szWeaponLong)
		set_task(0.1, "player_diePost", 0, args, 4)
Code:
public player_diePost(arg[])
{
	new szWeapon[24]
	new iKiller = arg[1]

	get_weaponname(arg[3], szWeapon, 23)
	replace(szWeapon, 23, "weapon_", "")

	do_deathmsg(iKiller, arg[0], arg[2], szWeapon)

	set_msg_block(msgID_sayText, BLOCK_ONCE)
	set_user_info(iKiller, "name", g_szName[iKiller])
	return PLUGIN_CONTINUE
}

Last edited by RuleBreaker; 02-17-2013 at 11:06.
RuleBreaker is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 02-16-2013 , 11:08   Re: do_deathmsg - Hegrenade bug! :(
Reply With Quote #2

Remove the weapon_.
__________________
Retired.
Xalus is offline
RuleBreaker
Senior Member
Join Date: May 2011
Old 02-16-2013 , 13:26   Re: do_deathmsg - Hegrenade bug! :(
Reply With Quote #3

Read edit, i forgot to mention that

Last edited by RuleBreaker; 02-16-2013 at 14:06.
RuleBreaker is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 02-16-2013 , 15:43   Re: do_deathmsg - Hegrenade bug! :(
Reply With Quote #4

The weaponname for grenade in DeathMsg is "grenade".

Next time try debugging before posting a thread (make the server output the weapon name in chat).
Backstabnoob is offline
RuleBreaker
Senior Member
Join Date: May 2011
Old 02-16-2013 , 15:56   Re: do_deathmsg - Hegrenade bug! :(
Reply With Quote #5

If I use grenade I don't even get deathmsg on server :/
RuleBreaker is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 02-16-2013 , 15:59   Re: do_deathmsg - Hegrenade bug! :(
Reply With Quote #6

What are you trying to do? Can you provide your code?
Backstabnoob is offline
Old 02-16-2013, 16:06
RuleBreaker
This message has been deleted by RuleBreaker.
RuleBreaker
Senior Member
Join Date: May 2011
Old 02-17-2013 , 11:07   Re: do_deathmsg - Hegrenade bug! :(
Reply With Quote #7

I added whole code, can someone please help me?
RuleBreaker is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-17-2013 , 11:11   Re: do_deathmsg - Hegrenade bug! :(
Reply With Quote #8

Why are you converting string to weapon type, and then weapon type to string ???

Also, weapon_hegrenade becomes "hegrenade", and it shoud be "grenade"
Same, but don't know if you use it for mp5 and mp5navy
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



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 00:33.


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