Get Player Phone

Only follow this step if you have general programming knowledge or a trusted programmer to help you during the integration process.

Do not try to use this export in the PRO version, as it is exclusive to the current version.

Quasar Smartphone brings a very simple export to find a player's phone. To do this we will use the player source on the server side and execute everything as indicated.


Use of export

To execute this export we simply need the player source.

To obtain the phone number we will use a special export that we will explain here its name, function and way of use. This export is only usable on the server side.

-- source: Player source
exports['qs-base']:GetPlayerPhone(source)

Here is a small example of use using qs-dispatch events.

exports['qs-dispatch']:GetPlayerInfo(PlayerID, function(playerData)
    if (not playerData) then
        ErrorPrint("Error getting player data")
        return
    end
    local src = source
    local Phone = exports['qs-base']:GetPlayerPhone(src) --export
    TriggerEvent('qs-dispatch:server:CreateDispatchCall', {
        job = { 'police', 'sheriff', 'traffic', 'patrol' },
        callLocation = playerData.coords,
        callCode = { code = 'Hight Speed', snippet = 'Vehicle' },
        message = " street_1: ".. playerData.street_1.. " street_2: ".. playerData.street_2.. " sex: ".. playerData.sex.. " number: ".. Phone.. " vehicle_label: ".. playerData.vehicle_label.. " vehicle_colour: ".. playerData.vehicle_colour.. " vehicle_plate: ".. playerData.vehicle_plate.. " speed: ".. playerData.speed.. "",
        flashes = false,
        image = nil,
        blip = {
            sprite = 488,
            scale = 1.5,
            colour = 1,
            flashes = true,
            text = 'Hight Speed',
            time = (20 * 1000),     --20 secs
        }
    })
end)

Last updated

Was this helpful?