Jump to content

Attach text to markers?


Adde

Recommended Posts

That script didn´t even work o.O Just trouble in debug.

Shame that no one seems to help you out homeboi, here's a piece of code I wrote for you:

  
local messages = { 
    ["¿Que? Señor?"] = { 0, 0, 3 }, 
    ["No hablas Español, hablas Inglés."] = { 10, 0, 3 }, 
    ["Je ne parle pas français, je parle Néerlandais."] = { 20, 0, 3 } 
} 
  
function text_render ( ) 
    for i,v in pairs ( messages ) do 
        local x, y, z = unpack ( v ) 
        local sx, sy, _ = getScreenFromWorldPosition ( x, y, z ) 
         
        if sx then 
            dxDrawText ( i, sx, sy, sw, sh, tocolor ( 255, 200, 0, 255 ), 1.0, "default-bold" ) 
        end 
    end 
end 
  

Link to comment

Just add that:

addEventHandler("onClientRender",getRootElement(),text_render) 

at the end of this:

  
local messages = { 
    ["¿Que? Señor?"] = { 0, 0, 3 }, 
    ["No hablas Español, hablas Inglés."] = { 10, 0, 3 }, 
    ["Je ne parle pas français, je parle Néerlandais."] = { 20, 0, 3 } 
} 
  
function text_render ( ) 
    for i,v in pairs ( messages ) do 
        local x, y, z = unpack ( v ) 
        local sx, sy, _ = getScreenFromWorldPosition ( x, y, z ) 
        
        if sx then 
            dxDrawText ( i, sx, sy, sw, sh, tocolor ( 255, 200, 0, 255 ), 1.0, "default-bold" ) 
        end 
    end 
end 
  

There are no event to run the function.

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