JP-Playtime

JP-Playtime

This item is free.

Add to Basket

JP-Playtime · Per-Character Playtime Tracker for RedM VORP ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The foundation layer every serious VORP server needs.

JP-Playtime silently tracks how many hours each character has played and stores it in your database — ready for any other addon to query with a single export call. Build robbery protection, job gates, PvP restrictions, veteran rewards, or anything else that should scale with character experience.

━━ WHY PER-CHARACTER? ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Most servers want to protect new characters, not new players. A veteran player making a fresh character should earn their way up just like anyone else. JP-Playtime tracks the character — not the Steam account — so your gates mean something.

━━ FEATURES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⏱ Tracks total playtime per character in seconds 🗄 Auto-creates the player_playtime table on first start — no manual SQL 🔄 Configurable crash-protection checkpointing (default: every 5 minutes) 🔌 Clean server-side export: getCharPlaytime(charidentifier) 🪶 Zero ongoing overhead — purely event-driven, no polling ♻️ Hot-restart safe — live sessions survive /restart jp-playtime ⚙️ config.lua unencrypted — tune the checkpoint interval freely

━━ DEVELOPER API ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

local secs = exports['jp-playtime']:getCharPlaytime(charidentifier) -- returns total seconds including any live session delta

Gate robbery, PvP, jobs, or anything else in your existing addons with a single if-check. Works on offline characters too.

━━ REQUIREMENTS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

• RedM server running VORP Core • oxmysql

━━ INSTALLATION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  1. Drop jp-playtime into your resources folder
  2. Add: ensure jp-playtime (after vorp_core and oxmysql)
  3. Done — table creates itself on first boot