Jobs

Welcome to Jobs Functions

Calls to workers

Quasar Smartphone has a system of contacts that will come automatically in your call application when entering the server, these contacts cannot be deleted unless you do it from config.lua.

Inside config.lua we can add the jobs we want so that the players can call them or send them a text message.

Workers will only be able to receive messages and calls, but not respond to said chat, to provide an answer they can double click on the received message and they will be able to call or message the subject

--- @param job 'Name of job who will receive the message'
--- @param name 'Visible label'
--- @param img  'Image of contact'
Config.Jobs = {
    { job = 'police',    name = 'Policia',  img = './img/apps/police.png' },
    { job = 'ambulance', name = 'Ems',      img = './img/apps/ambulance.png' },
    { job = 'mechanic',  name = 'Mechanic', img = './img/apps/mechanic.png' },
}

Duty system in works

To call the workers they must first be on duty, that is, they will have to activate the function of receiving calls using its corresponding command.

In the case of police, you can use the /911 command to go on duty and you will be able to receive calls.

This system will not change, because if we remove the services system, then there will be a lot of spam to many players causing damage to the server.

--[[
    IMPORTANT these are commands to receive or not receive messages NO MESSAGE IS SENT WITH THESE.
    to put it another way it is to enter and exit of duty.
]]
Config.jobCommands = { -- Just enter a number here, this is the number that will appear when you call.
    ['police'] = '112',
    ['ambulance'] = '113',
    ['mechanic'] = '114',
}

Messages to workers

As mentioned above, the jobs you add in config.lua will have their own contact on each phone, so we can send a text message to them, but they can't reply to us

In order to serve customers, they can click twice on the received message and the phone number of the person who sent the message will appear

Last updated