Jump to content

FAHD+18

Members
  • Posts

    143
  • Joined

  • Last visited

Everything posted by FAHD+18

  1. السلام عليكم ورحمه الله وبركاتة انا عندي مشكلة بسطية أولا انا مصمم لوحة شوب للريس اللوحة دي اكس المشكلة هي عندما اضغط علي buyrepair لا يحدث شيء ! مطلوب تعديل في الكود أي مبرمج لا يبخل لاهنتنم الكودات : 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 function dx_test() dxDrawRectangle(138, 178, 554, 33, tocolor(111, 6, 77, 255), false) dxDrawRectangle(153, 211, 520, 160, tocolor(0, 0, 0, 160), false) if ( isMouseInPosition (167, 333, 148, 28) ) then dxDrawRectangle(167, 333, 148, 28, tocolor(107, 5, 74, 255), false) else dxDrawRectangle(167, 333, 148, 28, tocolor(107, 5, 74, 180), false) end if ( isMouseInPosition (515, 333, 148, 28) ) then dxDrawRectangle(515, 333, 148, 28, tocolor(107, 5, 74, 255), false) else dxDrawRectangle(515, 333, 148, 28, tocolor(107, 5, 74, 180), false) end if ( isMouseInPosition (340, 333, 148, 28) ) then dxDrawRectangle(340, 333, 148, 28, tocolor(107, 5, 74, 255), false) else dxDrawRectangle(340, 333, 148, 28, tocolor(107, 5, 74, 180), false) end dxDrawText("Race Shop", 323, 178, 581, 201, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Buy ($900)", 210, 338, 334, 357, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Buy ($250)", 381, 338, 505, 357, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Buy ($1500)", 555, 338, 679, 357, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawImage(189, 241, 102, 81, "img/Repair.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(520, 239, 143, 98, "img/flip.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(359, 230, 104, 98, "img/Nitro.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(520, 239, 143, 98, "img/flip.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end sShowing = false bindKey("f1","down", function ( ) if ( sShowing == true ) then removeEventHandler("onClientRender",root,dx_test) showCursor ( false ) else addEventHandler("onClientRender",root,dx_test) showCursor ( true ) end sShowing = not sShowing end ) addEventHandler("onClientClick",root, function ( button , state ) if( button == "left" and state == "up" ) then if ( sShowing == true ) then if ( isMouseInPosition (167, 333, 148, 28) ) then triggerServerEvent ( "Repair", localPlayer ) end end end end ) _______________________ #Meta _______________________ server addEvent( "Repair", true ) addEventHandler( "Repair", root, function () if ( getPlayerMoney (source) >= 5000 ) then takePlayerMoney(source, 5000) local Veh = getPedOccupiedVehicle ( source ) if Veh then fixVehicle(Veh) end end )
  2. مطلوب مساعده في كود اولا انا اعرف اسوي لوحه تسجيل دخول بس مش دي اكس فسويت لوحه دي اكس تسجيل دخول نجحك لاكن هناك مشكله هي ان عندما ادخل السيرفر واسجل اللوحه لا تختفي ابي كود وانا مش عارف اسم اللوحه ايه مثل اللوحه العاديه كنت بكتبها اسم اللوحه لاكن مش عارف اكتب ايه Window اللي هي
  3. هلا اخي انا اتعلم dx انا اعرف اسوي لوحه تسجيل دخول بدون dx ابي اتعلم ال dx ومفيش ولا شرح علي اليوتيو ب
  4. ممكن تعملهالي جاهزة !؟
  5. السلام عليكم انا سويت لوحة تسجيل دخول دي اكس المشكلة هي ان عندما اسجل الدخول اللوحة لا تختفي اخوكم جديد بالبرمجة اتمني المساعدة كود إخفاء لوحة دي اكس GUIEditor = { checkbox = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() editname = guiCreateButton(566, 239, 110, 26, "Login", false) guiSetAlpha(editname, 0.00) editpw = guiCreateButton(567, 282, 110, 26, "Register", false) guiSetAlpha(editpw, 0.00) editplaygust = guiCreateButton(567, 326, 110, 26, "playgust", false) guiSetAlpha(editplaygust, 0.00) GUIEditor.checkbox[1] = guiCreateCheckBox(407, 265, 146, 17, "Remember Username", false, false) guiSetFont(GUIEditor.checkbox[1], "default-bold-small") GUIEditor.checkbox[2] = guiCreateCheckBox(407, 311, 146, 20, "Remember Password", false, false) guiSetFont(GUIEditor.checkbox[2], "default-bold-small") GUIEditor.edit[1] = guiCreateEdit(201, 260, 200, 27, "", false) GUIEditor.edit[2] = guiCreateEdit(201, 307, 200, 27, "", false) end ) addEventHandler("onClientRender", root, function () dxDrawRectangle(99, 184, 627, 42, tocolor(81, 2, 63, 255), false) dxDrawRectangle(122, 226, 579, 178, tocolor(5, 0, 4, 200), false) dxDrawRectangle(559, 226, 127, 151, tocolor(2, 1, 1, 253), false) dxDrawLine(567 - 1, 239 - 1, 567 - 1, 265, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(676, 239 - 1, 567 - 1, 239 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(567 - 1, 265, 676, 265, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(676, 265, 676, 239 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(567, 239, 109, 26, tocolor(81, 2, 63, 224), false) dxDrawLine(567 - 1, 282 - 1, 567 - 1, 308, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(676, 282 - 1, 567 - 1, 282 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(567 - 1, 308, 676, 308, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(676, 308, 676, 282 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(567, 282, 109, 26, tocolor(81, 2, 63, 224), false) dxDrawLine(567 - 1, 326 - 1, 567 - 1, 352, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(676, 326 - 1, 567 - 1, 326 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(567 - 1, 352, 676, 352, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(676, 352, 676, 326 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(567, 326, 109, 26, tocolor(81, 2, 63, 224), false) dxDrawText("Username:", 132, 266, 299, 297, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Password:", 132, 313, 299, 344, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Login", 604, 243, 691, 259, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Register", 599, 287, 686, 303, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Playgust", 599, 330, 686, 346, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Alex Login panel", 264, 190, 583, 216, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) end ) triggerServerEvent("onGetSave",localPlayer) showCursor ( true ) addEvent("onPutSave",true) addEventHandler("onPutSave",root, function (puser,ppass) guiSetText(user,puser) guiSetText(pass,ppass) end ) addEventHandler("onClientGUIClick",root, function () local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) if ( source == editname ) then if user ~= "" and pass ~= "" then if guiCheckBoxGetSelected(remember) then triggerServerEvent("onLoginWith",localPlayer,user,pass) else triggerServerEvent("onLogin",localPlayer,user,pass) end else outputChatBox("* You Must Write Username Or Password",255,0,0) end elseif ( source == editpw ) then if user ~= "" and pass ~= "" then triggerServerEvent("onReg",localPlayer,user,pass) else outputChatBox("* You Must Write Username Or Password",255,0,0) end end end )
×
×
  • Create New...