okokDocs
  • About Us
  • Scripts
    • okokVehicleControl
      • Config file
    • okokMechanicJob
      • Config file
    • okokPoliceJob
      • Config file
      • qb-inventory support
    • okokBossMenu
      • Config file
    • okokMulticharacter
      • Config file
    • okokPhone
    • okokSpawnSelector
      • Config file
      • qb-multicharacter support
    • okokLoadingScreen
      • Config file
    • okokVehicleSales
      • Config file
    • okokShop
      • Config file
    • okokGasStation
      • Config file
    • okokTuning
      • Config file
    • okokGarage
      • Config file
      • RGB vehicle colors
      • Inventories metadata
      • Housing integrations
      • qb-phone support
    • okokVehicleShop
      • Config file
      • Common errors
    • okokBanking
      • Config file
      • Paycheck transactions
      • Registering transactions
    • okokMarketplace
      • Config file
      • Common errors
    • okokChat
      • Config file
      • Export
    • okokBilling
      • Config file
      • Snippets
    • okokCrafting
      • Config file
    • okokContract
      • Config file
    • okokTalkToNPC
      • Config file
    • okokReports
      • Config file
    • okokNotify
      • Config file
      • Snippets
    • okokTextUI
      • Config file
      • Snippets
    • okokRequests
    • okokDeleteVehicles
      • Config file
  • Others
    • Discord Webhook
Powered by GitBook
On this page
  • Installation Guide
  • Displaying a request
  • Important
  • Dark/light theme
  • Server artifacts
  1. Scripts

okokRequests

PreviousSnippetsNextokokDeleteVehicles

Last updated 12 months ago

Installation Guide

Displaying a request

Client side

exports['okokRequests']:requestMenu(target, time, title, message, trigger, side, parameters, parametersNum)

Server side

TriggerClientEvent('okokRequests:RequestMenu', source, target, time, title, message, trigger, side, parameters, parametersNum) 

Fields:

  • The target field defines who receives the request;

  • The time field lets you set the time the request window will stay on the screen;

  • The title field is where you set the request title;

  • The message field lets you choose the message that will appear on the request window;

  • The trigger field is where you choose the event that will be executed;

  • The side (client/server) field allows you to choose if the trigger is client or server sided;

  • The parameters field contains the parameters the trigger takes;

  • The parametersNum field are the number of paramenters used.

Example

TriggerClientEvent('okokRequests:RequestMenu', source, tonumber(args[1]), 10000, '<i class="fas fa-question-circle"></i>&nbsp;Job Offer', 'Tommy wants to hire you.', 'client', 'parameter1,parameter2,parameter3,parameter4,parameter5', 5)

Important

  • The side field should be either client or server;

  • The parameters field needs to be a string, all parameters need to be separated by a comma ',' and without any spaces;

  • Always set the number of parameters used, in the parametersNum field;

  • If you don't have any parameters, you don't need to add the parameters and the parametersNum field.

Dark/light theme

To enable/disable the dark/light mode, you should go to the scripts.js file and navigate to the line 1, if var darkMode is set to true, the dark theme will be enabled, otherwise it the enabled theme will be the light.

Server artifacts

Make sure your server artifacts version is above the 5181.

Windows:

Linux:

YouTube Video
https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/
https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/