Skip to content

Usage (client)

Loaf edited this page Nov 23, 2021 · 1 revision

Getting the library

To use the functions, you first need to get the library by adding the following code to your client script:

local lib = exports["loaf_lib"]:GetLib()

Get a ped headshot/mugshot as base64

local result = lib.GetBase64(PlayerPedId())
if result.success then
    print(result.base64)
else
    print("Error", result.error)
end

Blips

for blip options, see loaf_lib/client/functions.lua

local coords = vector3(-881.92, 414.05, 85.74)
-- create blip
local blip = lib.AddBlip({
    coords = coords,
    label = "A house blip!",
    sprite = 40,
})
-- remove blip
lib.RemoveBlip(blip)

Clone this wiki locally