Jump to content

Draw a text by a command


Mwrr

Recommended Posts

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

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