SA-MP Forums Archive
sleep - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: sleep (/showthread.php?tid=180711)



sleep - iJumbo - 02.10.2010

hey why sleep(); function dont work ? server say me invalid ...


Re: sleep - bigcomfycouch - 02.10.2010

PAWN is single-threaded, so you'd only be doing yourself harm attempting this. You'd pause your whole script if you used a sleep function. I highly recommend not using it, but here you go.

pawn Код:
wait(ms)
{
    ms += GetTickCount();
    while (ms > GetTickCount()) { }
}