Jump to content

لوحه سيارات اف 3 استفسار


Recommended Posts

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

يا شباب الحين انا لوحه اف 3 حقه السيارات

بس اللوحه ما عجبتني فصممت لوحه جديده

كيف احط اللوحه الجديده مكان القديمه؟

اكواد اللوحه لجديده 

GUIEditor = {
    gridlist = {},
}
GUIEditor.gridlist[1] = guiCreateGridList(468, 208, 418, 252, false)
guiGridListAddColumn(GUIEditor.gridlist[1], "Vehicle", 0.3)
guiGridListAddColumn(GUIEditor.gridlist[1], "Price $", 0.3)
guiGridListAddColumn(GUIEditor.gridlist[1], "Health", 0.3)

addEventHandler("onClientRender", root,
    function()
        dxDrawRectangle(456, 124, 439, 530, tocolor(17, 16, 16, 165), false)
        dxDrawText("", 585, 135, 585, 135, tocolor(255, 255, 255, 255), 1, "default", "left", "top", false, false, true, false, false)
        dxDrawText("Vechicle System | Gta-SPR", 457, 128, 893, 150, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawRectangle(464, 164, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(609, 164, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(755, 164, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawText("Spawn Vechicle", 464, 163, 592, 198, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Destory Vehicle", 609, 164, 737, 199, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Warp (5.000$)", 755, 163, 885, 199, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawRectangle(462, 476, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(609, 476, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(755, 476, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(462, 521, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(609, 521, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(755, 521, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(462, 566, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(609, 566, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(755, 566, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(462, 611, 423, 22, tocolor(255, 255, 255, 88), true)
        dxDrawText("Sell", 463, 475, 591, 509, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Lock / Unlock", 609, 476, 737, 510, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("~Soon~", 755, 476, 883, 510, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Light / Unlight", 755, 521, 883, 555, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Spec.", 609, 521, 737, 555, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Mark / Unmark", 463, 521, 591, 555, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Repair", 462, 566, 590, 600, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Eject Passenger", 609, 566, 738, 582, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "top", false, false, true, false, false)
        dxDrawText("Flip", 758, 566, 886, 600, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Close Window", 462, 610, 885, 633, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("(5.000$)", 611, 585, 736, 600, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawLine(890, 157, 462, 157, tocolor(255, 255, 255, 255), 1, true)
    end
)

 

 

 

 

جزء من كواد اللوحه القديمه


function ClientExplosionCFunction()
 if isInColExport ()  then
  cancelEvent ()
 end
end
addEventHandler("onClientExplosion", root, ClientExplosionCFunction)

end , 1000, 1 )

local screX, screY = guiGetScreenSize()
 
Window_VS = guiCreateWindow(465, 122, 408, 483,"Vehicle System | [SPR]",false)
guiSetAlpha(Window_VS, 1)
guiWindowSetSizable(Window_VS, false)
guiSetVisible(Window_VS, false)
Grid_VS = guiCreateGridList(468, 208, 418, 252, false)
guiGridListSetSelectionMode(Grid_VS, 1)
guiGridListAddColumn(Grid_VS, "Vehicle", 0.3)
guiGridListAddColumn(Grid_VS, "Price $", 0.3)
guiGridListAddColumn(Grid_VS, "Health", 0.3)
guiLabelSetColor(Label_VeS, 255, 125, 0)
guiLabelSetColor(Label_SVS, 255, 125, 0)
guiSetFont(Label_VeS, "default-bold-small")
guiSetFont(Label_SVS, "default-bold-small")

Button_VS_sn = guiCreateButton(10, 24, 104, 33,"Spawn Vehicle",false,Window_VS)
guiSetFont(Button_VS_sn, "default-bold-small")

guiSetProperty(Button_VS_sn, "NormalTextColour", "FFD06200")
Button_VS_dy = guiCreateButton(143, 24, 107, 33,"Destroy Vehicle",false,Window_VS)
guiSetFont(Button_VS_dy, "default-bold-small")

guiSetProperty(Button_VS_dy, "NormalTextColour", "FFD06200")

Button_VS_lk = guiCreateButton(146, 338, 127, 33,"Lock/Unlock ",false,Window_VS)
        guiSetFont(Button_VS_lk, "default-bold-small")
guiSetProperty(Button_VS_lk, "NormalTextColour", "FF2553FF")
Button_VS_lt = guiCreateButton(279, 378, 118, 33,"Light/Unlight ",false,Window_VS)
        guiSetFont(Button_VS_lt, "default-bold-small")
guiSetProperty(Button_VS_lt, "NormalTextColour", "FFAE5112")

Button_VS_bp = guiCreateButton(12, 378, 130, 33,"Mark/Unmark ",false,Window_VS)
        guiSetFont(Button_VS_bp, "default-bold-small")
guiSetProperty(Button_VS_bp, "NormalTextColour", "FFAE5112")
Button_VS_Spc = guiCreateButton(146, 378, 127, 33,"Spectate ",false,Window_VS)
        guiSetFont(Button_VS_Spc, "default-bold-small")
guiSetProperty(Button_VS_Spc, "NormalTextColour", "FFAE5112")
guiSetProperty(Button_VS_Spc, "Disabled", "True")
Button_VS_Fix = guiCreateButton(10, 417, 132, 29,"Repair  ($5,000)",false,Window_VS)
--guiSetProperty(Button_VS_Fix, "Disabled", "True")
guiSetFont(Button_VS_Fix, "default-bold-small")
guiSetProperty(Button_VS_Fix, "NormalTextColour", "FFF0FF09")
Button_VS_Warp = guiCreateButton(276, 24, 121, 33,"Warp  ($5,000)",false,Window_VS)
guiSetFont(Button_VS_Warp, "default-bold-small")
guiSetProperty(Button_VS_Warp, "NormalTextColour", "FFD06200")
Button_VS_1 = guiCreateButton(10, 338, 132, 33,"Sell Vehicle",false,Window_VS)
guiSetFont(Button_VS_1,"default-bold-small")
guiSetProperty(Button_VS_1, "NormalTextColour", "FF2553FF")
Button_VS_2 = guiCreateButton(11, 450, 386, 24,"Close",false,Window_VS)
guiSetFont(Button_VS_2,"default-bold-small")
guiSetProperty(Button_VS_2, "NormalTextColour", "FF23A505")
Button_VS_3 = guiCreateButton(279, 338, 118, 33,"Soon",false,Window_VS)
guiSetFont(Button_VS_3,"default-bold-small")

guiSetProperty(Button_VS_3, "NormalTextColour", "FF2553FF")
Button_VS_4 = guiCreateButton(146, 417, 128, 29,"Eject passenger ($5,000)",false,Window_VS)

guiSetFont(Button_VS_4,"default-bold-small")

guiSetProperty(Button_VS_4,"NormalTextColour", "FFF0FF09") 
Button_VS_5 = guiCreateButton(279, 417, 118, 29,"Flip ($5,000)",false,Window_VS)

guiSetFont(Button_VS_5,"default-bold-small")
guiSetProperty(Button_VS_5,"NormalTextColour", "FFE0FB00")  

Button_VS_sl = guiCreateButton(10, 338, 132, 33,"Sell Vehicle",false,Window_VS)
guiSetFont(Button_VS_sl, "default-bold-small")
guiSetProperty(Button_VS_sl, "NormalTextColour", "FF2553FF")

Button_VS_close = guiCreateButton(11, 450, 386, 24,"Close Window",false,Window_VS)

guiSetFont(Button_VS_close, "default-bold-small")
guiSetProperty(Button_VS_close, "NormalTextColour", "FF23A505")

Window_CHK = guiCreateWindow(screX/2-155,screY/2-60,310,120,"!!! WARNING !!!",false)
guiSetVisible(Window_CHK, false)
guiSetProperty(Window_CHK, "AlwaysOnTop", "true")
guiWindowSetSizable(Window_CHK, false)
Label_CHK = guiCreateLabel(21,28,266,36,"",false,Window_CHK)
guiLabelSetColor(Label_CHK, 255, 255, 0)
guiLabelSetHorizontalAlign(Label_CHK,"center",true)
Button_CHK_Y = guiCreateButton(17,73,129,36,"Yes",false,Window_CHK)
Button_CHK_N = guiCreateButton(161,73,129,36,"No",false,Window_CHK)

 

 

ارجو المساعده 

لزياده الاستفسار 

سكايب : medo.fathy205

وشكرا...

Link to comment
15 minutes ago, sonnyblack25 said:

انا ما ابي برمجه
انا ابي اعرف وش اسوي بس ! وانا بسويها

:) سهل

اذا جيت تصمم تحط اسم اللوحة نفس اسم اللوحة القديم

واسم الازرار نفس اسم الازرار القديمه

Link to comment

.

1 hour ago, Abu-Solo said:

:) سهل

اذا جيت تصمم تحط اسم اللوحة نفس اسم اللوحة القديم

واسم الازرار نفس اسم الازرار القديمه

 بس هذيي لوحه dx
موب لوحه عاديه

Edited by sonnyblack25
Link to comment
7 minutes ago, sonnyblack25 said:

.

 بس هذيي لوحه dx
موب لوحه عاديه

استخدم

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 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 CarSystem()
        dxDrawRectangle(456, 124, 439, 530, tocolor(17, 16, 16, 165), false)
        dxDrawText("", 585, 135, 585, 135, tocolor(255, 255, 255, 255), 1, "default", "left", "top", false, false, true, false, false)
        dxDrawText("Vechicle System | Gta-SPR", 457, 128, 893, 150, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawRectangle(464, 164, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(609, 164, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(755, 164, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawText("Spawn Vechicle", 464, 163, 592, 198, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Destory Vehicle", 609, 164, 737, 199, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Warp (5.000$)", 755, 163, 885, 199, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawRectangle(462, 476, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(609, 476, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(755, 476, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(462, 521, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(609, 521, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(755, 521, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(462, 566, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(609, 566, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(755, 566, 131, 35, tocolor(255, 255, 255, 88), true)
        dxDrawRectangle(462, 611, 423, 22, tocolor(255, 255, 255, 88), true)
        dxDrawText("Sell", 463, 475, 591, 509, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Lock / Unlock", 609, 476, 737, 510, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("~Soon~", 755, 476, 883, 510, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Light / Unlight", 755, 521, 883, 555, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Spec.", 609, 521, 737, 555, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Mark / Unmark", 463, 521, 591, 555, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Repair", 462, 566, 590, 600, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Eject Passenger", 609, 566, 738, 582, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "top", false, false, true, false, false)
        dxDrawText("Flip", 758, 566, 886, 600, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Close Window", 462, 610, 885, 633, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("(5.000$)", 611, 585, 736, 600, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawLine(890, 157, 462, 157, tocolor(255, 255, 255, 255), 1, true)
    end

removeEventHandler("onClientRender",root,CarSystem)
----- المثال هذا بيقفلك اللوحة من Close Window
addEventHandler("onClientClick",root,
function ( button , state ) 
if( button == "left" and state == "up" ) then 
if ( sShowing == true ) then
if ( isMouseInPosition (462, 610, 885, 633) ) then  ---- هنا حطيت الاحداثيات حق الدي اكس او الزرار حق الدي اكس
removeEventHandler("onClientRender",root,CarSystem)
end
end
end
end
)

-----كود فتح اللوحة
sShowing = false
bindKey("f4","down", function ( )
if ( sShowing == true ) then 
removeEventHandler("onClientRender",root,CarSystem)
showCursor ( false )
else
addEventHandler("onClientRender",root,CarSystem)
showCursor ( true )
end
sShowing = not sShowing 
end
)

 

 

هذا هو الكود اللي زي 

onClientGUIClick

ولكن هذا خاص فـ الدي اكس

addEventHandler("onClientClick",root,
function ( button , state ) 
if( button == "left" and state == "up" ) then 
if ( sShowing == true ) then
if ( isMouseInPosition (220, 210, 330, 146) ) then ----- الاحداثيات هذي مكان ال dxText او dxImage 
----- Your code
end
end
end
end
)

 

Edited by Abu-Solo
Link to comment
53 minutes ago, Abu-Solo said:

استخدم


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    endend

الكود كامل يصير كذا


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    endend    function CarSystem()        dxDrawRectangle(456, 124, 439, 530, tocolor(17, 16, 16, 165), false)        dxDrawText("", 585, 135, 585, 135, tocolor(255, 255, 255, 255), 1, "default", "left", "top", false, false, true, false, false)        dxDrawText("Vechicle System | Gta-SPR", 457, 128, 893, 150, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawRectangle(464, 164, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(609, 164, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(755, 164, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawText("Spawn Vechicle", 464, 163, 592, 198, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("Destory Vehicle", 609, 164, 737, 199, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("Warp (5.000$)", 755, 163, 885, 199, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawRectangle(462, 476, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(609, 476, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(755, 476, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(462, 521, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(609, 521, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(755, 521, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(462, 566, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(609, 566, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(755, 566, 131, 35, tocolor(255, 255, 255, 88), true)        dxDrawRectangle(462, 611, 423, 22, tocolor(255, 255, 255, 88), true)        dxDrawText("Sell", 463, 475, 591, 509, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("Lock / Unlock", 609, 476, 737, 510, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("~Soon~", 755, 476, 883, 510, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("Light / Unlight", 755, 521, 883, 555, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("Spec.", 609, 521, 737, 555, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("Mark / Unmark", 463, 521, 591, 555, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("Repair", 462, 566, 590, 600, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("Eject Passenger", 609, 566, 738, 582, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "top", false, false, true, false, false)        dxDrawText("Flip", 758, 566, 886, 600, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("Close Window", 462, 610, 885, 633, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawText("(5.000$)", 611, 585, 736, 600, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center", false, false, true, false, false)        dxDrawLine(890, 157, 462, 157, tocolor(255, 255, 255, 255), 1, true)    endremoveEventHandler("onClientRender",root,CarSystem)----- المثال هذا بيقفلك اللوحة من Close WindowaddEventHandler("onClientClick",root,function ( button , state ) if( button == "left" and state == "up" ) then if ( sShowing == true ) thenif ( isMouseInPosition (462, 610, 885, 633) ) then  ---- هنا حطيت الاحداثيات حق الدي اكس او الزرار حق الدي اكسremoveEventHandler("onClientRender",root,CarSystem)endendendend)-----كود فتح اللوحةsShowing = falsebindKey("f4","down", function ( )if ( sShowing == true ) then removeEventHandler("onClientRender",root,CarSystem)showCursor ( false )elseaddEventHandler("onClientRender",root,CarSystem)showCursor ( true )endsShowing = not sShowing end)

 

 

هذا هو الكود اللي زي 

onClientGUIClick

ولكن هذا خاص فـ الدي اكس


addEventHandler("onClientClick",root,function ( button , state ) if( button == "left" and state == "up" ) then if ( sShowing == true ) thenif ( isMouseInPosition (220, 210, 330, 146) ) then ----- الاحداثيات هذي مكان ال dxText او dxImage ----- Your codeendendendend)

 

 

 

لو سمحت ممكن سكايب حقك

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