Jump to content

please help guys :'(


iiv03

Recommended Posts

i need my position how ? px and py and the guys say u need x, y, z how ?

script : 

 

local a, d, c, r, g, b = 210, 140, 30, 210, 140, 30
progress = progress + 0.05
	if open == true then
		x, y, z = interpolateBetween(0, 0, 0, px*240, px*545, 200, progress, "OutBack")
	end
	if open == false then
		x, y, z = interpolateBetween(px*240, px*545, 200, 0, 0, 0, progress, "InBack")
		if progress >= 1 then
			removeEventHandler("onClientRender", getRootElement(), drawWindow)
		end
	end
	if isMouseInPosition(px*431, py*309, px*189, py*47) then
		a, d, c = 240, 170, 60
	elseif isMouseInPosition(px*313, py*422, px*214, py*44) then
		r, g, b = 240, 170, 60
	end

 

Link to comment
function isMouseInPosition ( x, y, width, height )
    if ( not isCursorShowing ( ) ) then
        return false
    end
    local sWidth,sHeight = guiGetScreenSize( )
    local cx, cy = getCursorPosition ( )
    local cx, cy = ( cx* sWidth ), ( cy* sHeight )
    if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
        return true
    else
        return false
    end
end
----------------------------
then use 
addEventHandler("onClientClick",root,
function(bttn,state)
    if bttn == "left" and state == "down" then
        if GonnaFade then return false end
        local resolutionX = 1366
        local resolutionY = 768
        local sWidth,sHeight = guiGetScreenSize( )
        if isMouseInPosition((265/resolutionX )*sWidth,(466/resolutionY )*sHeight, (462/resolutionX )*sWidth, (505/resolutionY )*sHeight) then

 

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