Raised This Month: $ Target: $400
 0% 

no need for this


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 09-01-2023 , 11:14   Re: New Request
Reply With Quote #6

AlexFlaviu, you can try remove all functions after timer Timer_Reset: OnEntityCreated() and C4_Spawn()
PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sdktools_entinput>
#include <sdktools_functions>
#include <sdktools_gamerules>

bool bCheck;

public 
Plugin myinfo =
{
    
name        "Bomb plant control",
    
version        "1.0.1_01.09.2023",
    
description    "Prevents the bomb from being planted after the round ends",
    
author        "Grey83",
    
url            "https://steamcommunity.com/groups/grey83ds"
}

public 
void OnMapStart()
{
    static 
bool check;
    if(
check == !!GameRules_GetProp("m_bMapHasBombTarget"))
        return;

    if((
check ^= true))
    {
        
HookEvent("round_start"Event_ToggleEventHookMode_PostNoCopy);
        
HookEvent("round_end"Event_ToggleEventHookMode_PostNoCopy);
        
HookEvent("bomb_planted"Event_ToggleEventHookMode_PostNoCopy);
    }
    else
    {
        
UnhookEvent("round_start"Event_ToggleEventHookMode_PostNoCopy);
        
UnhookEvent("round_end"Event_ToggleEventHookMode_PostNoCopy);
        
UnhookEvent("bomb_planted"Event_ToggleEventHookMode_PostNoCopy);
    }
}

public 
void Event_Toggle(Event event, const char[] namebool dontBroadcast)
{
    if(
name[6] != 's')
        return;

    
int i MaxClients+1;
    while((
FindEntityByClassname(i"weapon_c4")) != -1AcceptEntityInput(i"Kill");

__________________

Last edited by Grey83; 09-01-2023 at 11:17.
Grey83 is offline
 


Thread Tools
Display Modes

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 03:15.


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