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))
}