SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 15/11/2008, 11:15 PM   #1
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 18,301
Reputation: 2572
Default [FS] [0.2x] YUP - Y_Less's Update Peripherals - 0.3

YUP - Y_Less's Update Peripherals - 0.3

What?

This script uses the new OnPlayerUpdate to detect a range of changing player stats, possibly including being paused, losing health, buying weapons and more.

0.3 introduces a load of new features for script configuration, including what to do with people when they're detected as paused.

This version includes callbacks for when players are both paused and expired. A paused player is one who is not ingame but has not been out the game too long. An expired player is one who has been paused for too long and needs dealing with, either automatically by YUP or manually. It also includes functions for use in other scripts to configure YUP pause settings and get information about players.

Finally I found a major bug in the pause detection when you die, so I corrected that.

For more information refer to the readme.

How?

To use:
  • Extract YUP.rar to your server folder.
  • Add "YUP" to the end of your "filterscripts" line in server.cfg. If you don't have a filterscripts line add one. E.g:
Code:
filterscripts adminspec vactions yup
For more advanced uses refer to the readme.

When?

This script only works on SA:MP versions 0.2x (and presumably higher).

Where?

Filterscript
Include

Why?

Although most of these features are already possibly with timers there is a delay between the event happening and the next timer call. This way you can detect events the moment the server knows about them and instantly propagate the information amongst all the running scripts.

If you're wondering why I copied the weapon state code 13 times instead of using a loop it's for speed. Explicit code is slightly faster than loops, and in this case there will never be more or less than 13 slots, so writing a loop is pointless. Yes it would have been marginally easier to code but not a whole lot and it doesn't matter to you lot how easy it was to code anyway, you just get the pure speed benefits. Plus it means you can optimise the code very simply by removing chunks if, for example, you have no weapons from slot 4 on your server (although then you probably want to keep that to detect cheaters).

Last edited by Y_Less; 02/06/2013 at 12:12 PM.
Y_Less is offline   Reply With Quote
Old 15/11/2008, 11:24 PM   #2
D4rkBlade
Little Clucker
 
Join Date: Jan 2007
Posts: 16
Reputation: 0
Default Re: [FS] [0.2x] YES - Y_Less's anti-Esc Script

Very good :P

Does it work on Linux? (GetTickCount)
D4rkBlade is offline   Reply With Quote
Old 15/11/2008, 11:27 PM   #3
[NBG]XxXkranXxX
Big Clucker
 
Join Date: Jul 2008
Posts: 141
Reputation: 0
Default Re: [FS] [0.2x] YES - Y_Less's anti-Esc Script

Sounds nice , will try when my servers upgraded
[NBG]XxXkranXxX is offline   Reply With Quote
Old 15/11/2008, 11:28 PM   #4
sebihunter
Gangsta
 
Join Date: Nov 2006
Posts: 582
Reputation: 3
Default Re: [FS] [0.2x] YES - Y_Less's anti-Esc Script

great work Y_Less
sebihunter is offline   Reply With Quote
Old 16/11/2008, 12:57 AM   #5
LarzI
High-roller
 
LarzI's Avatar
 
Join Date: Apr 2007
Location: Norway
Posts: 3,554
Reputation: 130
Default Re: [FS] [0.2x] YES - Y_Less's anti-Esc Script

Good job
__________________


NEW: [FS] Simple Cellphones

if( strfind( title, "REP", true ) != -1 )
{________________________________________
Sigh();__________________________
}________________________________________


LarzI is offline   Reply With Quote
Old 16/11/2008, 01:22 AM   #6
1111
Little Clucker
 
Join Date: Nov 2007
Posts: 13
Reputation: 0
Default Re: [FS] [0.2x] YES - Y_Less's anti-Esc Script

WOW good man

but i can't test it

where i can get 0.2x?
1111 is offline   Reply With Quote
Old 16/11/2008, 01:35 AM   #7
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 18,301
Reputation: 2572
Default Re: [FS] [0.2x] YES - Y_Less's anti-Esc Script

http://forum.sa-mp.com/index.php?topic=78112
Y_Less is offline   Reply With Quote
Old 16/11/2008, 05:21 AM   #8
MenaceX^
High-roller
 
Join Date: Aug 2008
Posts: 3,821
Reputation: 13
Default Re: [FS] [0.2x] YES - Y_Less's anti-Esc Script

Quote:
Originally Posted by Y_Leѕѕ
YES - Y_Less's anti-Esc Script

Why?

Why not?
Lol, Alex you made me laugh xDD

Good job
MenaceX^ is offline   Reply With Quote
Old 16/11/2008, 05:22 AM   #9
JaTochNietDan
High-roller
 
JaTochNietDan's Avatar
 
Join Date: Apr 2007
Location: Republic of Ireland
Posts: 4,301
Reputation: 357
Default Re: [FS] [0.2x] YUP - Y_Less's Update Peripherals

Fastest release ever . Good work Alex, this will come in very handy no doubht.
__________________
Releases:
[Includes]: [jBan] | [jBanLite]
[Plugins]: [FileManager] | [Execute]
[Applications]: [Remote Administrator *NEW] | [Script King] | [RCON GUI]
[Tools]: [Random Spawn Array Generator]

Learn PAWN and more:
http://www.jatochnietdan.com


JaTochNietDan is offline   Reply With Quote
Old 16/11/2008, 05:22 AM   #10
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 18,301
Reputation: 2572
Default Re: [FS] [0.2x] YUP - Y_Less's Update Peripherals

OK, major update. Now does far more than detecting players who are alt-tabbed. It also gives instant access to all sorts of information the moment it changes.
Y_Less is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Y_Less's Code Generator ziomal432 Help Archive 4 26/10/2010 09:50 AM
GTA SA MP new update?? sjvt General 5 02/05/2010 08:27 PM
[HELP] How can i update my r4 to r5 ? andershh Help Archive 6 23/04/2010 04:02 PM
Update from 0.2.x to 0.3? djdanni Server Support 15 13/10/2009 06:58 PM
Y_Less's Vehicle/Checkpoint Streamer Redfox2009 Help Archive 0 11/08/2009 03:12 PM


All times are GMT. The time now is 04:45 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.