Jump to content

[ayuda] Texto


Recommended Posts

Pero Como seria Aparte de haci? o como seria perdonen los errores es que nose

local screenWidth, screenHeight = guiGetScreenSize ( ) -- Get the screen resolution (width and height) 
  
function createText ( ) 
    local playerX, playerY, playerZ = getElementPosition ( localPlayer )       -- Get our player's coordinates. 
  
    dxDrawText ( playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
    -- Draw zone name text. 
    dxDrawText ( playerZoneName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" )  
end 
  
setTimer ( dxDraWText, 1000, 1, "Hello, World!" ) 
  
addCommandHandler ( "drawtext", dxdrawtext ) 
  
  
addEventHandler ( "dxDrawText", setTimer, createtext ) 

Link to comment
  • MTA Team

Estas mezlcando conceptos--

O haces lo que queres por gui o por dxDrawTex..

Si es por gui, crea todo por el guieditor ya q te sera mas facil si no sabes mucho de gui. Luego agregale triggers y las funciones

Link to comment
  • MTA Team
Pero Como seria Aparte de haci? o como seria perdonen los errores es que nose
local screenWidth, screenHeight = guiGetScreenSize ( ) -- Get the screen resolution (width and height) 
  
function createText ( ) 
    local playerX, playerY, playerZ = getElementPosition ( localPlayer )       -- Get our player's coordinates. 
  
    dxDrawText ( playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
    -- Draw zone name text. 
    dxDrawText ( playerZoneName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" )  
end 
  
setTimer ( dxDraWText, 1000, 1, "Hello, World!" ) 
  
addCommandHandler ( "drawtext", dxdrawtext ) 
  
  
addEventHandler ( "dxDrawText", setTimer, createtext ) 

Eso no sirve de nada..Hace una cosa..Crea una gui que te guste por guieditor, sube el codigo aca y te ayudamos..Vale?!

Link to comment

Creo que seria así: (No estoy Seguro)

function dependeText() 
    dxDrawText( "Hola!", sx/3.5, sy/3.5, 1020, 424, tocolor(255, 0, 0, 255), 1, "bankgothic", "left", "center", false, false, true, false, false) 
end 
  
function encenderTexto() 
    addEventHandler("onClientRender", root, dependeText) 
end 
  
function apagarTexto() 
    removeEventHandler("onClientRender", root, dependeText) 
end 
  
function decir() 
    setTimer(encenderTexto, 6000, 1) 
    setTimer(apagarTexto, 12000, 1) 
addCommandHandler ( "drawtext", decir ) 
  

Link to comment

como haria para que con un comando /foro salga a los players aunque Esto esta mal quedaria mal yo queria un DxDrawText porque esto quedaria mal

GUIEditor = { 
    tab = {}, 
    edit = {}, 
    window = {}, 
    scrollbar = {}, 
    memo = {}, 
    tabpanel = {}, 
} 
GUIEditor.window[1] = guiCreateWindow(207, 199, 384, 48, "www.ZombieVille.com", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
  
  
GUIEditor.memo[1] = guiCreateMemo(218, 252, 366, 90, "", false) 
  
  
GUIEditor.tabpanel[1] = guiCreateTabPanel(211, 217, 380, 133, false) 
  
GUIEditor.tab[1] = guiCreateTab("Pagina", GUIEditor.tabpanel[1]) 
  
GUIEditor.memo[2] = guiCreateMemo(53, 250, 126, 20, "", false, GUIEditor.tab[1]) 
GUIEditor.edit[1] = guiCreateEdit(49, 19, 276, 66, "", false, GUIEditor.tab[1]) 
  
  
GUIEditor.scrollbar[2] = guiCreateScrollBar(525, 263, 15, 67, false, false) 

Link to comment

local screenWidth, screenHeight = guiGetScreenSize ( ) 
local texts = { "Hola Bienvenido", "Welcome to zombieVille" } 
  
function createText ( ) 
     local tex =  dxDrawText ( texts [ math.random ( #texts ) ], screenWidth-40, screenHeight -50, screenWidth, screenHeight, tocolor ( 200, 0, 0, 255 ), 1, "pricedown" ) 
    setTimer(destroyElement, 5000, 1, tex) 
end 
addCommandHandler("crear", createText) 
Link to comment

No lo cambie

local screenWidth, screenHeight = guiGetScreenSize () 
local texts = { "Hola Bienvenido", "Welcome to zombieVille" } 
  
function createText ( ) 
     local tex =  dxDrawText ( texts [ math.random ( #texts ) ], screenWidth-40, screenHeight -50, screenWidth, screenHeight, tocolor ( 200, 0, 0, 255 ), 1, "pricedown" ) 
    setTimer(destroyElement, 5000, 1, tex) 
end 
addCommandHandler("crear", createText) 

Link to comment
  • Recently Browsing   0 members

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