Skip to content

Byte-Labs-Studio/bl_sprites

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bl_sprites

Description

Interactive World Sprites that provide players extra info.

Dependencies:

Example

local CreateSprite = exports.bl_sprites

local test = CreateSprite:sprite({
    coords = GetEntityCoords(PlayerPedId()),
    key = "R",
    shape = "circle",
    spriteIndicator = true,
    colour = {255, 0, 0, 255},
    distance = 5.0,
    scale = 0.05,
    canInteract = function()
        return true
    end,
    nearby = function()
        print('nearby')
    end,
    onEnter = function()
        print('onEnter')
    end,
    onExit = function()
        print('onExit')
    end,
})

-- test is an sprite class that have options data and the 2 below function 

Wait(2000)
test:updateTargetData('scale', 0.08)

Wait(2000)
test:removeSprite()