MR.StoRm Posted May 5, 2017 Share Posted May 5, 2017 6 hours ago, Abu-Solo said: مافيه أحسن منها ولكنها حرام !, @Abu-Solo Link to comment
^iiEcoo'x_) Posted May 5, 2017 Share Posted May 5, 2017 11 minutes ago, MR.StoRm said: ولكنها حرام !, @Abu-Solo يمزح Link to comment
Abu-Solo Posted May 5, 2017 Share Posted May 5, 2017 8 hours ago, #_iMr.[E]coo said: يمزح ما أمزح Link to comment
coNolel Posted May 14, 2017 Share Posted May 14, 2017 Better way ; local sX , sY = guiGetScreenSize( ) local Time = 0 local Open showCursor(true) function AnimRec() if ( Open == true) then Time = Time + 0.02 if Time >= 1 then Time = 1 end alpha = interpolateBetween ( 0, 0, 0, 255, 0, 0, Time, "Linear" ) end if ( Open == false ) then Time = Time + 0.02 if Time >= 1 then Time = 1 end alpha = interpolateBetween ( 255, 0, 0, 0, 0, 0, Time, "Linear" ) end local Open = true dxDrawRectangle(500,500,120,60,tocolor(255,255,255,alpha)) end addEventHandler("onClientRender", root, AnimRec) addEventHandler("onClientClick", root , function(button , state) if button =="left" and state == "up" then if ( isMouseInPosition ( 500,500,120,60 )) then if Open == true then Open = false Time = 0 else Open = true Time = 0 end end end end) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end Link to comment
#BrosS Posted May 15, 2017 Author Share Posted May 15, 2017 @coNolel طريقة صحيحة شغل سطرين فقط getTickCount لكن إحنا دائما نروح للإختصار مثلا اذا تستعملها مع ومع المتغيرات هذي شف كم شغل يستخدم طريقتك تشكر getTickCount يمكن اللي مايعرف ل .. 1 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