👮Job contacts

You can use these to send alerts, distress signals and call to.

To add or modify job contacts [taxi, police, etc.] you can do that in the high_phone/config.lua file.

This resource is also compatible with dispatch scripts. The kinds that change your phone number to 911 or some other number, you just have to change the script's event that updates the phone data to a client-event high_phone:updateData

To add more job contacts or modify the existing ones find the line Config.JobContacts = {

Now if you want to add more contacts just copy the part below and paste it below all the job contacts, to understand what each line does, read the comments next to them:

   ["examplejob"] = { -- People with this job will receive these calls/messages.
        name = "Example", -- Shown contact name
        number = "123", -- Phone number to call to
        photo = "./media/icons/filename.png", -- base64 data image or an image URL or file location OR leave empty for no image.
        preAdded = true, -- Add it to the contacts app or not? If not added [set to false], you can only call it through the phone app, or message it through the messages app.
        callable = true, -- Can you call the contact?
        attachments = false, -- Can you send images as attachments to this contact?
        displayStatus = true, -- Display the online status for this contact when there are players in the job online?
        messageCallback = function(server, content, senderNumber)
            -- Add shared (server & client) code here. Argument 'server' is the IsDuplicityVersion function's returned value (shows if the environment is server-side or client-side)
            if(not server) then
                print("This is on the client-side, I just sent this message: '" .. content .. "'")
            else
                print("This is on the client-side, number " .. senderNumber .. " just sent this message: '" .. content .. "'")
            end
        end
    },

To use custom pictures for these contacts head to html/media/icons and upload your icons there. Then just change the file name in the field photo to the name of the image file you've uploaded and you're done!

If you want to use image links, just paste the link in the field photo

Last updated