Raised This Month: $ Target: $400
 0% 

Defuse Message


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 12-23-2022 , 16:04   Defuse Message
Reply With Quote #1

can someone make it without colors and the chatcolor include?
or at least make it work with today amx.

HTML Code:
#include <amxmodx>
#include <csx>
#include <chatcolor>

#define ANTIFLOOD_DELAY        1.0

public plugin_init()
{
    register_plugin("Bomb Events", "0.0.1", "ConnorMcLeod")
    register_event("TextMsg", "Event_TextMsg_Game_bomb_drop", "bc", "2&#Game_bomb_drop")
    register_event("TextMsg", "Event_TextMsg_Got_bomb", "b", "2&#Got_bomb")
}

public Event_TextMsg_Got_bomb( id )
{
    if( bIsUserFlooding(id) )
    {
        return
    }
    new szName[32]
    get_user_name(id, szName, charsmax(szName))
    client_print_color(0, DontChange, "^4[Game Announce] ^1Player ^3%s^1 has picked up the bomb", szName)
}

public Event_TextMsg_Game_bomb_drop()
{
    new szName[32]
    read_data(3, szName, charsmax(szName))
    if( bIsUserFlooding( get_user_index( szName ) ) )
    {
        return
    }
    client_print_color(0, DontChange, "^4[Game Announce] ^1Player ^3%s^1 has dropped the bomb", szName)
}

public bomb_defusing( id )
{
    if( bIsUserFlooding(id) )
    {
        return
    }
    new szName[32]
    get_user_name(id, szName, charsmax(szName))
    client_print_color(0, DontChange, "^4[Game Announce] ^1Player ^3%s^1 is defusing the bomb", szName)
}

public bomb_defused( id )
{
    new szName[32]
    get_user_name(id, szName, charsmax(szName))
    client_print_color(0, DontChange, "^4[Game Announce] ^1Player ^3%s^1 has defused the bomb", szName)
}

public bomb_planting( id )
{
    if( bIsUserFlooding(id) )
    {
        return
    }
    new szName[32]
    get_user_name(id, szName, charsmax(szName))
    client_print_color(0, DontChange, "^4[Game Announce] ^1Player ^3%s^1 is planting the bomb", szName)
}

public bomb_planted( id )
{
    new szName[32]
    get_user_name(id, szName, charsmax(szName))
    client_print_color(0, DontChange, "^4[Game Announce] ^1Player ^3%s^1 has planted the bomb", szName)
}

bool:bIsUserFlooding(id, Float:flFloodDelay = ANTIFLOOD_DELAY, bool:bAddAtEachAttempt = false)
{
    static Float:flNextColoredText[33]
    static Float:flGameTime
    flGameTime = get_gametime()
    if( flNextColoredText[id] > flGameTime )
    {
        if( bAddAtEachAttempt )
        {
            flNextColoredText[id] += flFloodDelay
        }
        return true
    }
    flNextColoredText[id] = flGameTime + flFloodDelay
    return false
}
Ark_Procession 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 15:46.


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