Raised This Month: $ Target: $400
 0% 

Question about register_touch()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-05-2012 , 11:46   Re: Question about register_touch()
Reply With Quote #1

PHP Code:
#include < amxmodx >
#include < engine >


public plugin_init() 
{
    
register_touch"player""grenade""TouchEntity" )
}

public 
TouchEntityplayerent )
{
    new 
Model20 ]
    
entity_get_stringentEV_SZ_modelModelcharsmaxModel ) )
    
    if( 
containiModel"flashbang" ) != -)
        
// touched flashbang

If you want to block the touch, you'll have to hook both player -> grenade and grenade -> player touches.

Also there's nothing wrong in using engine for this purpose.

Last edited by Backstabnoob; 05-05-2012 at 11:46.
Backstabnoob 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 00:29.


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