Skip to content

VNS Playtime Reward

A play-to-earn retention script for FiveM. Players accumulate online time and receive a money bonus every time they hit the configured playtime target (default: 4 hours). A small on-screen panel shows the countdown to the next reward and the amount waiting.

One resource runs on QBCore, QBox and ESX. Framework, money and notification support comes from vns-core.

Feature overview

  • Server-side playtime counter - the server adds every player's online time at a fixed interval (default: every 60 seconds) and pays out when the target is reached. Clients never send a timer or an amount.
  • Persistent progress - playtime is saved per character in the script's own database table, so progress survives relogs and server restarts. Players don't have to earn the reward in one sitting.
  • Money payout - the reward is added to the account of your choice (bank by default), with a notification.
  • Countdown panel - an on-screen panel with the remaining time (HH:MM) and the reward amount. It hides while the pause menu is open or no character is loaded.
  • Character switching - progress follows the loaded character, so multicharacter servers track each character separately.

How it works

  1. When a character loads, the server loads its saved playtime and starts counting.
  2. Every refresh interval the counter goes up by the interval and is saved; the panel is updated at the same time.
  3. When the counter reaches Config.Reward.Timer, it resets to 0, the money is paid out and the player gets a "You got the bonus!" notification.
  4. The cycle starts over - there is no limit on how often a player can earn the reward.

Open vs Encrypted

The script ships in an Open and an Encrypted variant. In the Encrypted variant config.lua, client/client_open.lua and server/server_open.lua stay editable - the timer, reward amount, account, currency symbol, texts, the payout function and the legacy data migration live there.