Files
GTA4RP/scripts/client/afk.js
2023-02-07 15:11:56 -06:00

30 lines
1.0 KiB
JavaScript

// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/v-roleplay
// ===========================================================================
// FILE: afk.js
// DESC: Provides AFK detection
// TYPE: Client (JavaScript)
// ===========================================================================
// Init AFK script
function initAFKScript() {
logToConsole(LOG_DEBUG, "[V.RP.AFK]: Initializing AFK script ...");
logToConsole(LOG_DEBUG, "[V.RP.AFK]: AFK script initialized!");
}
// ===========================================================================
// Process stuff when game loses focus
function processLostFocusAFK(event) {
sendServerNewAFKStatus(true);
}
// ===========================================================================
// Process stuff when game gains focus
function processFocusAFK(event) {
sendServerNewAFKStatus(false);
}
// ===========================================================================