Jump to content

Createblip


Recommended Posts

Guys please how can i add blip here :

function createSkinShops() 
    for index, shop in pairs(shops) do 
        local x, y, z, int, dim = shop.x, shop.y, shop.z, shop.int, shop.dim 
        marker = createMarker(x, y, z, "cylinder", 1.5, 255, 255, 0, 170) 
        setElementInterior(marker, int) 
        setElementDimension(marker, dim) 
        addEventHandler("onMarkerHit", marker, enteredShop) 
    end 
end 
addEventHandler("onResourceStart", resourceRoot, createSkinShops) 

Link to comment

You can use createBlip or createBlipAttachedTo.

local blipID = 45 -- The blip ID, 45 = t-shirt. 
  
function createSkinShops ( ) 
    for index, shop in pairs ( shops ) do 
        local x, y, z, int, dim = shop.x, shop.y, shop.z, shop.int, shop.dim 
        marker = createMarker ( x, y, z, "cylinder", 1.5, 255, 255, 0, 170 ) 
        setElementInterior ( marker, int ) 
        setElementDimension ( marker, dim ) 
        createBlipAttachedTo ( marker, blipID ) 
        addEventHandler ( "onMarkerHit", marker, enteredShop ) 
    end 
end 
addEventHandler ( "onResourceStart", resourceRoot, createSkinShops ) 

Link to comment

to integrate this script

local blip = createBlip(1209.3718261719,-904.79571533203,43.023754119873, 56, 0, 0, 0, 0, 0, 0, 250) -- Blip ID 56 
outputDebugString("Blip visible distance: "..getBlipVisibleDistance(blip)) 
setBlipVisibleDistance(blip, 150) -- distance 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...