Which one is better? [OnPlayerUpdate vs SetTimer]
#1

pawn Код:
new tick;
public OnPlayerUpdate(playerid)
{
    if(GetTickCount() - tick > 1000)
    {
        tick = GetTickCount();
        SendClientMessage(playerid, -1, "1 second passed");
    }
    return 1;
}

//or

//gamemodeinit
timer = SetTimer("onesec", 1000, true);


forward onesec();
public onesec()
{
    SendClientMessageToAll( -1, "1 second passed");
    return 1;
}
Out of curiosity. Which way is better?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)