Revivir Automaticamente HH
#1
Que Debo Agregar Para Que Reviva Automaticamente, Al Comenzar La HH Este Plugins
Código PHP:
#include amxmodx
#include hamsandwich

new gIsHappyTime;
new const 
HappyTime[][] = {"22"};  // Puedes agregar mas horas aqui

public plugin_init() 
{
    
register_plugin("HappyHour + Respawn ?)" "0.1""kikizon" );
    
register_event"HLTV" "check_happytime" "a" "1=0" "2=0" );
    
    
register_clcmd"say /respawn""clcmdRespawn" );
}

public 
clcmdRespawnindex )
{
    if( !
gIsHappyTime )
    {
        
client_printindex print_chat"La happy Hour no esta activa vete prro >:V" );
        return 
PLUGIN_HANDLED;
    }
    
    if( 
is_user_aliveindex ))
    {
        
client_printindex print_chat"No puedes revivir si ya estas vivo :genius: >:V" );
        return 
PLUGIN_HANDLED;
    }
    
    
ExecuteHamBHam_CS_RoundRespawnindex );
    return 
PLUGIN_HANDLED;
}

public 
check_happytime()
{
    
gIsHappyTime false;
    
    static 
hour[3], iget_time("%H"hour);
    
    for( 
0sizeof HappyTime ; ++
    if(
equal(hourHappyTime]) ) 
        
gIsHappyTime true;

Aprender: Necesaria unión entre el Querer, el Saber y el Poder
Responder
#2
Código PHP:
#include amxmodx
#include hamsandwich

new gIsHappyTime;
new const 
HappyTime[][] = {"22"};  // Puedes agregar mas horas aqui

public plugin_init() 
{
    
register_plugin("HappyHour + Respawn ?)" "0.1""kikizon" );
    
register_event"HLTV" "check_happytime" "a" "1=0" "2=0" );
    
RegisterHam(Ham_Killed"player""PlayerKilled"true);
    
    
register_clcmd"say /respawn""clcmdRespawn" );
}

public 
PlayerKilled(victimattackershouldgibs)
{
    if( !
gIsHappyTime ) return;

    
clcmdRespawn(victim);
}

public 
clcmdRespawnindex )
{
    if( !
gIsHappyTime )
    {
        
client_printindex print_chat"La happy Hour no esta activa vete prro >:V" );
        return 
PLUGIN_HANDLED;
    }
    
    if( 
is_user_aliveindex ))
    {
        
client_printindex print_chat"No puedes revivir si ya estas vivo :genius: >:V" );
        return 
PLUGIN_HANDLED;
    }
    
    
ExecuteHamBHam_CS_RoundRespawnindex );
    return 
PLUGIN_HANDLED;
}

public 
check_happytime()
{
    
gIsHappyTime false;
    
    static 
hour[3], iget_time("%H"hour);
    
    for( 
0sizeof HappyTime ; ++
    if(
equal(hourHappyTime]) ) 
        
gIsHappyTime true;

Responder
#3
(13/02/2018, 01:38 AM)P-chan escribió:
Código PHP:
#include amxmodx
#include hamsandwich

new gIsHappyTime;
new const 
HappyTime[][] = {"22"};  // Puedes agregar mas horas aqui

public plugin_init() 
{
    
register_plugin("HappyHour + Respawn ?)" "0.1""kikizon" );
    
register_event"HLTV" "check_happytime" "a" "1=0" "2=0" );
    
RegisterHam(Ham_Killed"player""PlayerKilled"true);
    
    
register_clcmd"say /respawn""clcmdRespawn" );
}

public 
PlayerKilled(victimattackershouldgibs)
{
    if( !
gIsHappyTime ) return;

    
clcmdRespawn(victim);
}

public 
clcmdRespawnindex )
{
    if( !
gIsHappyTime )
    {
        
client_printindex print_chat"La happy Hour no esta activa vete prro >:V" );
        return 
PLUGIN_HANDLED;
    }
    
    if( 
is_user_aliveindex ))
    {
        
client_printindex print_chat"No puedes revivir si ya estas vivo :genius: >:V" );
        return 
PLUGIN_HANDLED;
    }
    
    
ExecuteHamBHam_CS_RoundRespawnindex );
    return 
PLUGIN_HANDLED;
}

public 
check_happytime()
{
    
gIsHappyTime false;
    
    static 
hour[3], iget_time("%H"hour);
    
    for( 
0sizeof HappyTime ; ++
    if(
equal(hourHappyTime]) ) 
        
gIsHappyTime true;


Pregunta: No es al pedo chequear esto.

Código PHP:
if( !gIsHappyTime ) return; 

Cuando en el

Código PHP:
clcmdRespawnindex 

Ya lo hace.

Es una duda que me surgió Whatever

Responder
#4
(13/02/2018, 02:33 AM)Chema escribió:
(13/02/2018, 01:38 AM)P-chan escribió:
Código PHP:
#include amxmodx
#include hamsandwich

new gIsHappyTime;
new const 
HappyTime[][] = {"22"};  // Puedes agregar mas horas aqui

public plugin_init() 
{
    
register_plugin("HappyHour + Respawn ?)" "0.1""kikizon" );
    
register_event"HLTV" "check_happytime" "a" "1=0" "2=0" );
    
RegisterHam(Ham_Killed"player""PlayerKilled"true);
    
    
register_clcmd"say /respawn""clcmdRespawn" );
}

public 
PlayerKilled(victimattackershouldgibs)
{
    if( !
gIsHappyTime ) return;

    
clcmdRespawn(victim);
}

public 
clcmdRespawnindex )
{
    if( !
gIsHappyTime )
    {
        
client_printindex print_chat"La happy Hour no esta activa vete prro >:V" );
        return 
PLUGIN_HANDLED;
    }
    
    if( 
is_user_aliveindex ))
    {
        
client_printindex print_chat"No puedes revivir si ya estas vivo :genius: >:V" );
        return 
PLUGIN_HANDLED;
    }
    
    
ExecuteHamBHam_CS_RoundRespawnindex );
    return 
PLUGIN_HANDLED;
}

public 
check_happytime()
{
    
gIsHappyTime false;
    
    static 
hour[3], iget_time("%H"hour);
    
    for( 
0sizeof HappyTime ; ++
    if(
equal(hourHappyTime]) ) 
        
gIsHappyTime true;


Pregunta: No es al pedo chequear esto.

Código PHP:
if( !gIsHappyTime ) return; 

Cuando en el

Código PHP:
clcmdRespawnindex 

Ya lo hace.

Es una duda que me surgió Whatever


Cuando ya es hh no revivia

(13/02/2018, 02:33 AM)Chema escribió:
(13/02/2018, 01:38 AM)P-chan escribió:
Código PHP:
#include amxmodx
#include hamsandwich

new gIsHappyTime;
new const 
HappyTime[][] = {"22"};  // Puedes agregar mas horas aqui

public plugin_init() 
{
    
register_plugin("HappyHour + Respawn ?)" "0.1""kikizon" );
    
register_event"HLTV" "check_happytime" "a" "1=0" "2=0" );
    
RegisterHam(Ham_Killed"player""PlayerKilled"true);
    
    
register_clcmd"say /respawn""clcmdRespawn" );
}

public 
PlayerKilled(victimattackershouldgibs)
{
    if( !
gIsHappyTime ) return;

    
clcmdRespawn(victim);
}

public 
clcmdRespawnindex )
{
    if( !
gIsHappyTime )
    {
        
client_printindex print_chat"La happy Hour no esta activa vete prro >:V" );
        return 
PLUGIN_HANDLED;
    }
    
    if( 
is_user_aliveindex ))
    {
        
client_printindex print_chat"No puedes revivir si ya estas vivo :genius: >:V" );
        return 
PLUGIN_HANDLED;
    }
    
    
ExecuteHamBHam_CS_RoundRespawnindex );
    return 
PLUGIN_HANDLED;
}

public 
check_happytime()
{
    
gIsHappyTime false;
    
    static 
hour[3], iget_time("%H"hour);
    
    for( 
0sizeof HappyTime ; ++
    if(
equal(hourHappyTime]) ) 
        
gIsHappyTime true;


Pregunta: No es al pedo chequear esto.

Código PHP:
if( !gIsHappyTime ) return; 

Cuando en el

Código PHP:
clcmdRespawnindex 

Ya lo hace.

Es una duda que me surgió Whatever


Cuando ya es hh no revivia
Aprender: Necesaria unión entre el Querer, el Saber y el Poder
Responder
#5
(13/02/2018, 02:33 AM)Chema escribió: Pregunta: No es al pedo chequear esto.

Código PHP:
if( !gIsHappyTime ) return; 

Cuando en el

Código PHP:
clcmdRespawnindex 

Ya lo hace.

Es una duda que me surgió Whatever


No, porque en clcmdRespawn manda un print, mientras que de la otra manera lo ignora.
Responder
#6
(13/02/2018, 10:17 AM)KISKE escribió:
(13/02/2018, 02:33 AM)Chema escribió: Pregunta: No es al pedo chequear esto.

Código PHP:
if( !gIsHappyTime ) return; 

Cuando en el

Código PHP:
clcmdRespawnindex 

Ya lo hace.

Es una duda que me surgió Whatever


No, porque en clcmdRespawn manda un print, mientras que de la otra manera lo ignora.

Gracias Mario
Responder
#7
Una pregunta alli dice que inicia alas 20:00 pero si quiero que inicie alas 20:00 termine alas 21:00 luego inicie alas 10:00 y termine alas 12:00¿
Aprender: Necesaria unión entre el Querer, el Saber y el Poder
Responder
#8
get_time obtiene la hora configurada del servidor, puedes revisar usando el comando timeleft, para que veas que hora tiene el servidor.
Responder
#9
(13/02/2018, 05:37 PM)P-chan escribió: get_time obtiene la hora configurada del servidor, puedes revisar usando el comando timeleft, para que veas que hora tiene el servidor.

Timeleft,Es El tiempo del mapa pacman que le resta.

Es * Thetime ;C gracias Solucionado
Aprender: Necesaria unión entre el Querer, el Saber y el Poder
Responder
#10
Sorry, tengo tiempo sin jugar xd
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)