Error Happy Hour
#1
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 
boolg_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(idprint_chat"Happyhour: O%s"g_happyhour "N" "FF")
    
public 
fw_playerkilled(victimattacker

    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"data12
    new 
Tiempo str_to_num(data
    
    for(new 
i=0;<= sizeof horas 1;i++) 
    { 
        if(
Tiempo != horas[i]) continue 
        
g_happyhour true 
        
break; 
    } 
    
    if(
g_happyhour
        
client_print(0print_chat"[ZP] Comenzo el happyhour todos tus aps se multiplicaran x2."); 

Responder
#2
Código PHP:
public fw_playerkilled(victimattacker

    if(
cs_get_user_team(victim) == cs_get_user_team(attacker)) return; 
    
    if (
g_happyhour
    {
        
g_ammopacks[attacker] += (GananciaHappy// Ahi si estaria multiplicando porque es X (*)
        //g_ammopacks[attacker] += GananciaHappy // Ahi solo esta sumando el multiplicador, asi que siempre daria 2 ammopacks en happyhor
    
}

___________________________________
SI NECESITAS UN PLUGIN TE LO HAGO $$$
COMUNICATE A MI DISCORD: emanuelitop15
Responder
#3
Sigue sin ir
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)