Raised This Month: $ Target: $400
 0% 

Make custom kills & deaths count towards rank stats.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Voltron
Senior Member
Join Date: Jun 2007
Location: Above the battlefield.
Old 05-13-2011 , 02:12   Make custom kills & deaths count towards rank stats.
Reply With Quote #1

Let's say I've turned the flashbang into an instant kill grenade.
How can I make the kills and deaths caused by this nade count towards the stats in amx rank?

I've tried:
PHP Code:
user_silentkill(player);
make_deathmsg(owner,player,0,"grenade"); 
But it doesn't work.
__________________
Voltron is offline
pRoxxxDD
Junior Member
Join Date: Feb 2011
Location: Ukraine
Old 05-13-2011 , 04:21   Re: Make custom kills & deaths count towards rank stats.
Reply With Quote #2

You must block DeathMsg after user_kill, and then send your death msg.
__________________
pRoxxxDD is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-13-2011 , 05:20   Re: Make custom kills & deaths count towards rank stats.
Reply With Quote #3

user_silentkill() blocks deathmsg.

About stats... try using ham: ExecuteHamB(Ham_Killed, victim, attacker, gib) to fake the kill.
"gib" you can set to 1 if you want the victim to explode in gibs, if not, just set 0.
__________________
Hunter-Digital is offline
Voltron
Senior Member
Join Date: Jun 2007
Location: Above the battlefield.
Old 05-13-2011 , 07:28   Re: Make custom kills & deaths count towards rank stats.
Reply With Quote #4

Quote:
Originally Posted by Hunter-Digital View Post
About stats... try using ham: ExecuteHamB(Ham_Killed, victim, attacker, gib) to fake the kill.
Doesn't work. I think I'll need to fake a gun, knife or nade kill.

Is there anyway to do that?
__________________
Voltron is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-13-2011 , 08:38   Re: Make custom kills & deaths count towards rank stats.
Reply With Quote #5

You could just look at csx module's source and see what it's reading to count kills.
__________________
Hunter-Digital is offline
Voltron
Senior Member
Join Date: Jun 2007
Location: Above the battlefield.
Old 05-13-2011 , 22:47   Re: Make custom kills & deaths count towards rank stats.
Reply With Quote #6

I found this:
https://forums.alliedmods.net/showthread.php?t=47286

So it looks like it's a bug that was never fixed.

Quote:
Originally Posted by Hunter-Digital View Post
You could just look at csx module's source and see what it's reading to count kills.
Yeah I'll try that.
__________________
Voltron is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-14-2011 , 01:43   Re: Make custom kills & deaths count towards rank stats.
Reply With Quote #7

Show more code, where you deal damage for example.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Voltron
Senior Member
Join Date: Jun 2007
Location: Above the battlefield.
Old 05-14-2011 , 07:33   Re: Make custom kills & deaths count towards rank stats.
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
Show more code, where you deal damage for example.
I've tried all the possible ways of damaging and killing a player.
The kills and deaths are just not being counted.

And now I've got a new idea...
To kill a player with a flashbang, I'm gonna set the users health to 1hp and then spawn a hegrenade on the player and detonate it.
Hopefully CSX will pick that up as a grenade death and count the kills/deaths.

Think it will work?
__________________
Voltron is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-14-2011 , 07:36   Re: Make custom kills & deaths count towards rank stats.
Reply With Quote #9

Send Ham_TakeDamage with nade entity index as inflictor, attacker index as attacker, (1<<24) as damagebit.
I think that's the only thing you have to do, DeathMsg, Damage events gonna be sent by the game.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Voltron
Senior Member
Join Date: Jun 2007
Location: Above the battlefield.
Old 05-14-2011 , 08:16   Re: Make custom kills & deaths count towards rank stats.
Reply With Quote #10

Quote:
Originally Posted by ConnorMcLeod View Post
Send Ham_TakeDamage with nade entity index as inflictor, attacker index as attacker, (1<<24) as damagebit.
I think that's the only thing you have to do, DeathMsg, Damage events gonna be sent by the game.
If you mean liks this:

PHP Code:
const DMG_GRENADE = (1<<24)

ExecuteHam(Ham_TakeDamageplayerentowner100.0DMG_GRENADE); 
Well it doesn't work. It should... but it doesn't!
__________________

Last edited by Voltron; 05-14-2011 at 08:28.
Voltron 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 17:47.


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