Jump to content

dxDrawText


AlvareZ_

Recommended Posts

Posted

Buenas, Mi problema es que no me quiere dar el mensaje random e intentado varias cosas pero nada... Aquí la parte de el dxDrawText

function texto1() 
local sW, sH = guiGetScreenSize() 
text = msgs[math.random(#msgs)] 
    dxDrawText("'..text..'", (1084/1366)*sW, (79/768)*sH, 1274, 114, tocolor(63, 240, 22, 222), 1.10, "pricedown", "left", "top", false, false, true, false, false) 
end 

bandera_de_Venezuela.png

Posted
function change() 
setTimer( function() 
 addEventHandler("onClientRender", root, texto1) 
end, 100, 0) 
setTimer(function() 
removeEventHandler("onClientRender", root, texto1) 
end, 2000, 0) 
end 
addEventHandler("onClientResourceStart", root, change) 

bandera_de_Venezuela.png

Posted

Es joda eso? estas agregando el event handler cada 0.1 segundo.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Defini una variable con el texto y cada X tiempo cambias la variable.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Seria asi?, Pero es lo mismo me dice ..updateText.. y no cambia

function texto1() 
local sW, sH = guiGetScreenSize() 
    dxDrawText('..updateText..', (1084/1366)*sW, (79/768)*sH, 1274, 114, tocolor(63, 240, 22, 222), 1.10, "pricedown", "left", "top", false, false, true, false, false) 
end 
addEventHandler("onClientRender", root, texto1) 
  
updateText = function() 
    texto = msgs[math.random(#msgs)] 
end 
setTimer(updateText, 2000, 0) 

bandera_de_Venezuela.png

Posted

Eso es porque n otenes que poner updateText... ese es el nombre de la funcion, tenes que poner solamente: texto.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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