03.05.2012, 04:51
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.
Although using labels in PAWN is not recommended, the code above should work.
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;
}