Raised This Month: $40 Target: $400
 10% 

req grenade kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Neon123
Senior Member
Join Date: Jan 2016
Old 10-19-2018 , 00: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 04:30.
Neon123 is online now
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-19-2018 , 07: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 , 17:00   Re: req grenade kill
Reply With Quote #3

i need the plugin complete
Neon123 is online now
Natsheh
Veteran Member
Join Date: Sep 2012
Location: Muslim and proud!
Old 10-20-2018 , 05: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 API MODE 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !

@Arena Mod 90% done !

Gaming Districts Community
Donate

Last edited by Natsheh; 10-20-2018 at 05: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 , 15:00   Re: req grenade kill
Reply With Quote #5

thanks you
Neon123 is online now
EFFx
Veteran Member
Join Date: Feb 2016
Location: SP, Brazil
Old 10-21-2018 , 02: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
     


__________________

Last edited by EFFx; 10-21-2018 at 02:12.
EFFx is offline
Send a message via Skype™ to EFFx
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 13:21.


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