|
|
#1 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Oct 2010
Location: Lithuania
Posts: 252
Reputation: 17
|
Sleep v1.0 DescriptionThis include freezes the script for some time. Example Example of script: pawn Code:
Code:
Time expired in 5000 milliseconds Firstly, move sleep.inc file into your Pawno includes folder. Then, add this at the top of your script: pawn Code:
I hope you find this useful. Download Solidfiles Pastebin |
|
|
|
|
|
#2 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Feb 2009
Location: Belgium
Posts: 3,079
Reputation: 575
|
Nothing useful - will just freeze your server, no updates, nothing. You could have posted this in the Useful Snippet topic though.
|
|
|
|
|
|
#3 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Nov 2010
Location: São Paulo, Brasil
Posts: 2,557
Reputation: 230
|
There's already a sleep function.
|
|
|
|
|
|
#4 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jan 2010
Posts: 475
Reputation: 25
|
How can I use this? What for I mean...
|
|
|
|
|
|
#5 |
|
Beta Tester
![]() ![]() ![]() ![]() ![]() Join Date: Aug 2010
Location: Santa Barbara, CA
Posts: 141
Reputation: 133
|
|
|
|
|
|
|
#6 |
|
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2011
Location: England
Posts: 5,413
Reputation: 766
|
Why would you even want to use this though? I can't see any use for it..
|
|
|
|
|
|
#7 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2011
Location: in Holland, UltraStunting and StreetRodZ Racers
Posts: 1,127
Reputation: 39
|
yeah, i wouldnt use it either, anyways its good job of him, though its useless XD, anyways good job, but i dont think anyone will use it
|
|
|
|
|
|
#8 | |
|
Beta Tester
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2008
Location: 629
Posts: 13,671
Reputation: 1939
|
Quote:
h02 already pointed you to the main topic on this, but I will point you to a specific post inside that topic that covers the theory behind a "sleep" function that could work: http://forum.sa-mp.com/showpost.php?...8&postcount=22 I've never implemented it because I've never thought of a good way to implement returns nicely (although I have just come up with another idea for that using a special return value "cellmin"). Or I could attempt to save, unwind, and restore the ENTIRE stack. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sleep mode | Chris White | Server Support | 1 | 28/12/2011 04:23 AM |
| sleep | omer5198 | Scripting Help | 2 | 26/10/2011 03:43 PM |
| sleep function | iJumbo | Help Archive | 5 | 23/10/2010 03:06 PM |
| sleep | iJumbo | Help Archive | 1 | 02/10/2010 04:00 PM |
| sleep | russiany | Help Archive | 9 | 26/05/2009 03:17 PM |