Timer Problem.
#1

Heey guys,

I have made a gametimer for my cops and robbers and i use more timers. Normally if i dont use other timers the timer works fine. But when i use the other timers to the gametimer takes longer.
Is there not a plugin or something to fix this?

Thanks Admigo.
Reply
#2

Minus the gametime timer to about half its time, if theres alot timers try your best to delete them and store all of them in one timer

pawn Код:
enum TIMER_DATA
{
    E_TIMER_INTERVAL[20(Amount of timers you want to store)]
}
new gTimerData[TIMER_DATA];

forward timer();
public timer()
{
    gTimerData[E_TIMER_INTERVAL][1] = gTimerData[E_TIMER_INTERVAL][1] + 500;// timer one, each time the timer is called it will do this; lets say this timer is set to 500ms

    if(gTimerData[E_TIMER_INTERVAL][1] == 2000) // 2 seconds call this:
    {
        gTimerData[E_TIMER_INTERVAL][1] = 0; Reset
        //code..
    }
}
Dont have to follow that but just a tip to shortening timers.
Reply
#3

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Minus the gametime timer to about half its time, if theres alot timers try your best to delete them and store all of them in one timer

pawn Код:
enum TIMER_DATA
{
    E_TIMER_INTERVAL[20(Amount of timers you want to store)]
}
new gTimerData[TIMER_DATA];

forward timer();
public timer()
{
    gTimerData[E_TIMER_INTERVAL][1] = gTimerData[E_TIMER_INTERVAL][1] + 500;// timer one, each time the timer is called it will do this; lets say this timer is set to 500ms

    if(gTimerData[E_TIMER_INTERVAL][1] == 2000) // 2 seconds call this:
    {
        gTimerData[E_TIMER_INTERVAL][1] = 0; Reset
        //code..
    }
}
Dont have to follow that but just a tip to shortening timers.
CAn you explain it with this?
Код:
	SetTimer("Jailed",1000,true);
	SetTimer("UpdateJP", 30000, true); //Updates the jackpot
	SetTimer("PlayerOneSecondVariables",1000,1);
	SetTimer("ServerOneSecondVariables",1000,1);
	SetTimer("checkpointUpdate",1100,1);
	SetTimer("SFPDGatesOpen",1000,1);
	SetTimer("ArmyGatesOpen",1000,1);
	SetTimer("TaxiPay",60000,1);
	SetTimer("HasSTITimer",10000,1);
        SetTimer("IncreaseTime", 100, true);//1000
Reply
#4

Need explain!
Reply
#5

I perfer to talk to you on MSN or any thing to chat with, this will take me hours to do with the forums posting..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)