Raised This Month: $51 Target: $400
 12% 

req grenade kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Neon123
Senior Member
Join Date: Jan 2016
Old 10-18-2018 , 23:09   req grenade kill
Reply With Quote #1

how to detect a grenade kill and print in chat you killed "player" with grenade, i need in ham_killed

Last edited by Neon123; 10-19-2018 at 03:30.
Neon123 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-19-2018 , 06:19   Re: req grenade kill
Reply With Quote #2

Ham_TakeDamage + DMG_HEGRENADE + victim dead check.
__________________
HamletEagle is offline
Neon123
Senior Member
Join Date: Jan 2016
Old 10-19-2018 , 16:00   Re: req grenade kill
Reply With Quote #3

i need the plugin complete
Neon123 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-20-2018 , 04:31   Re: req grenade kill
Reply With Quote #4

Hook deathmsg event check if the 3rd argument is equal to grenade.

PHP Code:

#include <amxmodx>

public plugin_init()
{
      
register_event("DeathMsg""DeathMsg""a")
}

public 
DeathMsg()
{
      new 
szW[32]
      
read_data(4szWcharsmax(szW))
 
      if(
equal(szW"grenade")) client_print(read_data(1), print_chat"You killed someone with hegrenade");


__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 10-20-2018 at 04:38.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Neon123
Senior Member
Join Date: Jan 2016
Old 10-20-2018 , 14:00   Re: req grenade kill
Reply With Quote #5

thanks you
Neon123 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 10-21-2018 , 01:12   Re: req grenade kill
Reply With Quote #6

With Ham_Killed:

PHP Code:
#define DMG_HEGRENADE  (1<<24) 
PHP Code:
RegisterHam(Ham_TakeDamage"player""ham_TakeDamage"
PHP Code:
public ham_TakeDamage(idinflictorattackerFloat:damagedamagebits

     if(
damagebits DMG_HEGRENADE)
     { 
          
// code
     


__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 10-21-2018 at 01:12.
EFFx 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 13:02.


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