Mwrr Posted July 15, 2014 Share Posted July 15, 2014 Hey guys, i'm newb on this shit so i will fast. How to make the "dxDrawText" to be started by a command? I mean to draw a text by the command . . .Thanx for the time Link to comment
ADCX Posted July 15, 2014 Share Posted July 15, 2014 TextDrawn = false function enableDraw(command,argument) if (command == "enableDraw") then if (argument) then if (argument == "true") then TextDrawn = true elseif (argument == "false") then TextDrawn = false else outputChatBox("Invalid argument specified!") end else TextDrawn = (not TextDrawn) end end end addCommandHandler("enableDraw",enableDraw) function onClientRender() if (TextDrawn) then -- Put your 'dxDrawText' command here end end addEventHandler("onClientRender",getRootElement(),onClientRender) Note that this is client only. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now