Delay, Sleep, Pause???????
#5

Quote:
Originally Posted by Reynolds
Посмотреть сообщение
Somebody has created a function called "halt". I'm afaird this isn't what you're looking for, since it stops the thread, means it freezes the server for all players (multi-thread plugins' calculations will also run).

What you'd like to do is not possible without timers. I hate them too, but no other way. You can't just wait for a few seconds, even not in callbacks. This can be really annyoing, but this is the best you can do ATM.

pawn Код:
forward Continue(playerid);

function(){
    DoSomething  = 1;
    SetTimerEx("Continue",4000,false,"i",playerid);
    continue_label: new DoSomething = 3; //the continue of your function
    new DoSomething = 4;
}

public Continue() {
    DoSomething = 2;
    goto continue_label;
}
Although using labels in PAWN is not recommended, the code above should work.
Thank you for letting me know. It sucks but oh well.

And Ill give that code a test later and see if it works. Looks very promising
Reply


Messages In This Thread
Delay, Sleep, Pause??????? - by LeetModz - 03.05.2012, 02:50
Re: Delay, Sleep, Pause??????? - by WarriorEd22 - 03.05.2012, 03:25
Re: Delay, Sleep, Pause??????? - by LeetModz - 03.05.2012, 03:48
Re: Delay, Sleep, Pause??????? - by Reynolds - 03.05.2012, 04:51
Re: Delay, Sleep, Pause??????? - by LeetModz - 03.05.2012, 07:34

Forum Jump:


Users browsing this thread: 1 Guest(s)