12.12.2009, 14:47
I want to get pickup icon show every 6 o'clock and disappear 8 o'clock for every day.
what it's possible.
what it's possible.
new PickupShown;
new thepickup;
SetTimer("CheckTime",1000,1);
public CheckTime()
{
new h,m,s;
gettime(h,m,s);
if(h == 6 && m = 0 && s = 0)
{
if(PickupShown == 0)
{
thepickup=CreatePickup(...);
PickupShown = 1;
}
}
if(h == 8 && m = 0 && s = 0)
{
if(PickupShown == 1)
{
DestroyPickup(thepickup);
PickupShown = 0;
}
}
return 1;
}
Originally Posted by arachimi
if now 23 o'clock adn I want to disappear icon at 1(am)o'clock
how I set Hour. Thank's sir. |
#define APPEAR_TIME 6 //This is the time it will appear, Change this number to what time you want it to appear at
#define DISAPPEAR_TIME 8 //Change this to what time you want it to dissapear.
#define APPEAR_TIME 23
#define DISAPPEAR_TIME 1
public CheckTime()
{
new h,m,s;
gettime(h,m,s);
if(h == APPEAR_TIME && m = 0 && s = 0)
{
if(PickupShown == 0)
{
thepickup=CreatePickup(...);
PickupShown = 1;
}
}
if(h == DISAPPEAR_TIME && m = 0 && s = 0)
{
if(PickupShown == 1)
{
DestroyPickup(thepickup);
PickupShown = 0;
}
}
return 1;
}