Jump to content

[HELP]drawing an custom blip in the map.


Chris!i!

Recommended Posts

Hey there, I just downloaded from the community called customblip, I just did a new script with client side, and exported customblip with createCustomBlip, and searched Wiki and I was doing good, but It didn't work debugscript 3 saying WARNING: customblip\imagelib.lua:144: Error loading image @ 'dxDrawImage' [:cblip/image/dm.png]

I just did a folder called image and putted the image in it, but it keeps saying that ... I would share it here, it's easy ye but not workin with meh, so I need some help.

addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), 
    function() 
        exports.customblip:createCustomBlip ( 0,0, 20, 20, "image/dm.png" ) 
    end 
) 

Link to comment

try this

BlipsTable = { 
[1]={2355.98145, -1660.65625, "image/icon.png" }, 
[2]={2480.66650, -1666.94678, "image/icon.png" } 
} 
addEventHandler ( "onClientResourceStart" , getResourceRootElement(getThisResource ()), 
function () 
    for i=1,#BlipsTable do 
        local x, y , pic = BlipsTable[i][1], BlipsTable[i][2],BlipsTable[i][3] 
        local Blips = exports.customblips:createCustomBlip ( x, y, 16, 16,pic, 100 ) 
        exports.customblips:setCustomBlipRadarScale(Blips, 1) 
    end 
end) 

  • Thanks 1
Link to comment
try this
BlipsTable = { 
[1]={2355.98145, -1660.65625, "image/icon.png" }, 
[2]={2480.66650, -1666.94678, "image/icon.png" } 
} 
addEventHandler ( "onClientResourceStart" , getResourceRootElement(getThisResource ()), 
function () 
    for i=1,#BlipsTable do 
        local x, y , pic = BlipsTable[i][1], BlipsTable[i][2],BlipsTable[i][3] 
        local Blips = exports.customblips:createCustomBlip ( x, y, 16, 16,pic, 100 ) 
        exports.customblips:setCustomBlipRadarScale(Blips, 1) 
    end 
end) 

This literally did nothing but add a pointless loop, and you should check out the unpack function.

Hmmm.. The debug says a different thing : )

WARNING: customblip\imagelib.lua:144: Error loading image @ 'dxDrawImage' [:cblip/image/dm.png]

exports.customblip:createCustomBlip ( 0,0, 20, 20, "image/dm.png" )

That's just because customblips is calling the file from a different resoruce, so it needs the :resource_name/path/to/image.png.

This error can be caused if the image file doesn't exist in that location (make sure it does) and if it does exist, the image may be corrupt.

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...