Raised This Month: $2 Target: $400
 0% 

player death detect?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jugule
Member
Join Date: Apr 2020
Old 06-15-2020 , 17:39   player death detect?
Reply With Quote #1

Hi, how can I detect if a player is receiving a slay? I have a function at player_death, but when the player receives a slay, that function does not apply, but otherwise it does.
jugule is offline
SSheriFF
AlliedModders Donor
Join Date: May 2020
Location: Israel
Old 06-15-2020 , 18:00   Re: player death detect?
Reply With Quote #2

PHP Code:
public void OnPluginStart()
{
    
HookEvent("player_death"Event_PlayerDeath);
}
public 
Action Event_PlayerDeath(Event event, const char[] namebool dontBroadcast)
{
    
int userid GetClientOfUserId(event.GetInt("userid"));
    
int attacker GetClientOfUserId(event.GetInt("attacker"));
    if (
attacker == userid)
      {
       
//that means the player got slayed or just suicided.
      
}

__________________
SSheriFF is online now
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 11:11.


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