Jump to content

remove dx message after 5 seconds


Stevenn

Recommended Posts

Posted
function dxText ( ) 
    dxDrawText("my message",511.0,354.0,995.0,637.0,tocolor(255,255,255,255),1.5,"pricedown","left","top",false,false,false) 
end 
  
   
addEventHandler('onClientResourceRoot', root, 
    function(reason) 
        addEventHandler ( "onClientRender", root, dxText ) 
        setTimer ( 
            function ( ) 
                removeEventHandler ( "onClientRender", root, dxText ) 
            end 
            ,5000,1 
        ) 
    end 
) 

no debugs, but no message either.

Posted

try this:

function dxText ( ) 
    dxDrawText("my message",511.0,354.0,995.0,637.0,tocolor(255,255,255,255),1.5,"pricedown","left","top",false,false,false) 
end 
  
  
addEventHandler('onClientResourceStart', resourceRoot,function() 
    addEventHandler ( "onClientRender", root, dxText ) 
    setTimer(removeEventHandler,5000,1,"onClientRender",root,dxText) 
end) 

@Solid, come on, he might not have overstand what it really means...

He attempted the script and you should've helped...

Posted

lol, it's 4:50 am and i'm quite tired, i obviously meant onClientResourceStart and it works now, thanks for the sarcastic comment though solid.

@Jay thanks.

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