Wait Function
#1

In case anyone needs it.
If it has already been posted before, I apologize.

Note: Basically 'freezes' your code for 'x' amount of seconds.

Код:
Wait(milliseconds)
{
	new ticks = GetTickCount() + milliseconds;
	while(ticks > GetTickCount())
	{
	  // waiting patiently...
	}
}
Reply
#2

As has been said many times, PAWN is single threaded, and this will interrupt the function of the entire script..

Or something to that effect..
Reply
#3

That's why I only use it for things like looping connect attempts.
Reply
#4

Basically when you run this everything on the server will stop for everybody...
Reply
#5

I thought you stated it pretty well in your first post, but yes.

I'm pretty sure that is also how the pawno function "delay" works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)