Jump to content

Help in Function DxDrawtext


SORK>Soxxml

Recommended Posts

hello community, i was want to make dxdrawtext shown when player use armour and it will hidden after 5 sec here is the function i made but it have error any help please? sorry for bad english

Spoiler

addEvent("startArmour", true)
addEventHandler("startArmour", getRootElement(), function ()
addEventHandler("onClientRender", root,
    function()
        dxDrawText("equipting armour", 342, 259, 907, 322, tocolor(28, 135, 226, 255), 1.50, "bankgothic", "left", "top", false, false, false, false, false)
    end
)
 

thanks for reading

armor.png  

 

Edited by SORK>Soxxml
Link to comment
  • Moderators
addEvent("startArmour", true)
addEventHandler("startArmour", getRootElement(), 
function ()
	addEventHandler("onClientRender", root, renderArmour)
end)

function renderArmour ()
	dxDrawText("equipting armour", 342, 259, 907, 322, tocolor(28, 135, 226, 255), 1.50, "bankgothic", "left", "top", false, false, false, false, false)
end

You need two separated functions for that.

 

 

See also this source-code/tutorial if you want to pass arguments:

 

 

 

Edited by IIYAMA
  • Thanks 1
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...