Raised This Month: $ Target: $400
 0% 

Help me use oprheu to block defusal of bomb


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 08-18-2014 , 02:27   Re: Help me use oprheu to block defusal of bomb
Reply With Quote #7

It is the same as using any other forward. The RoundEndType's can be found in the infinite_round.inc.
You just need to keep in mind that the default value of ir_block_roundend ( "*" ) can be superceded by returning, but will not allow the round to end if you return PLUGIN_CONTINUE. Therefore you will need to use a flag that is irrelevant to the scenario such as k ( prevent prison escape ).

Something like this should suffice:
PHP Code:
#include <amxmodx>
#include <engine>
#include <infinite_round>

/*
    ir_active_api 1
    ir_block_roundend k
*/

public OnRoundEnd( const RoundEndType:iType )
{
    if( 
iType == RoundEndType_BombDefused )
    {
        if( 
find_ent_by_model0"grenade""models/w_c4.mdl" ) )
            return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;

__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet 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 12:53.


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