💻Installation
This guide provides instructions for installing the Rep-Weed item pack on your QBCore-based FiveM server using either the LJ/QB or Ox inventory system.
Installation Steps
Token verification
Go to: server\citizen\scripting\lua\scheduler.lua
Find:
local eventHandlers = {}IMPORTANT: Replace it so it looks like this
function verifyToken(playerSrc, token)
local p = promise.new()
TriggerEvent('hotp:verifyToken', playerSrc, token, function(result)
p:resolve(result)
end)
return Citizen.Await(p)
end
local eventHandlers = {}
local deserializingNetEvent = false
local table_remove = table.remove
local whitelistEvents = {
['fivem-appearance:server:GetPlayerAces'] = true,
['hardcap:playerActivated'] = true,
['txsv:checkAdminStatus'] = true,
['txaLogger:DeathNotice'] = true,
['txAdmin:menu:playerModeChanged'] = true,
['txAdmin:menu:tpToWaypoint'] = true,
['txAdmin:menu:tpToCoords'] = true,
['baseevents:onPlayerDied'] = true,
}
server\citizen\scripting\lua\scheduler.luaModify Citizen.SetEventRoutine function
Citizen.SetEventRoutine functionGo to: server\citizen\scripting\lua\scheduler.lua
Look for
Replace the WHOLE FUNCTION with:

Adding HOTP to your scripts
Important: Repeat the following steps for EACH resource you want to protect using HOTP
Locate the
fxmanifest.luafile of your FiveM resource.Inside the file, find the
client_scriptssection.Add
'@hotp/build/client/token.lua'to theclient_scriptssection. Your updated code should look like this:
This addition ensures that the essential
token.luafile is included in the client-side scripts. This file handles tasks related to tokens, such as authentication and other functionalities
Ensure that the script requires Lua version 54 by adding the following line:
This line notifies FiveM that the resource relies on compatibility with Lua version 54.
Save the
fxmanifest.luafile after incorporating these changes.
By following these steps, HOTP will be successfully integrated into your script. If you encounter any difficulties or have further inquiries, don't hesitate to seek assistance.
Example
Last updated
Was this helpful?