Open-source FiveM scripts, MLOs, vehicles & server packs for ESX, QBCore & Qbox. Browse Shop →
All Shop
okokRequests

Description

okokRequests is a small standalone resource that shows a request popup to a player, for example a job offer. You set the title, message and how long the popup stays; if the player accepts, the event you choose is triggered on the client or server. It works with any framework because other scripts call it through an export or event.

Features

  • Request window with title, message and display time.
  • Runs a client or server event of your choice with up to several parameters when the request is accepted.
  • Can be called from the client (export) or from the server (event).
  • Dark or light theme (var darkMode in line 1 of web/scripts.js).
  • No framework, database or other dependency needed.

Usage

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)

  • target: the player who receives the request.
  • time: how long the window stays on screen.
  • title and message: the texts of the request.
  • trigger: the event to run; side: client or server.
  • parameters: one string, separated by commas without spaces; parametersNum: the number of parameters. Both can be left out if you have no parameters.

Installation

  • Copy okokRequests into your resources folder.
  • Add ensure okokRequests to your server config and call it from your scripts as shown above.

Related resources

All resources →