How can I do it?
#3

Quote:
Originally Posted by Jstylezzz
Посмотреть сообщение
You can do it with a timer and a global variable, something like this:
pawn Код:
new CanDoOrder[MAX_PLAYERS]; //On top of your script
public OrderCompletedCallback(playerid) // Think of this of the callback or code where the order is completed
{
    CanDoOrder[playerid] = 0;
    SetTimerEx("CanDoOrderAgain",600000,0,"i",playerid);
}
public CanDoOrderAgain(playerid) //This is the callback which will enable the orders again
{
    CanDoOrder[playerid] = 1;
}
Then just check before the player attempts to do the order if the CanDoOrder variable is 1, if it isn't, send a message to the player that he has to wait.
If you're using the idea from above, be sure to add CanDoOrder[playerid] = 1; under OnPlayerConnect.
Also, please note that timers are slightly out of sync, to fix this, czech the fixes2 plugin.
Thanks, but look what I had write, I wanna this turn on when he comes and goes (dini,DOF2....)
Reply


Messages In This Thread
How can I do it? - by GuyYahood1 - 30.07.2013, 07:35
Re: How can I do it? - by Jstylezzz - 30.07.2013, 07:57
Re: How can I do it? - by GuyYahood1 - 30.07.2013, 08:02
Re: How can I do it? - by Jstylezzz - 30.07.2013, 08:06
Re: How can I do it? - by GuyYahood1 - 30.07.2013, 08:14
Re: How can I do it? - by GuyYahood1 - 24.08.2013, 15:25

Forum Jump:


Users browsing this thread: 1 Guest(s)