السلام عليكم والرححمة
شباب عندي مشكله اذا وقف الاعب ع الماركر تطلع النافذه حق كل اللي في السيرفر وش الحل ؟
وشككرا
كلنت
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Memo = {}
GUIEditor_Progress = {}
GUIEditor_Label = {}
GUIEditor_Window[1] = guiCreateWindow(208,112,375,381,"",false)
guiSetVisible ( GUIEditor_Window[1] , false )
GUIEditor_Memo[1] = guiCreateMemo(11,27,346,62,"prees take job to start the job .",false,GUIEditor_Window[1])
GUIEditor_Button[1] = guiCreateButton(10,327,351,45,"Close",false,GUIEditor_Window[1])
GUIEditor_Button[2] = guiCreateButton(10,275,351,45,"Take Job",false,GUIEditor_Window[1])
GUIEditor_Progress[1] = guiCreateProgressBar(213,545,398,53,false)
guiSetVisible ( GUIEditor_Progress[1] , false )
GUIEditor_Label[1] = guiCreateLabel(263,200,331,221,"you're got 2000$",false)
guiSetVisible ( GUIEditor_Label[1] , false )
guiLabelSetColor(GUIEditor_Label[1],255,255,255)
guiLabelSetVerticalAlign(GUIEditor_Label[1],"top")
guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false)
guiSetFont(GUIEditor_Label[1],"sa-gothic")
GUIEditor_Label[2] = guiCreateLabel(323,235,277,65,"wait",false)
guiSetVisible ( GUIEditor_Label[2] , false )
guiLabelSetColor(GUIEditor_Label[2],255,255,255)
guiLabelSetVerticalAlign(GUIEditor_Label[2],"top")
guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false)
guiSetFont(GUIEditor_Label[2],"sa-gothic")
marker1 = createMarker ( -1017.2951660156, -682.72064208984, 31.0078125, "cylinder", 1.5, 255, 255, 0, 170 )
boTrky = createBlipAttachedTo ( marker1, 56 )
addEventHandler ( "onClientGUIClick", root,
function ()
if ( source == GUIEditor_Button[2] ) then
triggerServerEvent ( "onHit", localPlayer )
triggerServerEvent ( "BB", localPlayer )
marker2 = createMarker ( -1031.7609863281, -648.3388671875, 31.0078125, "cylinder", 5, 255, 255, 0, 170 )
guiSetVisible ( GUIEditor_Window[1] , false )
showCursor ( false )
end
end )
------------------
addEventHandler ( "onClientGUIClick", root,
function ()
if ( source == GUIEditor_Button[1] ) then
guiSetVisible ( GUIEditor_Window[1] , false )
showCursor ( false )
end
end )
------------------
addEventHandler ( "onClientMarkerHit", getRootElement(),
function ()
if ( source == marker1 ) then
guiSetVisible ( GUIEditor_Window[1] , true )
showCursor ( true )
end
end )
-----------------
addEventHandler ( "onClientMarkerHit", getRootElement(),
function ()
if ( source == marker2 or source == marker4 ) then
guiSetVisible ( GUIEditor_Progress[1] , true )
guiSetVisible ( GUIEditor_Label[2] , true )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait. " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait.. " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait... " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait. " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait.. " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait... " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait. " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait.. " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait... " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait. " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait.. " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait... " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait. " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait.. " )
setTimer ( function()
guiSetText ( GUIEditor_Label[2], " wait... " )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
end, 500, 1 )
showCursor ( true )
showChat ( false )
fadeCamera ( false )
setTimer ( UpgradeBar, 100, 0 )
setTimer ( function()
guiSetVisible ( GUIEditor_Label[2] , false )
guiSetVisible ( GUIEditor_Progress[1] , false )
showCursor ( false )
destroyElement(marker2)
destroyElement(marker4)
destroyElement(blip9)
marker3 = createMarker ( -229.37934875488, -219.80139160156, 1.3773846626282, "cylinder", 5, 255, 255, 0, 170 )
blip = createBlipAttachedTo(marker3, 51)
showChat ( true )
fadeCamera ( true )
end, 12000, 1 )
end
end )
function UpgradeBar ( )
guiProgressBarSetProgress ( GUIEditor_Progress[1], guiProgressBarGetProgress ( GUIEditor_Progress[1] ) + 1 )
end
function UpgradeBar2 ()
guiProgressBarSetProgress ( GUIEditor_Progress[1], guiProgressBarGetProgress ( GUIEditor_Progress[1] ) - 20 )
end
------------------
addEventHandler ( "onClientMarkerHit", getRootElement(),
function ()
if ( source == marker3 ) then
guiSetVisible ( GUIEditor_Label[1] , true )
playSound('arm.mp3')
destroyElement(marker3)
destroyElement(blip)
triggerServerEvent ( "onHit2", localPlayer )
CreateMarker4 ()
setTimer ( function()
guiSetVisible ( GUIEditor_Label[1] , false )
end, 4000, 1 )
end
end )
-----------------
function CreateMarker4 ()
marker4 = createMarker ( -1031.7609863281, -648.3388671875, 31.0078125, "cylinder", 5, 255, 255, 0, 170 )
blip9 = createBlipAttachedTo(marker4, 51)
end
سيرفر
addEvent ( "onHit", true )
addEventHandler( "onHit", root,
function ()
setPedSkin ( source, 202 )
setElementVisibleTo ( marker2, root, false )
setElementVisibleTo ( marker2, source, true )
end )
vehicle = {}
addEvent ( "BB", true )
addEventHandler ( "BB", root,
function()
if getElementType(source) == "player" and not isPedInVehicle(source) then
if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end
local x, y, z = getElementPosition(source)
vehicle[source] = createVehicle(403, x+math.random(-5,5), y, z)
if vehicle[source] then
warpPedIntoVehicle(source, vehicle[source])
end
end
end
)
addEvent ( "onHit2", true )
addEventHandler( "onHit2", root,
function ()
givePlayerMoney ( source, 2000 )
end )