جرب
Marker = createMarker (216.00175,1920.79150,17.64063,"cylinder",1,0,255,255,225)
GUIEditor = {
button = {},
window = {},
staticimage = {},
label = {}
}
window1 = guiCreateWindow(465, 227, 377, 249, "مطعم", false)
guiWindowSetSizable(GUIEditor.window[1], false)
image1 = guiCreateStaticImage(10, 28, 34, 34, ":guieditor/images/7.png", false, window1)
image2 = guiCreateStaticImage(10, 72, 34, 34, ":guieditor/images/6.png", false, window1)
image3 = guiCreateStaticImage(10, 116, 34, 34, ":guieditor/images/8.png", false, window1)
image4 = guiCreateStaticImage(10, 160, 34, 34, ":guieditor/images/9.png", false, window1)
image5 = guiCreateStaticImage(10, 204, 34, 34, ":guieditor/images/3.png", false, window1)
label1 = guiCreateLabel(48, 28, 88, 32, "وجبة", false, window1)
guiSetFont(GUIEditor.label[1], "default-bold-small")
guiLabelSetColor(GUIEditor.label[1], 189, 137, 62)
label2 = guiCreateLabel(48, 74, 88, 32, "وجبة", false, window1)
guiSetFont(GUIEditor.label[2], "default-bold-small")
guiLabelSetColor(GUIEditor.label[2], 189, 137, 62)
label3 = guiCreateLabel(48, 118, 88, 32, "وجبة", false, window1)
guiSetFont(GUIEditor.label[3], "default-bold-small")
guiLabelSetColor(GUIEditor.label[3], 189, 137, 62)
label4 = guiCreateLabel(48, 162, 88, 32, "وجبة", false, window1)
guiSetFont(GUIEditor.label[4], "default-bold-small")
guiLabelSetColor(GUIEditor.label[4], 189, 137, 62)
label5 = guiCreateLabel(48, 204, 88, 32, "وجبة", false, window1)
guiSetFont(GUIEditor.label[5], "default-bold-small")
guiLabelSetColor(GUIEditor.label[5], 189, 137, 62)
label6 = guiCreateLabel(48, 46, 151, 16, "+20 Health", false, window1)
guiSetFont(GUIEditor.label[6], "default-small")
label7 = guiCreateLabel(54, 45, 36, 16, "25$", false, label6)
guiSetFont(GUIEditor.label[7], "default-small")
guiLabelSetColor(GUIEditor.label[7], 11, 254, 0)
label8 = guiCreateLabel(48, 92, 151, 16, "+40 Health", false, window1)
guiSetFont(GUIEditor.label[8], "default-small")
label9 = guiCreateLabel(48, 134, 151, 16, "+60 Health", false, window1)
guiSetFont(GUIEditor.label[9], "default-small")
label10 = guiCreateLabel(48, 178, 151, 16, "+80 Health", false, window1)
guiSetFont(GUIEditor.label[10], "default-small")
label11 = guiCreateLabel(48, 220, 151, 16, "+100 Health", false, window1)
guiSetFont(GUIEditor.label[11], "default-small")
image6 = guiCreateStaticImage(191, 28, 34, 34, ":guieditor/images/11.png", false, window1)
label12 = guiCreateLabel(230, 30, 88, 32, "وجبة", false, window1)
guiSetFont(GUIEditor.label[12], "default-bold-small")
guiLabelSetColor(GUIEditor.label[12], 189, 137, 62)
label3 = guiCreateLabel(230, 46, 151, 16, "+100 Armour", false, window1)
guiSetFont(GUIEditor.label[13], "default-small")
buy1 = guiCreateButton(322, 30, 45, 32, "شراء", false, window1)
guiSetFont(GUIEditor.button[1], "default-bold-small")
buy2 = guiCreateButton(136, 28, 45, 32, "شراء", false, window1)
guiSetFont(GUIEditor.button[2], "default-bold-small")
buy3 = guiCreateButton(136, 74, 45, 32, "شراء", false, window1)
guiSetFont(GUIEditor.button[3], "default-bold-small")
buy4 = guiCreateButton(136, 118, 45, 32, "شراء", false, window1)
guiSetFont(GUIEditor.button[4], "default-bold-small")
buy5 = guiCreateButton(136, 162, 45, 32, "شراء", false, window1)
guiSetFont(GUIEditor.button[5], "default-bold-small")
buy6 = guiCreateButton(136, 204, 45, 32, "شراء", false, window1)
guiSetFont(GUIEditor.button[6], "default-bold-small")
buy7 = guiCreateButton(224, 214, 143, 25, "أغلاق", false, window1)
buy8 = guiCreateButton(224, 184, 143, 25, "قريبا", false, window1)
GUIEditor.label[14] = guiCreateLabel(105, 47, 41, 15, "421$", false, window1)
guiLabelSetColor(GUIEditor.label[14], 11, 254, 0)
label15 = guiCreateLabel(105, 91, 41, 15, "600$", false, window1)
guiSetFont(GUIEditor.label[15], "default-small")
guiLabelSetColor(GUIEditor.label[15], 11, 254, 0)
label16 = guiCreateLabel(105, 134, 41, 15, "736$", false, window1)
guiSetFont(GUIEditor.label[16], "default-small")
guiLabelSetColor(GUIEditor.label[16], 11, 254, 0)
label17 = guiCreateLabel(105, 178, 41, 15, "900$", false, window1)
guiSetFont(GUIEditor.label[17], "default-small")
guiLabelSetColor(GUIEditor.label[17], 11, 254, 0)
label18 = guiCreateLabel(105, 221, 41, 15, "952$", false, window1)
guiSetFont(GUIEditor.label[18], "default-small")
guiLabelSetColor(GUIEditor.label[18], 11, 254, 0)
label19 = guiCreateLabel(291, 47, 41, 15, "1000$", false, window1)
guiSetFont(GUIEditor.label[19], "default-small")
guiLabelSetColor(GUIEditor.label[19], 11, 254, 0)
guiSetVisible(window1,false)
addEventHandler("onClientMarkerHit", root,
function(hitElement)
if ( source == Marker ) and ( hitElement == localPlayer ) then
showCursor(true)
guiSetVisible(window1,true)
end
end
)
addEventHandler ("onClientGUIClick", root,
function()
if ( source == buy1 ) then
setElementHealth(localPlayer,20)
elseif ( source == buy2 ) then
setElementHealth(localPlayer,40)
elseif ( source == buy3 ) then
setElementHealth(localPlayer,60)
elseif ( source == buy4 ) then
setElementHealth(localPlayer,80)
elseif ( source == buy5 ) then
setElementHealth(localPlayer,100)
elseif ( source == buy7 ) then
showCursor(false)
guiSetVisible(window1,false)
end
end
)