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

CSGO Plugin bomb request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hadesownage
AlliedModders Donor
Join Date: Jun 2013
Location: Romania, Iași
Old 06-06-2015 , 16:13   CSGO Plugin bomb request
Reply With Quote #1

Hello! I want a plugin: the bomb can be planted in the last X seconds, something like (amxx):

PHP Code:
#include <amxmodx> 
#include <hamsandwich> 
#include <fakemeta> 

#define PLUGIN                 "Bomb Time Set" 
#define VERSION             "1.0" 
#define AUTHOR                 "eXtreamCS.Com" 

#define TASK_CANPLANT            10001 

new boolg_bCanPlant

public 
plugin_init()  

    
register_pluginPLUGINVERSIONAUTHOR ); 
     
    
register_event"HLTV""ev_RoundStart""a""1=0""2=0" ); 
    
register_event"TextMsg""ev_BombMsg""b""2=#C4_Plant_At_Bomb_Spot" ); 
     
    
RegisterHamHam_Weapon_PrimaryAttack"weapon_c4""ham_PrimaryAttack_C4" ); 


public 
ev_RoundStart() 

    
g_bCanPlant false
    
remove_taskTASK_CANPLANT ); 
     
    new 
FloatflTime get_cvar_num"mp_freezetime" ) + ( get_cvar_num"mp_roundtime" ) * 60 ) - 30.0
    
set_taskflTime"task_CanPlant"TASK_CANPLANT ); 


public 
ham_PrimaryAttack_C4iEnt 

    new 
id peviEntpev_owner ); 
     
    if( !
g_bCanPlant 
    { 
        
client_printidprint_center"You can plant the bomb in the last 30 seconds!" ); 
        return 
HAM_SUPERCEDE
    } 
     
    return 
HAM_IGNORED


public 
ev_BombMsgid 

    if( !
g_bCanPlant 
    
client_printidprint_center"" ); 


public 
task_CanPlant() 

    
g_bCanPlant true
     
    
set_hudmessage25500, -1.00.3510.013.01.01.0 ); 
     
    new 
iNumiPlayers32 ]; 
    
get_playersiPlayersiNum"ae""TERRORIST" ); 
     
    for( new 
iNum ++ ) 
        
show_hudmessageiPlayers], "The bomb can be planted!" ); 

I tired like that, but doesn't work:
PHP Code:
/* Plugin generated by EditPlus */

#include    <  sourcemod  >

#define        PLUGIN            "New Plug-In"
#define        DESCRIPTION        "Plugin Info"
#define        LINK_URL        "http://extreamcs.com/forum"
#define        VERSION            "0.Ox"
#define        AUTHOR            "Hades Ownage"

public Pluginmyinfo = {

    
name PLUGIN,
    
author AUTHOR,
    
description DESCRIPTION,
    
version VERSION,
    
url LINK_URL

};

new 
boolg_CanPlant false;

public 
OnPluginStart ( ) {

    
CreateConVar "sm_name_version"VERSION"Name Version"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY );

    
HookEvent"bomb_beginplant"Event_BeginPlant );
    
HookEvent "round_start"EventRoundStart );
}

public 
Action:Event_BeginPlantHandle:event, const String:name[], bool:dontBroadcast )
{

    
//new id = GetClientOfUserId( GetEventInt( event, "userid" ) ); // in anycase

    
if ( !g_CanPlant )
        return 
Plugin_Handled;

    return 
Plugin_Continue;



}

public 
ActionEventRoundStart Handleevent, const Stringname [ ], booldontBroadcast ) {

    
CreateTimer 120.0GiveBombAccess );

}

public 
ActionGiveBombAccess Handletimer ) {

    
g_CanPlant true;
    
PrintToChatAll "\x03Oh no! The bomb can be planted!" );


Anyone can help me? thanks!

Last edited by hadesownage; 06-06-2015 at 16:41.
hadesownage is offline
Send a message via Yahoo to hadesownage Send a message via Skype™ to hadesownage
Mitchell
~lick~
Join Date: Mar 2010
Old 06-07-2015 , 18:29   Re: CSGO Plugin bomb request
Reply With Quote #2

You can't block via events.
Mitchell 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 08:02.


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