Wiki
Clone wikiEFLC-MP LUA / onPlayerAfk
Description
This function is triggered when the player doesn't send any sync packet for more than 5 seconds.
Parameters
Int playerId, Bool afk
Bool afk: True: is afk, False: no longer AFK
Return values
#!lua function myAfkFunction(playerid, afk) if(afk == true) then --Is AFK else if(afk == false) --No longer AFK end end registerEvent("myAfkFunction", "onPlayerAfk")
Updated