SA-MP Forums

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

Thread Tools Display Modes
Old 21/08/2019, 12:15 PM   #1
Big Clucker
Robson04's Avatar
Join Date: Aug 2018
Posts: 66
Reputation: 0
Default Advanced Anti-AFK

Advanced Anti-AFK


Hi everyone. I provide you with my include that I have subscribed to this month. It concerns the anti afk system. It is advanced and certainly works much better than other predecessors. It certainly does not create any crashes.

About of include

This include has work in unix system. You can create your timer in script but you must remove timer-call in include. Don't use timers time > 1000ms for? You can't update anti-afk for 500ms or 250.. It all checks unix for you! Read down informations to tell you how you can activite this include in your gamemode script. MAX_AFK_SECONDS in include applies to maximum seconds to check afk. (defualt 59)


This include creates a callback if you use this library in a script you don't need to define them. You must create callbacks to not get errors in compilator.
PHP Code:
OnPlayerEnterAFK(playerid) - is call when player start afk.
OnPlayerExitAFK(playerid) - is call when player send movement/click any(sa-mpkeybutton 


All functions to use. (remember, you must active this code to player using EnableAFKSystemForPlayer)
PHP Code:
IsPlayerAFK(playerid); - you can check if is player in afk in this time.
'* EnableAFKSystemForPlayer(playerid); - use this function when player has logged in because then script can checking players afk. Nothing specific return.'
SetPlayerAFKStatus(playeridbool:true/false); - true set afk and false delete from afk list. Nothing specific return. 
CheckPlayerAFK(playerid); - you will can use this function to checking afk status in your clockYou should use one second repeat timer (1000ms


Thanks to:
* ****** (Hooking)
* SA-MP (Main Library)
Robson04 is offline   Reply With Quote

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
[FilterScript] Advanced Anti IP omur1905 Filterscripts 1 24/08/2017 02:33 AM
[FilterScript] [AAS] Advanced Anti S*beit - Keep your server clean against cheaters! SlowARG Filterscripts 13 29/11/2016 03:29 PM
[FilterScript] Advanced Anti-Spawn Kill samp_boy Filterscripts 13 25/03/2014 02:29 PM
[FilterScript] iWeapons - Dynamic weapon control (with advanced anti db) iggy1 Filterscripts 14 17/04/2012 12:21 AM
[FilterScript] Advanced Anti-Driveby! Master_Gangster Filterscripts 4 20/03/2011 12:19 AM

All times are GMT. The time now is 12:35 AM.

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