Jump to content

[HELP] dxDrawRectangle problem.


^_^ LOL ^_^

Recommended Posts

Hello, im creating my first script for mta:sa server.

I've got an problem with dxDrawRectangle

Script:

-- //Script 
local x,y = guiGetScreenSize () 
  
addEventHandler ("onClientHUDRender", root, function () 
  
    dxDrawRectangle (x-200,0,200,200,tocoler(0,0,0,125)) 
  
end) 

Meta:

<meta> 
    <script src="c-hud.lua" type="client" /> 
</meta> 

Server are accept the script, but in game dont show anything.

Link to comment
Where Size of X and Y

I Advice you to Use Gui Editor To make Dx Rectangle

And I advice you not to post on the Scripting section in hopes of helping someone since you can't even recognize a small typographical mistake in a line of code. Congratulations.

@Kaasis: You have tocoler spelled wrong, it's supposed to be tocolor.

Client-side

local x, y = guiGetScreenSize() 
  
addEventHandler("onClientHUDRender", root, 
    function() 
        dxDrawRectangle(x-200, 0, 200, 200, tocolor(0, 0, 0, 125)) 
    end 
) 

Edited by Guest
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...