20/12/2021, 08:42 AM
Tengo error en happy hour funciona y tal pero no multiplica los aps x2 cuando se activa alguna razon dejo aqui el plugin
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
new const horas[] = { 10,11,15,16,20,21,12,01,03,04 }
new bool: g_happyhour
const GananciaHappy = 2
new g_ammopacks[33]
public plugin_init()
{
register_clcmd("say /hh", "verhappy")
RegisterHam(Ham_Killed, "player", "fw_playerkilled", 1)
register_event("HLTV", "RoundStart", "a", "1=0", "2=0");
}
public verhappy(id)
client_print(id, print_chat, "Happyhour: O%s", g_happyhour ? "N" : "FF")
public fw_playerkilled(victim, attacker)
{
if(cs_get_user_team(victim) == cs_get_user_team(attacker)) return;
if(g_happyhour)
{
g_ammopacks[attacker] += GananciaHappy
}
}
public RoundStart()
{
new data[12]
get_time("%H", data, 12)
new Tiempo = str_to_num(data)
for(new i=0;i <= sizeof horas - 1;i++)
{
if(Tiempo != horas[i]) continue
g_happyhour = true
break;
}
if(g_happyhour)
client_print(0, print_chat, "[ZP] Comenzo el happyhour todos tus aps se multiplicaran x2.");
}