Skip to main content
Login RewardsDeprecated

Installation

Install the login reward resource, build its Lua and NUI files, and configure identifiers and rewards.

Required dependencies

Node.js

Required for dependency installation and the Vue/Vite build.

FiveM artifact 4752+

Required for Lua 5.4 and escrow support.

Installation steps

  1. 01

    Extract the resource

    Copy the extracted folder into your server resources directory.

  2. 02

    Install dependencies

    Open a terminal in the resource folder and install its npm packages.

    npm install
  3. 03

    Build the resource

    Build the Lua bundle and Vue/Vite NUI.

    npm run build
  4. 04

    Import the database

    Import the included SQL file into your server database.

  5. 05

    Configure locales

    Edit the translations inside the locale directory.

    locales/
  6. 06

    Start the resource

    Add the resource to your server configuration.

    ensure avp_login_rewards

Multicharacter support

Identifier configuration

If you use a multicharacter resource, modify the GetIdentifier function in config.lua. Otherwise, the identifier will be the same for each character.

Lua bundling

Recompile source files

Changes to .lua files inside the source folder do not apply immediately. Run npm run build in the terminal to recompile them.

Runtime files

The config and locale files are applied at runtime, so changes to them do not require recompilation.

Creating a new reward

Reward images
source/cef/src/assets/img

Add the image used by the new reward here.

Configuration

Register a reward

Register rewards in a shared file, such as config.lua.

You should register the rewards in a shared file. (like config.lua)
addReward(1, {
name = "Moneybag",
description = "Contains $500",
img = "money.png",
cb = function(source)
local xPlayer = ESX.GetPlayerFromId(source)
if not xPlayer then return end

xPlayer.addAccountMoney("bank", 500)
end
})