جرب هذا
function onGuiClick1(button, state, absoluteX, absoluteY)
if (source == GUIEditor_Button[1]) then
guiSetProperty( GUIEditor_Button[2], "Disabled", "False" )
local x1, y2, z3 = getElementPosition ( localPlayer )
local x1 = guiGetText( Edit1 )
local y2 = guiGetText( Edit2 )
local z3 = guiGetText( Edit3 )
createMarker( x1, y2, z3, "checkpoint", 2, 255, 255, 0, 0)
elseif (source == GUIEditor_Button[2]) then
local x, y, z = getElementPosition ( localPlayer )
local x = guiGetText( Edit4 )
local y = guiGetText( Edit5 )
local z = guiGetText( Edit6 )--اسم الفراغ Edit6
local Marker = createMarker ( x, y, z, "cylinder", 2, 255, 255, 0, 150 )
end
end
addEventHandler("onClientGUIClick", root, onGuiClick1)
addEventHandler('onClientMarkerHit', Marker,
function ( hitPlayer )
if ( hitPlayer == localPlayer ) then
setElementPosition(localPlayer,x1,y2,z3)
end
end )
او
function onGuiClick2(button, state, absoluteX, absoluteY)
if (source == GUIEditor_Button[1]) then
guiSetProperty( GUIEditor_Button[2], "Disabled", "False" )
local x1, y2, z3 = getElementPosition ( localPlayer )
local x1 = guiGetText( Edit1 )
local y2 = guiGetText( Edit2 )
local z3 = guiGetText( Edit3 )
local Marker1 = createMarker( x1, y2, z3, "checkpoint", 2, 255, 255, 0, 0)
elseif (source == GUIEditor_Button[2]) then
local x, y, z = getElementPosition ( localPlayer )
local x = guiGetText( Edit4 )
local y = guiGetText( Edit5 )
local z = guiGetText( Edit6 )--اسم الفراغ Edit6
local Marker1 = createMarker ( x, y, z, "cylinder", 2, 255, 255, 0, 150 )
end
end
addEventHandler("onClientGUIClick", root, onGuiClick2)
addEventHandler('onClientMarkerHit', Marker1,
function ( hitPlayer )
if ( hitPlayer == localPlayer ) then
setElementPosition(localPlayer,x1,y2,z3)
end
end )
والزر الثاني خليه
ماينضغط علشان يكون بترتيب الماركر والنقل
ضيف تحت الزر الثاني
guiSetProperty( GUIEditor_Button[2], "Disabled", "True" )
علشان مايقدر العضو يضغطه الا لما يسوي الماركر ألأول