Jump to content

customblips


nk0zkh0z

Recommended Posts

Please help me, it does not work :((

I want to change blip on the map with my images. :((

local shit = exports.customblips:createCustomBlip ( 2290.2392578125, 2430.31640625, 16, 16, "img/iconlvpd.png" ) 
exports.customblips:setCustomBlipStreamRadius(shit, 100) 
         
local shit = exports.customblips:createCustomBlip ( 2474.3134765625, 1024.2529296875, 16, 16, "img/iconbank.png" ) 
exports.customblips:setCustomBlipStreamRadius(shit, 100)         
  
  
local shit = exports.customblips:createCustomBlip ( 2322.4189453125, 549.408203125, 16, 16, "img/iconbencang.png" ) 
exports.customblips:setCustomBlipStreamRadius(shit, 100) 
         
local shit = exports.customblips:createCustomBlip ( 1072.3876953125, 2310.4091796875, 16, 16, "img/iconrrr.png" ) 
exports.customblips:setCustomBlipStreamRadius(shit, 100)     
  
local shit = exports.customblips:createCustomBlip ( 21044.53125, 1015.2919921875, 16, 16, "img/iconthuvien.png" ) 
exports.customblips:setCustomBlipStreamRadius(shit, 100) 
         
local shit = exports.customblips:createCustomBlip ( 1675.0947265625, 1447.7275390625, 16, 16, "img/iconsanbay.png" ) 
exports.customblips:setCustomBlipStreamRadius(shit, 100)     
  
local shit = exports.customblips:createCustomBlip ( 2462.111328125, 2243.763671875 ,16, 16, "img/iconjobphongvien.png" ) 
exports.customblips:setCustomBlipStreamRadius(shit, 100) 
  
local shit = exports.customblips:createCustomBlip ( 1756.859375, 2077.61328125, 16, 16, "img/iconsocuuhoa.png" ) 
exports.customblips:setCustomBlipStreamRadius(shit, 100) 
  
local shit = exports.customblips:createCustomBlip ( 2330.890625, 2165.7734375, 16, 16, "img/iconcasino.png" ) 
exports.customblips:setCustomBlipStreamRadius(shit, 100) 

Link to comment

Type /debugscript 3

Errors ?

try with one

--Client

addEventHandler  (  "onClientResourceStart" , getResourceRootElement ( getThisResource ( ) ) , 
     function ( ) 
        exports.customblips:createCustomBlip (  2290.2392578125, 2430.31640625, 16, 16 , "img/iconlvpd.png"  )  
    end  
) 

Link to comment
Type /debugscript 3

Errors ?

try with one

--Client

addEventHandler  (  "onClientResourceStart" , getResourceRootElement ( getThisResource ( ) ) , 
     function ( ) 
        exports.customblips:createCustomBlip (  2290.2392578125, 2430.31640625, 16, 16 , "img/iconlvpd.png"  )  
    end  
) 

I tried the code above but it still does not work :(:cry:

Link to comment
Dude open the console and type there : debugscript 3

And check if there is any error and report here and why you have named the variables :~ try some decent name like blip as ~ is also a symbol for not

MTA Server: "debugscript: Incorrect client type for this command"

Link to comment

Try this

local BlipsTable = { 
[1]={2290.2392578125, 2430.31640625, "img/iconlvpd.png" } 
[2]={2474.3134765625, 1024.2529296875, "img/iconbank.png" } 
[3]={2322.4189453125, 549.408203125, "img/iconbencang.png" }     
[4]={1072.3876953125, 2310.4091796875, "img/iconrrr.png" } 
[5]={21044.53125, 1015.2919921875, "img/iconthuvien.png" } 
[6]={1675.0947265625, 1447.7275390625, "img/iconsanbay.png" } 
[7]={2462.111328125, 2243.763671875 ,"img/iconjobphongvien.png" } 
[8]={1756.859375, 2077.61328125, "img/iconsocuuhoa.png" } 
[9]={2330.890625, 2165.7734375, "img/iconcasino.png" } 
} 
  
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 

Link to comment

@Walid, forgot to add a comma :o

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) 

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