Integrations

Custom Integrations For mChat Resource

Integration For Me Do Script

In this example I'll show you how to implement for this script you can adjust it for your script https://github.com/DeffoN0tSt3/3d-me-do/blob/master/client.luaarrow-up-right

To integrate this you need knowledge on development otherwise we don't advise you to try this.

local function displayText(ped, text, yOffset, source) -- I need to pass player source as an extra parameter to display in chat message
    local playerPed = PlayerPedId()
    local playerPos = GetEntityCoords(playerPed)
    local targetPos = GetEntityCoords(ped)
    local dist = #(playerPos - targetPos)
    local los = HasEntityClearLosToEntity(playerPed, ped, 17)

    if dist <= c.dist and los then
        peds[ped] = {
            time = GetGameTimer() + c.time,
            text = text,
            yOffset = yOffset
        }

        if not peds[ped].exists then
            peds[ped].exists = true
            local playerName = GetPlayerName(GetPlayerFromServerId(source))
            local messageData = {
                args = {playerName, text},
                tags = {"me"},
                playerId = source, 
                channel = 'me', 
            }
            TriggerEvent('chat:addMessage', messageData)
            Citizen.CreateThread(function()
                while GetGameTimer() <= peds[ped].time do
                    local pos = GetOffsetFromEntityInWorldCoords(ped, 0.0, 0.0, peds[ped].yOffset)
                    draw3dText(pos, peds[ped].text)
                    Citizen.Wait(0)
                end

                peds[ped] = nil
            end)
        end
    end
end

Integration For Twitter

In this example I'll show you how to implement for gcphone you can adjust it for your script

first find TwitterPostTweet function in gcphone

To integrate this you need knowledge on development otherwise we don't advise you to try this

Last updated