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

flasher id?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 11-24-2012 , 06:46   flasher id?
Reply With Quote #1

if a player gets flashed, is it possible to find out the entity id of the flashbang that flashed him (and maybe block the flash if entity id = something)?
jimaway is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 11-24-2012 , 07:25   Re: flasher id?
Reply With Quote #2

Take a look at this,

PHP Code:
public forward_setmodel(const ENTITYmodel[]) { // a flash is thrown
    
    
if (!equal(model"models/w_flashbang.mdl")) 
        return 
FMRES_IGNORED 

    
new owner pev(ENTITYpev_owner)
    if (
owner == 0
        return 
FMRES_IGNORED 

    set_task
(FLASH_TIMER,"get_flasher"1000+owner)
   
    return 
FMRES_IGNORED 


public 
get_flasher(id){ // a flash is about to bang
    
g_flasher = (id 1000)

guipatinador is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 11-24-2012 , 07:41   Re: flasher id?
Reply With Quote #3

how would i block that nade from flashing people? and what should the FLASH_TIMER value be?
jimaway is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 11-24-2012 , 07:47   Re: flasher id?
Reply With Quote #4

in this plugin they use 1.52 sec http://forums.alliedmods.net/showthread.php?p=549415
http://forums.alliedmods.net/showthread.php?t=16992
guipatinador 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:46.


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