Get how far the timer is?
#4

you can do something like this:

pawn Код:
new Time[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/timetogetpay", true))
    {
        new str[40]
        format(str, 40, "Time to get your pay: %i seconds", (Time[playerid]-GetTickCount())/1000);
        SendClientMessage(playerid, -1, str);
        return 1;
    }
    return 0;
}

forward MyTimer(playerid);
public MyTimer(playerid)
{
    //Supose the timer interval to be 10000ms
    Time[playerid] = GetTickCount()+10000;
    //do something here
}
Reply


Messages In This Thread
Get how far the timer is? - by Jstylezzz - 27.04.2012, 22:07
Re: Get how far the timer is? - by Crazymax - 27.04.2012, 22:11
Re: Get how far the timer is? - by Jstylezzz - 27.04.2012, 22:14
Respuesta: Get how far the timer is? - by TheChaoz - 27.04.2012, 22:14
Re: Respuesta: Get how far the timer is? - by Jstylezzz - 27.04.2012, 22:20

Forum Jump:


Users browsing this thread: 1 Guest(s)