Raised This Month: $ Target: $400
 0% 

Block HE nade explosion


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-26-2010 , 12:05   Re: Block HE nade explosion
Reply With Quote #1

Already asked, already answered..
__________________
Arkshine is offline
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 07-26-2010 , 12:12   Re: Block HE nade explosion
Reply With Quote #2

Quote:
Originally Posted by Arkshine View Post
Already asked, already answered..
Google doesn't find anything
__________________
Javivi is offline
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 07-27-2010 , 02:15   Re: Block HE nade explosion
Reply With Quote #3

PHP Code:
/* ==  ==  ==  ==  ==  ==  ==  ==     Change the font to "Times New Roman" with a size of 10 for a good readability     ==  ==  ==  ==  ==  ==  == */

#define PLUGIN     "Block HE Explosion"
#define AUTHOR     "Leon McVeran"
#define VERSION     "beta"

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

public plugin_init(){
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_forward(FM_Think"fwd_think")
}

public 
fwd_think(iEntity){
    if (!
pev_valid(iEntity)){
        return 
FMRES_IGNORED
    
}

    new 
szModel[25]
    
pev(iEntitypev_modelszModel24)
    if (
equali(szModel"models/w_hegrenade.mdl")){
        new 
Float:fDmgTime
        pev
(iEntitypev_dmgtimefDmgTime)

        if (
fDmgTime <= get_gametime() && fDmgTime != 0.0){
            
func_nade_explode(iEntity)
            return 
FMRES_SUPERCEDE
        
}
    }
    return 
FMRES_IGNORED
}

public 
func_nade_explode(iEntity){
    if (!
pev_valid(iEntity)){
        return
    }

    
// Your replacement for the explosion
    // ...

__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015
Leon M. is offline
DaxProxy
Senior Member
Join Date: Sep 2007
Old 07-28-2010 , 07:56   Re: Block HE nade explosion
Reply With Quote #4

Can't this be done without fw_think? Because this simply eats cpu.
__________________

Want ApolloRP for Counter-Strike? Show your support: http://forums.alliedmods.net/showthr...39#post1264739
DaxProxy 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:11.


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