#1

Why sleep fuction has been broken by SA:MP TEAM ?
Reply
#2

What are you talking about!? I never saw any Sleep function
Reply
#3

I don't think there was a sleep function in SA-MP.
Reply
#4

Quote:
Originally Posted by Castle
What are you talking about!? I never saw any Sleep function
Newbies don't know.
It's a diffecoult question. I often see people use the sleep function, though many people don't even know it.
Abit info if I remember it well:
sleep - keyword sleep.
Sleep is like timer that works for main() only.
pawn Код:
print("Now it's starting to \"sleep\"");
sleep(10000);
print("10 seconds passed of \"sleep\"");
I guess you could understand it alone, it's very simple to use. Everyone can understand it.
Reply
#5

I know this , rofl xD i know c++ too , but i don't know why SA:MP Team has broken this function. It was nice xD
Reply
#6

Quote:
Originally Posted by russiany
I know this , rofl xD i know c++ too , but i don't know why SA:MP Team has broken this function. It was nice xD
I didn't know that it got fucked up too in 0.2X, though I never meet someone that used this
Reply
#7

Quote:
Originally Posted by JeNkStAX
Pawn is only Single Threaded, Therefor its not possible to have a sleep function without halting everything else from going on in the script, SA:MP didnt "break" it, Its just how Pawn is, The only place sleep has and ever will work is in main().
Like I said in my first reply - This function can be used ONLY in main().
Reply
#8

Ok , use it in main , and start the server. Tell me what happend
Reply
#9

https://sampwiki.blast.hk/wiki/Code_Snippets#Halt
Reply
#10

Quote:
Originally Posted by //exora
Yes, there is a big load of crap on the wiki.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)