-
Posts
91 -
Joined
-
Last visited
Everything posted by darbka2002
-
سلام عليكم ممكن مساعدة فى كيفية تشغيل اغنية فى لوحة تسجيل الدخول
-
ما حصل اى شىء نفس المشكلة
-
انترو 0 = المابة الاساسية
-
بضغت على حرف t وى بعد /go اى حدا بيعرف كيف يكتب امر
-
[23:35:14] WARNING: shopweapons\server.lua:2: Bad argument @ 'setElementPosition' [Expected element at argument 1, got nil] [23:35:14] WARNING: shopweapons\server.lua:3: Bad argument @ 'setElementInterior' [Expected element at argument 1, got nil] [23:35:20] WARNING: shopweapons\server.lua:2: Bad argument @ 'setElementPosition' [Expected element at argument 1, got nil] [23:35:20] WARNING: shopweapons\server.lua:3: Bad argument @ 'setElementInterior' [Expected element at argument 1, got nil] ما نفع
-
كيف ما فى خطا انا بكتب /go لكن ما بنقلنى ؟
-
سلام عليكم بدى حد يصلح كود النقل هذا function go( hPlayer ) setElementPosition( hPlayer, 1367.81580, -1279.67578, 13.54688 ) setElementInterior ( hPlayer, 0 ) end addCommandHandler("go", go)
-
جروب معمول جوا الجروب سيستم بدى لما احد من هذا الجروب يختار الشخصية مثل 125 انا مركب لها شكل لكن هذا الشكل يشتغل بس مع الجروب و لو اى احد من خارج الجروب اختار هذة الشخصية تكون شخصية الاصلية
-
سلام عليكم ممكن مساعدة فى كيفية وضع شخصية خاصة لى الجروب و اذا جاب اختار احد الشخصية تظهر لة الشخصية العادية ممكن المساعدة
-
اخى انا خليت السكربت هيك source = createMarker(298.04071,-80.79839,1001.51563,"cylinder",1.5,0,255,0,170) setElementInterior ( source, interior, 2233.91, 1714.73, 1011.38 ) setElementInterior ( source, 4 ) addEventHandler ( "onClientMarkerHit", root, function (getElementInterior) if source == source if getElementInterior == localPlayer then guiSetVisible(win, true) showCursor(true) end end end) addEventHandler ( "onClientMarkerLeave", root, function (getElementInterior) if source == source if getElementInterior == localPlayer then guiSetVisible(win, false) showCursor(false) end end و باردو ماظبتش ممكن حل
-
سلام عليكم انا تعبت والله احاول اخلى الشوب يفتح فى Interior 4 المود بصنع مارك فى Interior 4 لكن ما يفتح لوحة الشوب ممكن مساعدة server addEvent("Weapons",true) addEventHandler("Weapons",root, function (GetItem ,ammo ,price) pm = getPlayerMoney(source) if ( pm >= tonumber(price) ) then giveWeapon ( source, tonumber(GetItem), tonumber(ammo)) takePlayerMoney(source , tonumber(price)) Name = getWeaponNameFromID(tonumber(GetItem)) outputChatBox("#a00000*#ffffff[#a00000You#ffffff] ##2E2E2EHave New Weapon#ffffff : [#ff0000"..Name.."#ffffff]" ,source, 0, 255, 0 ,true) else outputChatBox("#a00000*#ffffff[#a00000You#ffffff] ##2E2E2EDon't Have Enough#ffffff Money" ,source, 0, 255, 0 ,true) end end) addEventHandler ( "onClientMarkerHit", root, function (hitElement) if source == source if hitElement == localPlayer then guiSetVisible(win, true) showCursor(true) end end end) addEventHandler ( "onClientMarkerLeave", root, function (hitElement) if source == source if hitElement == localPlayer then guiSetVisible(win, false) showCursor(false) end end end addEvent("SendWe",true) addEventHandler("SendWe",root, function (GetItem1 ,ammo1 ,price1 ,Player) play = getPlayerFromName(Player) money = getPlayerMoney(source) if money >= tonumber(price1) then giveWeapon ( play, tonumber(GetItem1), tonumber(ammo1)) takePlayerMoney(source , tonumber(price1)) Name1 = getWeaponNameFromID(tonumber(GetItem1)) outputChatBox("#a00000*#ffffff[#a00000You#ffffff] ##2E2E2ESend This Weapon#ffffff : [#ff0000"..Name1.."#ffffff]" ,source, 0, 255, 0 ,true) outputChatBox("#a00000*#ffffff[#a00000You#ffffff] ##2E2E2EReceived new weapon #ffffff : [#ff0000"..Name1.."#ffffff]" ,play, 0, 255, 0 ,true) else outputChatBox("#a00000*#ffffff[#a00000You#ffffff] ##2E2E2EDon't Have Enough#ffffff Money" ,source, 0, 255, 0 ,true) end end) client Weapons = { -- {"WeaponName" ,"WeaponID","WeaponAmmo" ,"WeaponPrice"}, {"Brass Knuckles" ,"1","1" ,"500"}, {"Golf Club" ,"2","1" ,"500"}, {"Nightstick" ,"3" , "1" ,"5000"}, {"Knife" ,"4" , "1" ,"4000"}, {"Baseball Bat" ,"5","1" ,"600"} , {"Shovel" ,"6","1" ,"400"}, {"Pool Cue" ,"7","1" ,"300"}, {"Katana" ,"8","1" ,"4500"}, {"Chainsaw" ,"9","1000" ,"15000"}, {"Long Purple Dildo" ,"10","1" ,"500"}, {"Short tan Dildo" ,"11","1" ,"100"}, {"Vibrator" ,"12","1" ,"200"}, {"Flowers" ,"14","1" ,"300"}, {"Cane" ,"15","1" ,"500"}, {"Grenade" ,"16" , "20" ,"10000"}, {"Tear Gas" ,"17" , "10" ,"5000"}, {"Molotov Cocktails" ,"18","10" ,"6000"} , {"Pistol" ,"22","2000" ,"1000"}, {"Silenced Pistol" ,"23","2000" ,"1000"}, {"Desert Eagle" ,"24","2000" ,"1000"}, {"Shotgun" ,"25","1500" ,"2000"}, {"Sawn-Off Shotgun" ,"26","1500" ,"5000"}, {"SPAZ-12 Combat Shotgun" ,"27","1500" ,"2000"}, {"Uzi" ,"28" , "4000" ,"5000"}, {"MP5" ,"29" , "4000" ,"5000"}, {"AK-47" ,"30","4000" ,"6000"} , {"M4" ,"31","4000" ,"7000"}, {"TEC-9" ,"32","4000" ,"4500"}, {"Country Rifle" ,"33","800" ,"8000"}, {"Sniper Rifle" ,"34","800" ,"10000"}, {"Rocket Launcher" ,"35","10" ,"50000"}, {"Heat-Seeking RPG" ,"36","10" ,"100000"}, {"Flamethrower" ,"37","500" ,"40000"}, {"Minigun" ,"38","500" ,"100000"}, {"Satchel Charges" ,"39" , "20" ,"30000"}, {"Spraycan" ,"41","1" ,"50"}, {"Fire Extinguisher " ,"42","500" ,"3000"}, {"Camera" ,"43","1" ,"80"}, {"Night-Vision Goggles" ,"44","1" ,"90"}, {"Infrared Goggles" ,"45","1" ,"50"}, {"Parachute" ,"46","1" ,"50"} } source = createMarker(298.04071,-80.79839,1001.51563,"cylinder",1.5,0,255,0,170) setElementInterior ( source, interior, 2233.91, 1714.73, 1011.38 ) setElementInterior ( source, 4 ) GUIEditor = { gridlist = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function () local screenW, screenH = guiGetScreenSize() win = guiCreateStaticImage((screenW - 554) / 2, (screenH - 477) / 2, 554, 477, "s/panel.png", false) guiSetVisible(win,false) local screenW2, screenH2 = guiGetScreenSize() PlayerList = guiCreateStaticImage((screenW2 - 342) / 2, (screenH2 - 415) / 2, 342, 415, "s/PlayerList.png", false) guiSetVisible(PlayerList,false) GridPlayer = guiCreateGridList(23, 59, 188, 346, false, PlayerList) c = guiGridListAddColumn(GridPlayer, "Player", 0.9) SendWe = guiCreateStaticImage(215, 59, 101, 32, "s/SendWe.png", false, PlayerList) Close = guiCreateStaticImage(215, 117, 101, 32, "s/Close.png", false, PlayerList) GUIEditor.staticimage[1] = guiCreateStaticImage(216, 315, 104, 90, "s/logo.png", false, PlayerList) for _,player in ipairs ( getElementsByType("player") ) do local row = guiGridListAddRow(GridPlayer) guiGridListSetItemText(GridPlayer,row,1,getPlayerName(player),false,false) end Grid = guiCreateGridList(16, 71, 277, 400, false, win) guiGridListAddColumn(Grid, "name", 0.2) guiGridListAddColumn(Grid, "id", 0.2) guiGridListAddColumn(Grid, "ammo", 0.2) guiGridListAddColumn(Grid, "price", 0.2) for k,v in ipairs(Weapons) do local row = guiGridListAddRow(Grid) guiGridListSetItemText(Grid,row,1, v[1],false,false) guiGridListSetItemText(Grid,row,2, v[2],false,false) guiGridListSetItemText(Grid,row,3, v[3],false,false) guiGridListSetItemText(Grid,row,4, v[4],false,false) guiGridListSetItemText(Grid,row,5, v[5],false,false) guiGridListSetItemText(Grid,row,6, v[6],false,false) guiGridListSetItemText(Grid,row,7, v[7],false,false) guiGridListSetItemText(Grid,row,8, v[8],false,false) guiGridListSetItemText(Grid,row,9, v[9],false,false) guiGridListSetItemText(Grid,row,10, v[10],false,false) guiGridListSetItemText(Grid,row,11, v[11],false,false) guiGridListSetItemText(Grid,row,12, v[12],false,false) guiGridListSetItemText(Grid,row,13, v[13],false,false) Buy = guiCreateStaticImage(320, 95, 200, 60, "s/Buy.png", false, win) Send = guiCreateStaticImage(320, 224, 200, 60, "s/Send.png", false, win) GUIEditor.staticimage[4] = guiCreateStaticImage(352, 339, 170, 132, "s/logo.png", false, win) end end) localPlayer = getLocalPlayer() addEventHandler("onClientGUIClick", root , function() if source == Buy then GetItem = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 2 ) ammo = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 3 ) price = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 4 ) triggerServerEvent("Weapons", localPlayer , GetItem ,ammo ,price) elseif source == SendWe then GetItem1 = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 2 ) ammo1 = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 3 ) price1 = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 4 ) Player = guiGridListGetItemText ( GridPlayer, guiGridListGetSelectedItem ( GridPlayer ), 1 ) triggerServerEvent("SendWe", localPlayer , GetItem1 ,ammo1 ,price1 ,Player) elseif source == Send then guiSetVisible(PlayerList, true) guiBringToFront(PlayerList) updateList_DABL() elseif source == Close then guiSetVisible(PlayerList ,false) showCursor(false) end end) function updateList_DABL() guiGridListClear(GridPlayer) for _,player in ipairs ( getElementsByType("player") ) do local row = guiGridListAddRow(GridPlayer) guiGridListSetItemText(GridPlayer,row,1,getPlayerName(player),false,false) end end function updateList_TAPL(old, new) if eventName == "onClientPlayerJoin" then local row = guiGridListAddRow(GridPlayer) guiGridListSetItemText(GridPlayer, row, c, getPlayerName(source), false, false) elseif eventName == "onClientPlayerQuit" then for i=0, guiGridListGetRowCount(GridPlayer) -1 do if guiGridListGetItemText(GridPlayer, i, c) == getPlayerName(source) then guiGridListRemoveRow(GridPlayer, i) end end elseif eventName == "onClientPlayerChangeNick" then for i=0, guiGridListGetRowCount(GridPlayer) -1 do if guiGridListGetItemText(GridPlayer, i, c) == old then guiGridListSetItemText(GridPlayer, i, c, new, false, false) end end end end addEventHandler("onClientPlayerJoin", root, updateList) addEventHandler("onClientPlayerQuit", root, updateList) addEventHandler("onClientPlayerChangeNick", root, updateList)
-
شكرا ليك اخى شتغلت انا حطيطة فى team Police و اشتغل
-
سلام عليكم اخوتى الكرام انا عايز اصلح الكود هذا المفروض ان الكود لما اروح على المارك تفتح لوحة gui و اختار السيارة اللى اريدها لى جروب army Client GUIEditor_Window = {} GUIEditor_Marker = {} GUIEditor_Markerr = {} GUIEditor_Button = {} GUIEditor_Grid = {} vehicleId = {519,476,593} local groupName = 'army' local x,y = guiGetScreenSize() local x = x - 208 local y = y - 321 GUIEditor_Window[1] = guiCreateWindow(x/2,y/2,208,321,"ARMY AirPlane",false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(10,25,184,244,false,GUIEditor_Window[1]) column = guiGridListAddColumn( GUIEditor_Grid[1], 'vehiceName', 0.80 ) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) GUIEditor_Button[1] = guiCreateButton(12,277,87,30,"Close",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(107,277,87,30,"Take Car",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1],false) for i,id in ipairs ( vehicleId ) do guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) end addEventHandler ("onClientMarkerHit", root, function( player ) if getElementData ( player , "Group" ) == groupName and not isPedInVehicle( player ) and player == localPlayer then if (getTeamName(getPlayerTeam(localPlayer)) == "ARMY") then for i,v in ipairs( GUIEditor_Marker ) do if ( source == v ) then x999,y999,z999 = getElementPosition( localPlayer ) if z999 < 13.1 and z999 < 11.1 then setElementFrozen ( localPlayer, true ) guiSetVisible(GUIEditor_Window[1],true) showCursor( true ) end end end end end end ) addEventHandler ("onClientMarkerHit", root, function( player ) if getElementData ( player , "Group" ) == groupName and isPedInVehicle( player ) and player == localPlayer then if (getTeamName(getPlayerTeam(localPlayer)) == "Police") then for i,v in ipairs( GUIEditor_Markerr ) do if ( source == v ) then x989,y989,z989 = getElementPosition( localPlayer ) if z989 < 30 and z989 > 0 then setElementFrozen(getPedOccupiedVehicle(localPlayer), true) setTimer(setElementFrozen,1000,1,getPedOccupiedVehicle(localPlayer), false) end end end end end end ) addEventHandler('onClientGUIClick', root, function() if ( source == GUIEditor_Button[1] ) then guiSetVisible(GUIEditor_Window[1],false) showCursor( false ) setElementFrozen ( localPlayer, false ) elseif ( source == GUIEditor_Button[2] ) then local name = guiGridListGetItemText( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) triggerServerEvent('src', getLocalPlayer(), name) guiSetVisible(GUIEditor_Window[1],false) setElementFrozen ( localPlayer, false ) showCursor( false ) end end ) ------------------------------------------------------------------------ local sx, sy = guiGetScreenSize() mainWindow = guiCreateWindow((sx-438)/2, (sy-487)/2, 238, 500, "ARMY Vehicles", false) guiWindowSetSizable(mainWindow, false) guiSetAlpha(mainWindow, 1.00) guiSetVisible(mainWindow, false) mainTab = guiCreateTabPanel(0.02, 0.04, 0.89, 0.80, true, mainWindow) local vehicles = { cars = { tab = guiCreateTab("Cars", mainTab), list = { {"Patriot", 470}, {"Barracks", 433}, {"Cheetah", 415}, {"Bullet", 541}, {"Infernus", 411}, {"Sultan", 560}, {"Turismo", 451}, {"Comet", 480}, {"Huntley", 579}, {"Flash", 565}, {"Bandito", 568} } }, bikes = { tab = guiCreateTab("Bikes", mainTab), list = { {"BF-400", 581}, {"FCR-900", 521}, {"PCJ-600", 461}, {"Sanchez", 468} } }, planes = { tab = guiCreateTab("Planes", mainTab), list = { {"Sparrow", 469}, {"Police Maverick", 497} } } } vehicles.cars.gridlist = guiCreateGridList(0.05, 0.02, 0.89, 0.95, true, vehicles.cars.tab) table.insert(vehicles.cars, guiGridListAddColumn(vehicles.cars.gridlist, "Cars", 0.9)) vehicles.bikes.gridlist = guiCreateGridList(0.05, 0.02, 0.89, 0.95, true, vehicles.bikes.tab) table.insert(vehicles.bikes, guiGridListAddColumn(vehicles.bikes.gridlist, "Bikes", 0.9)) vehicles.planes.gridlist = guiCreateGridList(0.05, 0.02, 0.89, 0.95, true, vehicles.planes.tab) table.insert(vehicles.planes, guiGridListAddColumn(vehicles.planes.gridlist, "Planes", 0.9)) Buttonn = guiCreateButton(75, 430,87,30,"Close",false,mainWindow) notice = guiCreateLabel(0.02, 0.94, 0.96, 0.03, "Press (Enter) to take your vehicle", true, mainWindow) guiLabelSetColor(notice, 0, 255, 0) guiLabelSetHorizontalAlign(notice, "center", false) guiLabelSetVerticalAlign(notice, "center") for i,v in pairs(vehicles) do for _,k in ipairs(v.list) do local row = guiGridListAddRow(v.gridlist) guiGridListSetItemText(v.gridlist, row, v[1], k[1], false, false) end end addEventHandler('onClientGUIClick', root, function() if ( source == Buttonn ) then guiSetVisible(mainWindow,false) showCursor( false ) end end ) local vehiclesMarker = createColSphere(220.7939453125, 1916.89453125, 17.640625, 1) local vehiclesSSMarker = createMarker(220.7939453125, 1916.89453125, 17.640625-1, "cylinder", 1.5, 0, 180, 0, 150) local vehiclesMarker2 = createColSphere(211.638671875, 1916.89453125, 17.640625, 1) local vehiclesSSMarker2 = createMarker(211.638671875, 1916.89453125, 17.640625-1, "cylinder", 1.5, 0, 180, 0, 150) local vehiclesMarker3 = createColSphere(202.5439453125, 1916.89453125, 17.640625, 1) local vehiclesSSMarker3 = createMarker(202.5439453125, 1916.89453125, 17.640625-1, "cylinder", 1.5, 0, 180, 0, 150) local vehiclesMarker4 = createColSphere(193.5634765625, 1916.89453125, 17.640625, 1) local vehiclesSSMarker4 = createMarker(193.5634765625, 1916.89453125, 17.640625-1, "cylinder", 1.5, 0, 180, 0, 150) --------------------- addEventHandler("onClientColShapeHit", vehiclesMarker, function(hitElement) if hitElement == localPlayer and getElementData(hitElement, "Group") == groupName and getTeamName( getPlayerTeam( hitElement ) ) == "Police" and not isPedInVehicle(hitElement) then guiSetVisible(mainWindow, true) showCursor(true) setElementPosition( hitElement, 220.7939453125, 1916.89453125, 17.640625 ) bindKey("enter", "down", selectVehicle) end end,false ) addEventHandler("onClientColShapeHit", vehiclesMarker2, function(hitElement) if hitElement == localPlayer and getElementData(hitElement, "Group") == groupName and getTeamName( getPlayerTeam( hitElement ) ) == "Police" and not isPedInVehicle(hitElement) then guiSetVisible(mainWindow, true) showCursor(true) setElementPosition( hitElement, 211.638671875, 1916.89453125, 17.640625 ) bindKey("enter", "down", selectVehicle) end end,false ) addEventHandler("onClientColShapeHit", vehiclesMarker3, function(hitElement) if hitElement == localPlayer and getElementData(hitElement, "Group") == groupName and getTeamName( getPlayerTeam( hitElement ) ) == "Police" and not isPedInVehicle(hitElement) then guiSetVisible(mainWindow, true) showCursor(true) setElementPosition( hitElement, 202.5439453125, 1916.89453125, 17.640625 ) bindKey("enter", "down", selectVehicle) end end,false ) addEventHandler("onClientColShapeHit", vehiclesMarker4, function(hitElement) if hitElement == localPlayer and getElementData(hitElement, "Group") == groupName and getTeamName( getPlayerTeam( hitElement ) ) == "Police" and not isPedInVehicle(hitElement) then guiSetVisible(mainWindow, true) showCursor(true) setElementPosition( hitElement, 193.5634765625, 1916.89453125, 17.640625 ) bindKey("enter", "down", selectVehicle) end end,false ) ---------------------------------- addEventHandler("onClientColShapeLeave", vehiclesMarker, function(leaveElement) if leaveElement == localPlayer and getElementData(leaveElement, "Group") == groupName and getTeamName( getPlayerTeam( leaveElement ) ) == "Police" and not isPedInVehicle(leaveElement) then guiSetVisible(mainWindow, false) showCursor(false) unbindKey("enter", "down", selectVehicle) end end, false ) addEventHandler("onClientColShapeLeave", vehiclesMarker2, function(leaveElement) if leaveElement == localPlayer and getElementData(leaveElement, "Group") == groupName and getTeamName( getPlayerTeam( leaveElement ) ) == "Police" and not isPedInVehicle(leaveElement) then guiSetVisible(mainWindow, false) showCursor(false) unbindKey("enter", "down", selectVehicle) end end, false ) addEventHandler("onClientColShapeLeave", vehiclesMarker3, function(leaveElement) if leaveElement == localPlayer and getElementData(leaveElement, "Group") == groupName and getTeamName( getPlayerTeam( leaveElement ) ) == "Police" and not isPedInVehicle(leaveElement) then guiSetVisible(mainWindow, false) showCursor(false) unbindKey("enter", "down", selectVehicle) end end, false ) addEventHandler("onClientColShapeLeave", vehiclesMarker4, function(leaveElement) if leaveElement == localPlayer and getElementData(leaveElement, "Group") == groupName and getTeamName( getPlayerTeam( leaveElement ) ) == "Police" and not isPedInVehicle(leaveElement) then guiSetVisible(mainWindow, false) showCursor(false) unbindKey("enter", "down", selectVehicle) end end, false ) --------------------------------------- function selectVehicle() for i,v in pairs(vehicles) do local tab = v.tab if guiGetSelectedTab(mainTab) == tab then local gridlist = v.gridlist if guiGridListGetSelectedItem(gridlist) ~= -1 then local row = guiGridListGetSelectedItem(gridlist) local vehName = guiGridListGetItemText(gridlist, row, v[1]) for _,k in ipairs(v.list) do if k[1] == vehName then if i == "planes" then
-
سلام عليكم هذا الكود تبع وظيفة توصيل البيتزا لكن لا تظهر علامات على الغريطة برغم انى وضعت Blip ممكن الحل من المحترفين client local blip = createBlip ( 1544.63257, 676.23987, 11.32813, 56 ) -- العلامة local jobped = createPed ( 287, 1544.63257, 676.23987, 11.32813, 90 ) -- الشخصية local getjobmarker = createMarker ( 1544.63257, 676.23987, 11.32813 -1, "cylinder", 3, 255, 255, 255, 255 ) local destinations = { { 2810.92505, 2918.13208, 36.50460, 51 }; --------- مكان التوصيل { 1238.26147, 235.15599, 19.55469, 51 }; ---------- { 2827.1000976563, 1383.5, 9.8000001907349, 51 }; -------- مكان التوصيل { 2495.5, 2773.3000488281, 9.8000001907349, 51 }; -------- مكان التوصيل { -2130.6999511719, -80.099998474121, 34.299999237061, 51 }; -------- مكان التوصيل { -2643.6000976563, 1373, 5.9000000953674, 51 }; -------- مكان التوصيل { -2747.1000976563, -280, 6, 51 }; -------- مكان التوصيل { 2339.97876, 2036.61914, 10.42309, 51 }; -------- مكان التوصيل { 1069.39612, 1226.58252, 10.23718, 51 }; -------- مكان التوصيل } GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} addEventHandler("onResourceStart",destinations, function unpackDestinations () return unpack ( destinations [ math.random ( #destinations ) ] ) end) addEventHandler("onResourceStart",getjobmarker, function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(getjobmarker,true) showCursor(true) end end) sx,sy = guiGetScreenSize() lp = getLocalPlayer() mr = math.random(1,2) jobwindow = guiCreateWindow(157, 95, 530, 441, "Pizza Job", false) guiWindowSetSizable(jobwindow, false) guiSetAlpha(jobwindow, 1.00) GUIEditor_Image[1] = guiCreateStaticImage(9, 24, 265, 236,"darbka.jpeg",false,jobwindow) memo = guiCreateMemo(275, 22, 244, 240, "welcome to the jop", false, jobwindow) label1 = guiCreateLabel(8,302,515,28,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", false, jobwindow) guiLabelSetColor(label1,0,255,0,255) guiSetFont(label1,"sa-header") GUIEditor_Label[4] = guiCreateLabel(8,308,515,28,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",false,jobwindow) guiLabelSetColor(GUIEditor_Label[4],255,0,0,255) guiSetFont(GUIEditor_Label[4],"sa-header") takebutton = guiCreateButton(10,378,166,54,"Get Job",false,jobwindow) guiSetFont(takebutton,"clear-normal") setTimer(function() guiSetProperty(takebutton, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 100, 0) cancbutton = guiCreateButton(353,378,166,54,"Close",false,jobwindow) guiSetFont(cancbutton,"clear-normal") setTimer(function() guiSetProperty(cancbutton, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 100, 0) GUIEditor_Label[5] = guiCreateLabel(336,266,168,53,"Helps",false,jobwindow) guiLabelSetColor(GUIEditor_Label[5],255,0,0,255) guiSetFont(GUIEditor_Label[5],"sa-gothic") GUIEditor_Label[2] = guiCreateLabel(54,266,168,53,"Pizza Job",false,jobwindow) guiLabelSetColor(GUIEditor_Label[2],255,0,0,255) guiSetFont(GUIEditor_Label[2],"sa-gothic") guiSetVisible (jobwindow,false) guiMemoSetReadOnly(memo,true) guiWindowSetMovable (jobwindow,true ) guiWindowSetSizable (jobwindow,false ) sx, sy = guiGetScreenSize() lp = getLocalPlayer() mr = math.random(1,2) destinationwindow = guiCreateWindow(211,313,297,148, "Pizza Job", false) guiSetAlpha(destinationwindow, 1.00) label1 = guiCreateLabel(50,33,212,32, "Do you want to continue to The work ?", false, destinationwindow) guiSetFont(label1, "default-bold-small") continue = guiCreateButton(9,90,127,49, "Continue Work", false, destinationwindow) guiSetProperty(continue, "NormalTextColour", "FFAAAAAA") setTimer(function() guiSetProperty(continue, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 100, 0) close = guiCreateButton(165,90,123,49, "Stop Work", false, destinationwindow) guiSetProperty(close, "NormalTextColour", "FFAAAAAA") setTimer(function() guiSetProperty(close, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 100, 0) guiMemoSetReadOnly(destinationmemo, true) guiWindowSetSizable(destinationwindow, false) guiWindowSetMovable(destinationwindow, true) guiSetVisible (destinationwindow, false) -- addEventHandler("onClientGUIClick",jobwindow, function(b,thePlayer) if b == "left" then if source == takebutton then outputChatBox ("you has been Successfully took pizza job",0,255,0, true) outputChatBox ("Please back to the marker to get the Vehicle",0,255,0, true) guiSetVisible(jobwindow,false) guiSetVisible(takebutton,false) triggerServerEvent ( "doSomething", lp) showCursor(false) -- onduty = guiCreateButton(10, 327, 166, 47, "get Vehicle", false, jobwindow) guiSetFont(onduty,"clear-normal") setTimer(function() guiSetProperty(onduty, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 100, 0) quitbutton = guiCreateButton(353, 327, 166, 47, "Quit Job", false, jobwindow) guiSetFont(quitbutton,"clear-normal") setTimer(function() guiSetProperty(quitbutton, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 100, 0) end end end ) addEventHandler("onClientGUIClick",jobwindow, function(b,thePlayer) if b == "left" then if source == cancbutton then guiSetVisible(jobwindow,false) showCursor(false) end end end) addEventHandler("onClientGUIClick",jobwindow, function(b,thePlayer) if b == "left" then if source == quitbutton then outputChatBox ("Please back to the marker to get the Vehicle",0,255,0, true) guiSetVisible(jobwindow,false) guiSetVisible(quitbutton,false) guiSetVisible(onduty,false) guiSetVisible(offduty,false) guiSetVisible(cancbutton,true) guiSetVisible(takebutton,true) triggerServerEvent ( "doSomethin", lp) showCursor(false) destroyElement ( truckerMarker ) destroyElement ( truckerBlip ) end end end) addEventHandler("onClientGUIClick",jobwindow, function(b,thePlayer) if b == "left" then if source == onduty then outputChatBox ("Go to a mark that appeared to you the map ",source,0,255,0, true) triggerServerEvent ( "HaveTruckerJob", lp) triggerServerEvent ( "sum", lp) guiSetVisible(jobwindow,false) guiSetVisible(quitbutton,true) guiSetVisible(takebutton,false) guiSetVisible(offduty,true) guiSetVisible(onduty,false) guiSetVisible(cancbutton,true) showCursor(false) -- offduty = guiCreateButton(10,378,166,54, "Quit of The Task", false, jobwindow) guiSetProperty(offduty, "NormalTextColour", "FFAAAAAA") setTimer(function() guiSetProperty(offduty, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 100, 0) end end end) addEventHandler("onClientGUIClick",jobwindow, function(b,thePlayer) if b == "left" then if source == offduty then guiSetVisible(jobwindow,false) guiSetVisible(quitbutton,true) guiSetVisible(takebutton,false) guiSetVisible(offduty,false) guiSetVisible(onduty,true) guiSetVisible(cancbutton,true) showCursor(false) destroyElement ( truckerMarker ) destroyElement ( truckerBlip ) end end end) addEventHandler("onClientMarkerHit",getjobmarker, function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(jobwindow,true) showCursor(true) end end ) addEvent("HaveTruckerJob", true) function createDestinations () x, y, z = unpackDestinations () truckerMarker = createMarker ( x, y, z, "cylinder", 3, 255, 255, 255, 255, localPlayer ) truckerBlip = createBlipAttachedTo ( truckerMarker, 51, localPlayer ) end addEventHandler ( "HaveTruckerJob", root, createDestinations ) addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if source == truckerMarker and localPlayer == hitElement then local vehicle = getPedOccupiedVehicle ( localPlayer ) if vehicle and getElementModel(vehicle) == 411 then triggerServerEvent ( "givePlayerPay", localPlayer ) destroyElement ( truckerMarker ) if isElement(truckerBlip) then destroyElement ( truckerBlip ) end guiSetVisible(destinationwindow,true) showCursor(true) triggerEvent ( "createTruckerEvent", localPlayer ) end end end) addEventHandler ( "onClientPedDamage", resourceRoot, function () cancelEvent () end ) addEventHandler("onClientGUIClick",destinationwindow,