Jump to content

dxDrawRectangle Help


iSpark

Recommended Posts

Posted

Hey how can i add a dxDrawRectangle To that Text Lua

local screen_width, screen_height = guiGetScreenSize() 
local RESPAWN_KEY = "space" 
local showRespawn = false 
local text = "#FF5500Press #808080"..RESPAWN_KEY.." #FF5500to respawn" 
local scale = 1.5 
local font = "arial" 
local textWidth = dxGetTextWidth(text:gsub("#%x%x%x%x%x%x", ""), scale, font) 
local fontHeight = dxGetFontHeight(scale, font) 
local color = tocolor(255, 128, 0, 255) 
setElementData(getLocalPlayer(), "respawn.playing", false, true) 
local running = false 
local vehicleData = {} 
local SAVE_INTER = 22500 
local saveTimer = nil 
local reset = true -- reset timer 
local lastSaved = 0 

Thank's

Posted
dxDrawRectangle 
dxDrawText 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Post what you tried.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
    local screen_width, screen_height = guiGetScreenSize() 
    local RESPAWN_KEY = "space" 
    local showRespawn = false 
    dxDrawText = "#FF5500Press #808080"..RESPAWN_KEY.." #FF5500to respawn" 
    dxDrawRectangle ( x/3.8, y/3.8, x/2.02, y/2, tocolor ( 0, 0, 0, 150 ) 
    local scale = 1.5 
    local font = "arial" 
    local textWidth = dxGetTextWidth(text:gsub("#%x%x%x%x%x%x", ""), scale, font) 
    local fontHeight = dxGetFontHeight(scale, font) 
    local color = tocolor(255, 128, 0, 255) 
    setElementData(getLocalPlayer(), "respawn.playing", false, true) 
    local running = false 
    local vehicleData = {} 
    local SAVE_INTER = 22500 
    local saveTimer = nil 
    local reset = true -- reset timer 
    local lastSaved = 0 

Posted

That's all wrong, read the basics and then start with something else.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I can, but I won't, because that wouldn't be helpful, you should learn the basics.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You just need to use the aforesaid functions and incorporate all of the variables you have predefined.

Retired

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