ByteXcripts Docs
  • 👋Welcome
  • 📸Camera Mode
    • Settings
    • Filters
  • 🚕NPC Taxi
    • Settings
    • Custom Functions
  • 🎰Roulette
    • Settings
    • Custom Functions
  • 📝Text UI
    • Settings
    • Exports
    • How to use it
  • 💊Sell Drugs
    • Settings
    • Custom Functions
  • 🏠House Robbery
    • Settings
    • Custom Functions
    • Custom Interiors
Powered by GitBook
On this page
  1. House Robbery

Custom Functions

PreviousSettingsNextCustom Interiors

Last updated 2 months ago

Hemos añadido tres funciones custom en el cliente y dos en el servidor las cuales no se puede cambiar el nombre de las mismas ya que eso afectaría al código principal. Aquí le dejamos un poco más de información para que sepa que añadir dentro de las funciones:

client/custom_functions.lua
function callThePolice(coords)
  • El parámetro coords son las coordenadas desde donde se avisa a la policía, para que así se pueda marcar en el mapa la ubicación del aviso.

client/custom_functions.lua
function customNotificationsFunction(message)
  • El parámetro message es el mensaje que aparece en la notificación, eso significa que en el export o evento que utilice su servidor para enseñar las notificaciones, deberá pasar message como el mensaje.

client/custom_functions.lua
function customTextUIFunction(message)
  • El parámetro message es el mensaje que aparece en el TextUI, eso significa que en el export o evento que utilice su servidor para enseñar el TextUI, deberá pasar message como el mensaje.

server/custom_functions.lua
function customNotificationsFunction(src, message)
  • El parámetro src es el jugador al que se le debe mandar la notificación, de esa manera solo recibirá la notificación el jugador que debe recibirla.

  • El parámetro message es el mensaje que aparece en la notificación, eso significa que en el export o evento que utilice su servidor para enseñar las notificaciones, deberá pasar message como el mensaje.

server/custom_functions.lua
function customInventory(src, plate, itemName, itemQuantity)
  • El parámetro src es el jugador al que se le debe mandar la notificación, de esa manera solo recibirá la notificación el jugador que debe recibirla.

  • El parámetro plate es la mátricula del vehículo donde se guardará el item del objeto.

  • El parámetro itemName se refiere al item que se tiene que actualizar en el inventario, ya sea añadir o eliminar.

  • El parámetro itemQuantity se refiere a la cantidad que tiene que actualizar de ese mismo item, ya sea la cantidad que se haya que quitar o añadir.

We have added three custom functions on the client side and two on the server side, whose names cannot be changed as it would affect the core code. Here is some additional information to help you understand what to add inside the functions:

client/custom_functions.lua
function callThePolice(coords)
  • The coords parameter is the coordinates from where the police are notified, so that the location of the notice can be marked on the map.

client/custom_functions.lua
function customNotificationsFunction(message)
  • The message parameter is the message that appears in the notification, that means that in the export or event that your server uses to show the notifications, you must pass message as the message.

client/custom_functions.lua
function customTextUIFunction(message)
  • The message parameter is the message that appears in the TextUI, that means that in the export or event that your server uses to show the TextUI, you must pass message as the message.

server/custom_functions.lua
function customNotificationsFunction(src, message)
  • The src parameter is the player to whom the notification should be sent, that way only the player who should receive the notification will receive it.

  • The message parameter is the message that appears in the notification, that means that in the export or event that your server uses to show the notifications, you must pass message as the message.

server/custom_functions.lua
function customInventory(src, plate, itemName, itemQuantity)
  • The src parameter is the player to whom the notification should be sent, that way only the player who should receive it will receive the notification.

  • The plate parameter is the plate number of the vehicle where the object item will be stored.

  • The item parameter refers to the item that has to be updated in the inventory, whether it is added or removed.

  • The quantity parameter refers to the quantity that has to be updated of that same item, whether it is the quantity that has to be removed or added.

🏠