Jump to content

مشكله


Recommended Posts

سلام عليكم انا عامل لوحه دي اكس وعملت تفتح بـ ف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 
) 
Link to comment

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) 
Link to comment

  
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 by Guest
Link to comment

مانبي نعطي الموضوع اكثر من حجمه :

جربت ذا الكود وظبط معي ..

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) 

Link to comment
مانبي نعطي الموضوع اكثر من حجمه :

جربت ذا الكود وظبط معي ..

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) 

طول عمرك كفو ء

Link to comment

م شتغلش

  
    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 
) 

Link to comment
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) 
Link to comment

    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 by Guest
Link to comment
-- 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

Link to comment

شو الكود ذا

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
شو الكود ذا
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 الي انت حطيته يرجع لك ترو

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