-----الكلنت
local Marker1 = createMarker( 1616.44470, -1506.68884, 13.2084 , "cylinder" , 2 , 255 , 0 , 0 , 180 )
createBlip (1616.44470, -1506.68884, 14.2084, 38 )
warpPedIntoVehicle(source,car)
GUIEditor = {
tab = {},
button = {},
window = {},
memo = {},
label = {},
tabpanel = {},
}
GUIEditor.window[1] = guiCreateWindow(391, 352, 500, 240, "Delivery/ /Drugs", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.85)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000")
GUIEditor.button[1] = guiCreateButton(39, 38, 116, 38, "Drug transfer 1", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[1], "default-bold-small")
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
GUIEditor.button[3] = guiCreateButton(40, 110, 116, 38, "Drug transfer 2", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[3], "default-bold-small")
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF")
GUIEditor.label[1] = guiCreateLabel(174, 44, 294, 29, "Transport drugs to the LV city/for 7,000k", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
GUIEditor.label[3] = guiCreateLabel(175, 113, 294, 29, "Transport drugs to the SF city/for 15,000k", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[3], "default-bold-small")
GUIEditor.button[6] = guiCreateButton(40, 175, 116, 38, "Close", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[6], "default-bold-small")
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF")
GUIEditor.tabpanel[2] = guiCreateTabPanel(241, 152, 250, 79, false, GUIEditor.window[1])
GUIEditor.tab[2] = guiCreateTab("explained", GUIEditor.tabpanel[2])
GUIEditor.memo[2] = guiCreateMemo(9, 6, 239, 46, "criminal can take Drugs car to any city for money .....Enjoy", false, GUIEditor.tab[2])
guiMemoSetReadOnly(GUIEditor.memo[2], true)
guiSetVisible (GUIEditor.window[1], false)
addEventHandler("onClientMarkerHit",Marker1, --عند لمس الماركر المحدد
function()--وظيفة
if ( getPlayerTeam ( localPlayer ) ~= getTeamFromName ( 'Criminal' ) ) then return end
guiSetVisible(GUIEditor.window[1],true)--تفتح اللوحة
showCursor(true) --نظهر الماوس
end --نهاية الوظيفة
)--نهاية قوس الحدث
----------------------
addEventHandler("onClientGUIClick",root, --عند الضغط على زر
function()--وظيفة
if source == GUIEditor.button[1] then
triggerServerEvent ("takecar",localPlayer)
-------------------------------------------------
elseif source == GUIEditor.button[3] then
triggerServerEvent ("takecar",localPlayer)
-------------------------------------------------
elseif
(source == GUIEditor.button[6]) then--ان كان الزر = زر الاغلاق
guiSetVisible(GUIEditor.window[1],false)--اغلاق اللوحة
showCursor(false)--اخفاء الماوس
end--نهاية التحقق
end--نهاية الوظيفة
)--نهاية قوس الحدث
--------------------------------
addEventHandler("onMarkerHit",marker,
function(player)
if (getElementData(player,'statemision') == true) then
setElementData(player,'statemision',false)
outputChatBox(" اركب في السيارة خلفك واذهب الى النقطه الحمراء في الخريطه",player,255,255,255)
createMission ()
end
end
)
--------السرفر
function createMission (p)
car = createVehicle(419,1838.53516,-1866.01978,13.38975)
ped = createPed (10,1838.53516,-1866.01978,13.38975)
if car and ped then
warpPedIntoVehicle(ped,car,1)
winmarker = createMarker(1022.58771, 2375.88818, 10.82031,"cylinder",2,255,255,255,255)
blib = createBlip ( 1022.58771, 2375.88818, 10.82031, 51 )
addEventHandler("onMarkerHit",winmarker,wine)
end
end
function wine(p)
givePlayerMoney(p,7000)
setElementData(p,'statemision',true)
outputChatBox("Has the task successfully i've got 7,000k",p,255,0,0)
distroy()
end
function distroy()
destroyElement(ped)
destroyElement(car)
destroyElement(winmarker)
destroyElement(blib)
end
هل هذه صحيح ارجو التصحيح لو فيه اخطاء