Raised This Month: $ Target: $400
 0% 

How do stop defusing bomb[solved]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-23-2009 , 04:15   Re: How do stop defusing bomb
Reply With Quote #6

For both, basically, supercede forward Ham_Use with "grenade" entities should work.

PHP Code:
/*    Copyright © 2009, ConnorMcLeod

    Bomb Defusion is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Bomb Defusion; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

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

#define PLUGIN "Bomb Defusion"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

#define MAX_PLAYERS    32

new g_iDefuser
new g_bCantDefuse[MAX_PLAYERS+1]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    if( !
engfuncEngFunc_FindEntityByString FM_NULLENT "classname" "func_bomb_target" )
    &&  !
engfuncEngFunc_FindEntityByString FM_NULLENT "classname" "info_bomb_target" )  )
    {
        
pause("ad")
        return
    }

    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0")

    
RegisterHam(Ham_Use"grenade""C4_Use")

    
register_concmd("stop_defuse""Command_StopDefuse"ADMIN_KICK)
}

public 
client_putinserverid )
{
    
g_bCantDefuseid ] = false
}

public 
Event_HLTV_New_Round()
{
    
g_iDefuser 0
}

public 
C4_Use(iC4ididactivatoruse_typeFloat:value)
{
    if( 
use_type != || value != 1.0 || get_user_team(id) != )
    {
        return 
HAM_IGNORED
    
}

    
g_iDefuser id

    
if( g_bCantDefuse[g_iDefuser] )
    {
        return 
HAM_SUPERCEDE
    
}

    return 
HAM_IGNORED
}

public 
Command_StopDefuse(idlevel)
{
    if( !(
get_user_flags(id) & level) )
    {
        return 
PLUGIN_HANDLED
    
}

    new 
plr
    
if( read_argc() == )
    {
        new 
szArg[32]
        
read_argv(1szArgcharsmax(szArg))
        
plr cmd_target(idszArg)
    }

    if( !
plr )
    {
        
plr g_iDefuser
    
}

    if( !
plr )
    {
        return 
PLUGIN_HANDLED
    
}

    
g_bCantDefuse[plr] = true

    
new szName[32]
    
get_user_name(plrszNamecharsmax(szName))

    
client_print(idprint_console"%s can't defuse the bomb anymore"szName)

    return 
PLUGIN_HANDLED

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
 



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 17:07.


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