Raised This Month: $ Target: $400
 0% 

How to check if enemy was killed trough walls?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
pob18
Member
Join Date: Jun 2014
Old 07-01-2014 , 10:15   How to check if enemy was killed trough walls?
Reply With Quote #1

Okay, so I have this code and I want to add more stuff!
Check if the player killed the enemy trough a wall, is it possible?

PHP Code:
#include <amxmodx>
#include <fun>
#include <dhudmessage>

new nKiller

public plugin_init()
{
    
register_event("DeathMsg""hook_death""a""1>0")     
}

public 
hook_death()
{
    
nKiller read_data(1)

// CHECK WALL?
// DO STUFF...

    
if ( (read_data(3) == 1) && (read_data(5) == 0) )
    {
        
screenFade()
        
set_dhudmessage(1001000, -1.00.1511.01.00.10.1)
        
show_dhudmessage(nKiller"HEADSHOT")
    }
    else
        
screenFade()
}

public 
screenFade()
{
    
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, nKiller)
    
write_short(1<<10)
    
write_short(1<<10)
    
write_short(0x0000)
    
write_byte(255)
    
write_byte(0)
    
write_byte(0)
    
write_byte(100)
    
message_end()


Last edited by pob18; 07-01-2014 at 10:16.
pob18 is offline
 


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 21:13.


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