Info: Gettime
#1

how to use gettime ?

my question is, how to transform this with a gettime or gettickcount, is possible ? this example uses a timerex

Код:
if(example[playerid] != 0)
{

    SetTimerEx("@reset", 4000, false, "d", playerid);

    return 1;
}
Код:
forward @Reset(playerid);

@Reset(playerid)
{
    // functions here

    return 1;
}
Reply
#2

??
Reply
#3

what do you mean, do you want this function to get called like every 4 seconds? then this is the best way, otherwise you should have to check the time every second and see if it equals to the time it should be called, witch means a faster tick-count on the timer and that will be harder for your server.

(if that's not what you mean, please explain a bit more.)
Reply
#4

mhm explain me the tickcount D:
Reply
#5

what do you mean with the tick count?
There is no function that gets called every second, that's why if you want one you'll have to set a timer like:

pawn Код:
forward TickCountFunction();
SetTimer("TickCountFunction", 1000, true);
//and then you'll have to make the tickcount function:


public TickCountFunction(){
//do the thing you want to be done every second here.
}
That's how you do a function that gets called every second, but if you want to do something every 4 second it better just doing a timer that ONLY gets called every 4 second instead of making this and checking the time.
(I don't really know what you want to do yet but that was what i was thinking about.)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)