Jump to content

[SOLVED] How to setTimer on dxDrawText


Recommended Posts


I want to setTimers on dxDrawText because I want to make a conversation script (animation with just some text shown).

I tried to do it but I can only see the text but it doesnt get removed...

local x, y = guiGetScreenSize() 
function togglePanel() 
dxDrawRectangle(x*0, y*0, x*1, y*0.17, tocolor(0, 0, 0, 255), true) 
dxDrawRectangle(x*0, y*0.83, x*1, y*0.17, tocolor(0, 0, 0, 255), false) 
setTimer(tekst1, 1500, 1) 
function drawPanel() 
addEventHandler("onClientPreRender", root, togglePanel) 
addEvent("drawPanel", true) 
addEventHandler("drawPanel", getRootElement(), drawPanel) 
function hidepanel() 
    removeEventHandler("onClientPreRender", root, togglePanel) 
addEvent("hidepanel", true) 
addEventHandler("hidepanel", getRootElement(), hidepanel) 
function tekst1() 
    dxDrawText("Test", x*0.67, y*0.8, x*0.38, y*0.05, tocolor(255, 255, 255, 255), 2, "default", "center", "center", false, false, true, false, false) 

As you can see in this script, there is a setTimer function but it only shows the text after that time but I want it also to remove it with timer...

Edited by Guest
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...