Sync Command
#6

Quote:
Originally Posted by Abagail
Посмотреть сообщение
pawn Код:
CMD:sync(playerid, params[])
{
if(SyncTimer == 0) {
SyncTimer[playerid] = 180;
ClearAnimations(playerid);
}
else return SendClientMessage(playerid, -1, "You must wait %d seconds before using this command again.", SyncTimer);
return 1;
}

timer UpdateSyncTimer[1000](playerid)
{
    if(SyncTimer > 0) SyncTimer--;
    return 1;
}
Quote:
Originally Posted by Ciandlah
Посмотреть сообщение
Why use timestamp? settimer is much easier
Why use a timer? You really don't need it and it slows down your whole game mode especially if you have many players or several different commands with timeouts. And it's not even easier...
I recommend not to use timers where ever you don't need them. Performance over memory. But if you do, please do not complain about your server lagging.
Reply


Messages In This Thread
Sync Command - by Blackazur - 14.05.2014, 19:51
Re: Sync Command - by Ciandlah - 14.05.2014, 19:57
Re: Sync Command - by Madd92 - 14.05.2014, 19:59
Re: Sync Command - by Abagail - 14.05.2014, 19:59
Re: Sync Command - by Ciandlah - 14.05.2014, 20:00
Re: Sync Command - by Madd92 - 14.05.2014, 20:02
Re: Sync Command - by Vince - 14.05.2014, 20:19
Re: Sync Command - by DaniceMcHarley - 14.05.2014, 21:08

Forum Jump:


Users browsing this thread: 2 Guest(s)