The online racing simulator
AFK/IDLE Timer
Hello,

Created a script to calculate your AFK/Idle time.

#AFK timer resets after enter a message or when you start driving.
#Idle timer resets after you start driving.

ScriptInfo:

#==================================================================================#
#Scriptname: IdleAFKTimer.LPR
#Author: Bass-Driver
#Version: 1.2
#VersionDate: 09-06-2018
#
##Version 1.1:
# -Fixed: Timer didnt work when a new player joined the server.
# -Fixed: Added ToNum() to check time.
##Version 1.2:
# -Add: MaxAFKTime GlobalVar
# -Add: MaxIdleTime GlobalVar
# -Fixed: Driving while lapperreboot still activate the timers. ( added a speedcheck)
#==================================================================================#

Add your own code between the lines below:

IF((ToNum(GetPlayerVar( $Player["value"], "AFKTimer")) > $MaxAFKTime) || (ToNum(GetPlayerVar( $Player["value"], "IdleTimer")) > $MaxIdleTime)) THEN
#Do Something
ENDIF

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Attached images
Timer.jpg
Attached files
IdleAFKTimer.txt - 5.1 KB - 304 views
#2 - P V L
Hello, the timer works after entering track with a car but not when joining the server.So if people join and stay in spectate, bonus is running.

Greets P V L.Wink
I rebooted lapper, and i rejoined the server. The timer is working.

FGED GREDG RDFGDR GSFDG