Timer Help
#5

A better way to do it would be to create the timer for example: 20 seconds. Do a check to see when it reaches 10 seconds and then send the next message, no need to create two timers to do the same job and you can make it repeat if necessary.

Like this:

pawn Код:
public Delay1(playerid)
{
    new time;
    time++;
    if(time == 10)
    {
        SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "MESSAGE 1", ReturnName(playerid, 0));
    }
    if(time == 20)
    {
        SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "MESSAGE 2", ReturnName(playerid, 0));
    }
    return 1;
}
You can do this as many times as you like and when you kill the timer 'time' is reset.
Reply


Messages In This Thread
Timer Help - by Luke_James - 17.08.2015, 12:25
Re: Timer Help - by ZBits - 17.08.2015, 12:32
Re: Timer Help - by Luke_James - 17.08.2015, 12:50
Re: Timer Help - by DaniceMcHarley - 17.08.2015, 13:02
Re: Timer Help - by Dokins - 17.08.2015, 13:02
Re: Timer Help - by Luke_James - 17.08.2015, 13:12

Forum Jump:


Users browsing this thread: 5 Guest(s)