Dependencies

DEPENDENCIES

INTERACT

If you want to use the interact you can download it from the following link: https://github.com/bitc0de/bit-interact

The interact is the icon that appears when you approach the garbage truck with an "E".

If you do not want to use any interact and simply want to use a drawText in the drawTxt function modify it. By default it is like this:

function drawTxt(key, text, font, centre, x, y, scale, r, g, b, a)
    TriggerEvent("bit-interact:Start", key, text)

    -- default drawtxt: 

    --[[SetTextFont(font)
    SetTextProportional(0)
    SetTextScale(scale, scale)
    SetTextColour(r, g, b, a)
    SetTextDropShadow(0, 0, 0, 0, 255)
    SetTextEdge(1, 0, 0, 0, 255)
    SetTextDropShadow()
    SetTextOutline()
    SetTextCentre(centre)
    SetTextEntry("STRING")
    AddTextComponentString(text)
    DrawText(x, y)]]
end

Change to this:

function drawTxt(key, text, font, centre, x, y, scale, r, g, b, a)
    SetTextFont(font)
    SetTextProportional(0)
    SetTextScale(scale, scale)
    SetTextColour(r, g, b, a)
    SetTextDropShadow(0, 0, 0, 0, 255)
    SetTextEdge(1, 0, 0, 0, 255)
    SetTextDropShadow()
    SetTextOutline()
    SetTextCentre(centre)
    SetTextEntry("STRING")
    AddTextComponentString(text)
    DrawText(x, y)
end

TARGET

If instead of using interact you want to use a targeting system you must have one installed, either qb-target, ox-target or whatever you prefer.

Last updated