Adham Posted June 17, 2016 Posted June 17, 2016 سلام عليكم انا عامل لوحه دي اكس وعملت تفتح بـ ف1 م نفعت bindKey("F1","down",function () if ( removeEventHandler | "onClientRender",roo,adham ) then removeEventHandler ("onClientRender",roo,adham ) then showCursor(false) else addEventHandler("onClientRender",roo,adham ) then showCursor(true) end end )
' A F . Posted June 17, 2016 Posted June 17, 2016 aVisible = false bindKey("f1","down", function ( ) if ( aVisible == true ) then removeEventHandler("onClientRender",root,adham) showCursor ( false ) else addEventHandler("onClientRender",root,adham) showCursor ( true ) end aVisible = not aVisible end)
Me[Z]oO Posted June 17, 2016 Posted June 17, 2016 (edited) bindKey("F1","down",function () if removeEventHandler( "onClientRender",root,adham) then removeEventHandler ("onClientRender",root,adham) showCursor(false) else addEventHandler("onClientRender",root,adham) showCursor(true) end end ) Edited June 17, 2016 by Guest
Mr.CoR Posted June 17, 2016 Posted June 17, 2016 الكود الي حاطه ميزو هو نفسه كود لعبه الي حاطه بأول الموضوع شكله انتبه لل roo root وعدلها ل ونسي يقرا ويتمعن بالكود
' A F . Posted June 17, 2016 Posted June 17, 2016 مانبي نعطي الموضوع اكثر من حجمه : جربت ذا الكود وظبط معي .. function adham ( ) dxDrawText("MultiTheftAuto", 241, 235, 609, 268, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "center", false, false, false, false, false) end aVisible = false bindKey("f1","down", function ( ) if ( aVisible == true ) then removeEventHandler("onClientRender",root,adham) showCursor ( false ) else addEventHandler("onClientRender",root,adham) showCursor ( true ) end aVisible = not aVisible end)
Mr.CoR Posted June 17, 2016 Posted June 17, 2016 مانبي نعطي الموضوع اكثر من حجمه : جربت ذا الكود وظبط معي .. function adham ( ) dxDrawText("MultiTheftAuto", 241, 235, 609, 268, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "center", false, false, false, false, false) end aVisible = false bindKey("f1","down", function ( ) if ( aVisible == true ) then removeEventHandler("onClientRender",root,adham) showCursor ( false ) else addEventHandler("onClientRender",root,adham) showCursor ( true ) end aVisible = not aVisible end) طول عمرك كفو ء
Adham Posted June 17, 2016 Author Posted June 17, 2016 م شتغلش function adham() dxDrawRectangle(150, 197, 506, 228, tocolor(255, 255, 255, 150), false) dxDrawRectangle(110, 198, 10, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(130, 197, 549, 32, tocolor(44, 1, 39, 255), false) dxDrawImage(482, 248, 131, 126, ":guieditor/images/flip.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(203, 261, 90, 93, ":guieditor/images/Repair.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(337, 254, 108, 102, ":guieditor/images/Nitro.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(482, 248, 131, 126, ":guieditor/images/flip.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(337, 254, 108, 102, ":guieditor/images/Nitro.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(337, 254, 108, 102, ":guieditor/images/Nitro.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(174, 364, 138, 30, tocolor(76, 1, 67, 205), false) dxDrawRectangle(327, 364, 138, 30, tocolor(76, 1, 67, 205), false) dxDrawRectangle(482, 364, 138, 30, tocolor(76, 1, 67, 205), false) dxDrawText("Alex Shop", 316, 197, 577, 225, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Buy ($250)", 369, 370, 482, 388, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Buy ($1500)", 517, 370, 630, 388, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Buy ($900)", 209, 370, 322, 388, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawImage(482, 248, 131, 126, ":guieditor/images/flip.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(337, 254, 108, 102, ":guieditor/images/Nitro.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) bindKey("F1","down",function () if removeEventHandler( "onClientRender",root,adham) then removeEventHandler ("onClientRender",root,adham) then showCursor(false) else addEventHandler("onClientRender",root,adham) then showCursor(true) end end )
' A F . Posted June 17, 2016 Posted June 17, 2016 aVisible = false bindKey("f1","down", function ( ) if ( aVisible == true ) then removeEventHandler("onClientRender",root,adham) showCursor ( false ) else addEventHandler("onClientRender",root,adham) showCursor ( true ) end aVisible = not aVisible end)
' A F . Posted June 17, 2016 Posted June 17, 2016 (edited) function adham() dxDrawRectangle(150, 197, 506, 228, tocolor(255, 255, 255, 150), false) dxDrawRectangle(110, 198, 10, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(130, 197, 549, 32, tocolor(44, 1, 39, 255), false) dxDrawImage(482, 248, 131, 126, ":guieditor/images/flip.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(203, 261, 90, 93, ":guieditor/images/Repair.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(337, 254, 108, 102, ":guieditor/images/Nitro.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(482, 248, 131, 126, ":guieditor/images/flip.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(337, 254, 108, 102, ":guieditor/images/Nitro.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(337, 254, 108, 102, ":guieditor/images/Nitro.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(174, 364, 138, 30, tocolor(76, 1, 67, 205), false) dxDrawRectangle(327, 364, 138, 30, tocolor(76, 1, 67, 205), false) dxDrawRectangle(482, 364, 138, 30, tocolor(76, 1, 67, 205), false) dxDrawText("Alex Shop", 316, 197, 577, 225, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Buy ($250)", 369, 370, 482, 388, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Buy ($1500)", 517, 370, 630, 388, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Buy ($900)", 209, 370, 322, 388, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawImage(482, 248, 131, 126, ":guieditor/images/flip.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(337, 254, 108, 102, ":guieditor/images/Nitro.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end aVisible = false bindKey("f1","down", function ( ) if ( aVisible == true ) then removeEventHandler("onClientRender",root,adham) showCursor ( false ) else addEventHandler("onClientRender",root,adham) showCursor ( true ) end aVisible = not aVisible end) Edited June 17, 2016 by Guest
Adham Posted June 17, 2016 Author Posted June 17, 2016 تمام انا عاوز اعمل اذا ضعط علي زر في الدي اكس ومعاه 1500 فلوس يجي تصليح كيف احدد الزر في الدي اكس
' A F . Posted June 17, 2016 Posted June 17, 2016 onClientClick isMouseInPosition triggerServerEvent getPlayerMoney getPedOccupiedVehicle takePlayerMoney fixVehicle
' A F . Posted June 17, 2016 Posted June 17, 2016 -- Client 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 addEventHandler("onClientClick",root, function ( Button ,State ) if ( aVisible and Button == "left" and State == "up" ) then if ( isMouseInPosition ( x , y , w , h ) ) then triggerServerEvent("onFix",localPlayer) end end end ) -- Server addEvent("onFix",true) addEventHandler("onFix",root, function ( ) if ( getPlayerMoney ( client ) >= 100 ) then if ( getPedOccupiedVehicle ( client ) ) then fixVehicle ( getPedOccupiedVehicle ( client ) ) takePlayerMoney ( client , 100 ) end end end ) بدل الـ x,y,w,h = بـ احداثيات الـ Rectangle
Adham Posted June 17, 2016 Author Posted June 17, 2016 شو الكود ذا 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
Me[Z]oO Posted June 17, 2016 Posted June 17, 2016 ^ سطر 4 و 7 ليه حاط then ؟ هذا لاني نسخت كود لعبة ذا وعدلت عليه م انتبهت
' A F . Posted June 17, 2016 Posted June 17, 2016 شو الكود ذا 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 الكود ذا يتحقق لو كان الماوس على الـ Position الي انت حطيته يرجع لك ترو
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