Jump to content

طلب مساعدهـ بـ كود


Recommended Posts

ألسلآم عليكم ورحمه الله وبركاته

 

أبي مساعدهـ وهو ألي اني ابي المكان الابيض يكتب مثل امر 

( GuiEditor.edit )

 

هذ ألكود حق الوحه

 

 

GUIEditor = {
    edit = {},
}
GUIEditor.edit[1] = guiCreateEdit(525, 460, 464, 31, "", false)
guiSetProperty(GUIEditor.edit[1], "NormalTextColour", "9FFF0000")


addEventHandler("onClientRender", root,
    function()
        dxDrawImage(0, 0, 1365, 767,  "2.jpg" , angle ,0 ,-128 )
        dxDrawImage(613, 52, 289, 393, "6.png" ,angle, 0, -128)
        dxDrawRectangle(519, 455, 476, 41, tocolor(0, 0, 0, 170), true)
        dxDrawRectangle(519, 512, 476, 41, tocolor(0, 0, 0, 170), true)
        dxDrawRectangle(525, 460, 464, 31, tocolor(255, 255, 255, 255), true)
        dxDrawRectangle(525, 516, 464, 31, tocolor(255, 255, 255, 255), true)
        dxDrawRectangle(538, 583, 192, 50, tocolor(0, 0, 0, 170), true)
        dxDrawRectangle(783, 583, 192, 50, tocolor(0, 0, 0, 170), true)
        dxDrawRectangle(542, 588, 182, 39, tocolor(86, 86, 86, 254), true)
        dxDrawRectangle(788, 588, 182, 39, tocolor(86, 86, 86, 254), true)
        dxDrawText("Login", 538, 587, 715, 623, tocolor(169, 0, 0, 254), 2, "sans", "center", "bottom", false, false, true, false, false)
        dxDrawText("Register", 783, 587, 960, 623, tocolor(169, 0, 0, 254), 2, "sans", "center", "bottom", false, false, true, false, false)
        dxDrawRectangle(542, 554, 20, 19, tocolor(255, 255, 255, 255), true)
        dxDrawRectangle(787, 554, 20, 19, tocolor(255, 255, 255, 255), true)
    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 x = ( x/resolutionX )*sx
	local y = ( y/resolutionY )*sy
	local width = ( width/resolutionX )*sx
	local height = ( height/resolutionY )*sy
    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

بعدين تجيب احداثيات المكان الي تبي تخليه زر

و تعمل كذا

dxDrawImage(0, 0, 1365, 767,  "2.jpg" , angle ,0 ,-128 )
dxDrawImage(613, 52, 289, 393, "6.png" ,angle, 0, -128)
dxDrawRectangle(519, 455, 476, 41, tocolor(0, 0, 0, 170), true)
dxDrawRectangle(519, 512, 476, 41, tocolor(0, 0, 0, 170), true)
dxDrawRectangle(525, 460, 464, 31, tocolor(255, 255, 255, 255), true)
dxDrawRectangle(525, 516, 464, 31, tocolor(255, 255, 255, 255), true)
dxDrawRectangle(538, 583, 192, 50, tocolor(0, 0, 0, 170), true)
dxDrawRectangle(783, 583, 192, 50, tocolor(0, 0, 0, 170), true)
dxDrawRectangle(542, 588, 182, 39, tocolor(86, 86, 86, 254), true)
dxDrawRectangle(788, 588, 182, 39, tocolor(86, 86, 86, 254), true)
dxDrawText("Login", 538, 587, 715, 623, tocolor(169, 0, 0, 254), 2, "sans", "center", "bottom", false, false, true, false, false)
dxDrawText("Register", 783, 587, 960, 623, tocolor(169, 0, 0, 254), 2, "sans", "center", "bottom", false, false, true, false, false)
dxDrawRectangle(542, 554, 20, 19, tocolor(255, 255, 255, 255), true)
dxDrawRectangle(787, 554, 20, 19, tocolor(255, 255, 255, 255), true)

addEventHandler("onClientClick", root,
  function()
    if isMouseInPosition(542, 554, 20, 19) then -- هنا احداثيات الزر 
      -- بعطيك مثل من عندي بس 
      triggerServerEvent("Test", localPlayer)
      end
    end
  )

الحين لو الاعب ضغط على احداثيات 542, 554, 20, 19 بيعمل تريقت للسيرفر بايفنت اسمه تيست

بس ملاحظة لو انت بتخليه كذا طول م الاعب بالسيرفر و بيضغط على ذي الاحداثيات بيعمل الامر الي انت حطيته

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