Counter-Strike 1.6
CS1.BG | DUST2 NOSHTA GARMI [RANKED PLAY] #1
45.144.155.113:27015
de_dust2
Играчи: 30/32
de_dust2
Counter-Strike 1.6
VIP
Cs-PlovdiV.com - Aim Attack 93.123.16.4:27022 aim_aztec Играчи: 0/16
Counter-Strike 1.6
VIP
93.123.16.4:27022 Cs-PlovdiV.com - Aim Attack aim_aztec 0/16

Happy Hour plugin, remove chat messages

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Niiicu
Извън линия
Потребител
Потребител
Мнения: 88
Регистриран на: 24 Апр 2020, 10:01
Се отблагодари: 1 път
Получена благодарност: 1 път

Happy Hour plugin, remove chat messages

Мнение от Niiicu » 17 Май 2020, 13:06

Hello,
I have this Happy Hour plugin wich it's working very well, but have to many chat messages, at the beggining of each roud start, i have chat messages.
It's possible to modify this plugin so that I only have one chat message when the event starts?
Or if is not possbile, just remove those chat messages. I've tried but i have a lot of errors and i can't compile.
Thank you,

Код за потвърждение: Избери целия код

#include <amxmodx> 
#include <colorchat>

new const theCvar[] = "amx_default_access"

new g_Start,g_End, g_iFlag , g_iStart, g_iEnd
public plugin_init() { 
    register_plugin("Happy VIP Hour", "1.0", "Just In Case") 
    
    g_Start = register_cvar("hfh_start","19")
    g_iStart = get_pcvar_num(g_Start)
    
    g_End = register_cvar("hfh_end","23")
    g_iEnd = get_pcvar_num(g_End)
    
    g_iFlag = register_cvar("hfh_flag", "t")
    
    register_logevent("logevent_round_start", 2, "1=Round_Start") 
} 
public logevent_round_start()
{
    CheckTime()
}
public CheckTime() 
{
    static szString[2]
    get_pcvar_string(g_iFlag, szString, charsmax(szString))
    if(is_happy_hour(g_iStart, g_iEnd))
    {
        ColorChat(0,RED,"^4[HAPPY HOUR ACTIVE] ^1Now it's FREE VIP Event ^4****** ^1START: ^3%i ^4| ^1END : ^3%i ^4******", g_iStart, g_iEnd)
        set_cvar_string(theCvar, szString)
    }
    else {
        set_cvar_string(theCvar, "z")
    }
     server_cmd("amx_reloadadmins");
}     

bool:is_happy_hour(const iStart, const iEnd) {
    new iHour; time(iHour)
    return bool:(iStart < iEnd ? (iStart <= iHour < iEnd) : (iStart <= iHour || iHour < iEnd))
}  
CS.AVENGERSCS.RO - Classic

Аватар
devilchy
Извън линия
Потребител
Потребител
Мнения: 223
Регистриран на: 03 Фев 2017, 14:08
Местоположение: Burgas
Се отблагодари: 3 пъти
Получена благодарност: 6 пъти
Обратна връзка:

Happy Hour plugin, remove chat messages

Мнение от devilchy » 17 Май 2020, 14:00

Test please, if you still have a problem please provide a photo.

Код за потвърждение: Избери целия код

#include <amxmodx> 
#include <colorchat>

new const theCvar[] = "amx_default_access"

new g_Start,g_End, g_iFlag , g_iStart, g_iEnd
public plugin_init() { 
    register_plugin("Happy VIP Hour", "1.0", "Just In Case") 
    
    g_Start = register_cvar("hfh_start","13")
    g_iStart = get_pcvar_num(g_Start)
    
    g_End = register_cvar("hfh_end","23")
    g_iEnd = get_pcvar_num(g_End)
    
    g_iFlag = register_cvar("hfh_flag", "t")
    
    register_logevent("logevent_round_start", 2, "1=Round_Start") 
} 
public logevent_round_start()
{
    CheckTime()
}
public CheckTime() 
{
    static szString[2]
    get_pcvar_string(g_iFlag, szString, charsmax(szString))
    if(is_happy_hour(g_iStart, g_iEnd))
    {
	ColorChat(0,RED,"^4[HAPPY HOUR ACTIVE] ^1Now it's FREE VIP Event ^4****** ^1START: ^3%i ^4| ^1END : ^3%i ^4******", g_iStart, g_iEnd)
	set_cvar_string(theCvar, szString)
    }
    else {
        set_cvar_string(theCvar, "z")
    }
    server_cmd("amx_reloadadmins");
}     

bool:is_happy_hour(const iStart, const iEnd) {
    new iHour; time(iHour)
    return bool:(iStart < iEnd ? (iStart <= iHour < iEnd) : (iStart <= iHour || iHour < iEnd))
}

Аватар
Niiicu
Извън линия
Потребител
Потребител
Мнения: 88
Регистриран на: 24 Апр 2020, 10:01
Се отблагодари: 1 път
Получена благодарност: 1 път

Happy Hour plugin, remove chat messages

Мнение от Niiicu » 17 Май 2020, 15:49

It's still the same, i still have that message at the beggining of each round. I want to have that message only one time, when the event starts if is possbile, or remove the message . I have took a photo

https://imgur.com/gallery/TQrqlZf
CS.AVENGERSCS.RO - Classic

Аватар
atmax
Извън линия
Потребител
Потребител
Мнения: 492
Регистриран на: 22 Мар 2018, 15:06
Се отблагодари: 37 пъти
Получена благодарност: 43 пъти

Happy Hour plugin, remove chat messages

Мнение от atmax » 17 Май 2020, 17:33

Just remove the ColorChat line..

Also you can remove the new round event or setting a task with set_task function for time to advertise
Rest in peace my friend I always will remember you! 🖤👊

Аватар
Niiicu
Извън линия
Потребител
Потребител
Мнения: 88
Регистриран на: 24 Апр 2020, 10:01
Се отблагодари: 1 път
Получена благодарност: 1 път

Happy Hour plugin, remove chat messages

Мнение от Niiicu » 17 Май 2020, 18:11

Where do i have to add set_task function for time to advertise in the plugin?
CS.AVENGERSCS.RO - Classic

Аватар
sf4n
Извън линия
Потребител
Потребител
Мнения: 311
Регистриран на: 08 Яну 2018, 11:25
Се отблагодари: 25 пъти
Получена благодарност: 14 пъти

Happy Hour plugin, remove chat messages

Мнение от sf4n » 17 Май 2020, 18:14

Try this.

Код за потвърждение: Избери целия код

#include <amxmodx> 

new const theCvar[] = "amx_default_access"

new g_Start,g_End, g_iFlag , g_iStart, g_iEnd
public plugin_init() { 
    register_plugin("Happy VIP Hour", "1.0", "Just In Case") 
    
    g_Start = register_cvar("hfh_start","13")
    g_iStart = get_pcvar_num(g_Start)
    
    g_End = register_cvar("hfh_end","23")
    g_iEnd = get_pcvar_num(g_End)
    
    g_iFlag = register_cvar("hfh_flag", "t")
    
    register_logevent("logevent_round_start", 2, "1=Round_Start") 
} 
public logevent_round_start()
{
    CheckTime()
}
public CheckTime() 
{
    static szString[2]
    get_pcvar_string(g_iFlag, szString, charsmax(szString))
    if(is_happy_hour(g_iStart, g_iEnd))
    {
	set_cvar_string(theCvar, szString)
    }
    else {
        set_cvar_string(theCvar, "z")
    }
    server_cmd("amx_reloadadmins");
}     

bool:is_happy_hour(const iStart, const iEnd) {
    new iHour; time(iHour)
    return bool:(iStart < iEnd ? (iStart <= iHour < iEnd) : (iStart <= iHour || iHour < iEnd))
}
Изображение

Единствен по рода си Zombie BaseBuilder с уникален мод и коректни админи по всяко време в сървъра.
IP: bb.cs-zapad.eu:27013

Respawn сървър.
IP: re.cs-zapad.eu:27015

Furien сървър.
IP: fu.cs-zapad.eu:27016

Нашият Сайт
Нашият Форум

Аватар
Niiicu
Извън линия
Потребител
Потребител
Мнения: 88
Регистриран на: 24 Апр 2020, 10:01
Се отблагодари: 1 път
Получена благодарност: 1 път

Happy Hour plugin, remove chat messages

Мнение от Niiicu » 17 Май 2020, 21:40

It's working, thank you.
Close the topic please :)
CS.AVENGERSCS.RO - Classic

Заключено
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: Semrush [Bot] и 2 госта