AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   block round on defuse or explode bomb (https://forums.alliedmods.net/showthread.php?t=233270)

avril-lavigne 01-12-2014 10:13

block round on defuse or explode bomb
 
How to block round without orpheu when bomb is defused or xploded ?
and then force win on my condition


I know there is some where "force win" .inc
I need to block round somehow

meTaLiCroSS 01-12-2014 10:57

Re: block round on defuse or explode bomb
 
Without orpheu? Good luck

avril-lavigne 01-12-2014 12:23

Re: block round on defuse or explode bomb
 
there is a way - to turn off the server )))

avril-lavigne 01-13-2014 16:57

Re: block round on defuse or explode bomb
 
I have an interesting idea to block round on defuse

we can detect bar time when defusing.

wait until 99% done and reset it / but count as defused !
remove c4 entity

how to detect bar time when defusing the bomb ?

DavidJr 01-13-2014 19:49

Re: block round on defuse or explode bomb
 
It is written in wiki
https://wiki.alliedmods.net/Half-Lif...Events#BarTime

avril-lavigne 01-13-2014 20:21

Re: block round on defuse or explode bomb
 
yes found thanks


Spoiler





hm found this interesting http://forums.alliedmods.net/showthread.php?t=158345

ConnorMcLeod 01-13-2014 23:58

Re: block round on defuse or explode bomb
 
You can try this, not really efficient as forward gonna be called each time a grenade is thinking, but for obscur reasons you don't want to use orpheu, which would be an strongly efficient way.

PHP Code:

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

#pragma semicolon 1

#define PLUGIN ""
#define VERSION "0.0.1"

#define cm(%0)    ( sizeof(%0) - 1 )

// const XO_CGRENADE = 5;
const m_bStartDefuse 384;
const 
m_bIsC4 =    385;
const 
m_flDefuseCountDown 99;
const 
m_flC4Blow 100;
const 
m_pBombDefuser_pent 388;

public 
plugin_init()
{
    
register_pluginPLUGINVERSION"ConnorMcLeod" );

    
RegisterHam(Ham_Think"grenade""OnCGrenade_C4Think");
}

public 
OnCGrenade_C4Thinkc4 )
{
    if( !
get_pdata_bool(c4m_bIsC4) )
    {
        return 
HAM_IGNORED;
    }

    new 
Float:flTime get_gametime();

    if( 
get_pdata_float(c4m_flC4Blow) <= flTime )
    {
        
set_pev(c4pev_flagsFL_KILLME);
        
        
// C4 should have blown here
        // Execute the code you want

        
        
return HAM_SUPERCEDE;
    }

    if( 
get_pdata_bool(c4m_bStartDefuse) )
    {
        new 
iDefuser get_pdata_ent(c4m_pBombDefuser_pent);
        if( 
iDefuser && get_pdata_float(c4m_flDefuseCountDown) <= flTime )
        {
            
set_pev(c4pev_flagsFL_KILLME);
            
ExecuteHamB(Ham_CS_Player_ResetMaxSpeediDefuser);
        
            
// C4 should have been defused here
            // Execute the code you want


            
return HAM_SUPERCEDE;
        }
    }

    return 
HAM_IGNORED;



avril-lavigne 01-14-2014 07:11

Re: block round on defuse or explode bomb
 
I ve chekd I have latest amxmodx but it doesnt recognize what Ham_CS_Player_ResetMaxSpeed is

http://s43.radikal.ru/i099/1401/c4/5896111b86d8.png

DavidJr 01-14-2014 07:24

Re: block round on defuse or explode bomb
 
Maybe you use the old version of Hamsandwich?

YamiKaitou 01-14-2014 07:25

Re: block round on defuse or explode bomb
 
Ham_CS_Player_ResetMaxSpeed is part of the updated HamSandwich, https://forums.alliedmods.net/showthread.php?p=1498389


All times are GMT -4. The time now is 10:13.

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