AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Happy hour (https://forums.alliedmods.net/showthread.php?t=113465)

Imissyou 12-27-2009 03:33

Happy hour
 
well.. i want make a plugin wath set ammopacks x 2 on specific time..example 2 am - 5 am other example..

PHP Code:

new const horas[] = { 13,14,15,16,17,18,19,20,21,22,23,24,1,2,3,4,5,6,7,8,9,10,11,12 

PHP Code:

// Happy Hour
public happyhour(id)
{
    new 
data[3]
    
get_time("%H"data02)
    
    new 
Tiempo str_to_num(data)
    
    for(new 
i=2;<= sizeof horas 5;i++)
    {
        if(
Tiempo != horas[i]) continue
        
g_happytime true
    
}
    if(
g_happytime)
    {
        
set_task(0.1,"anuncio")    
    }
}
public 
anuncio(id)
{
    
zp_colored_print(0"^x04[ASD]^x03 Happy Hour:^x01 at^x03 [02:00 AM - 05:00 AM]^x01, win ammopacks x 2 !")  


but this only set ammopacks x2 all time.. sorry for my bad english :S and thks for all

wyrda 12-27-2009 19:55

Re: Happy hour
 
You also must check if minutes == 0 and seconds == 0

Alucard^ 01-01-2010 01:02

Re: Happy hour
 
You spam, bother, and a lot of more things in the Other forums and now you want support on this with another account? I dont think so.


All times are GMT -4. The time now is 04:03.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.