Jump to content

max-mohammed

Members
  • Posts

    123
  • Joined

  • Last visited

Everything posted by max-mohammed

  1. مشكوور الكود اشتغل الا نقطة لما اروح الماركر الي اسمه marker مايبي يدخلني مع اني شريت المطلوب والداتا جاء للحساب بس المشكلة انه مايبي يدخلني يقول لايوجد لديك الي حطيتها اتمنى حل
  2. addEventHandler ( "onClientGUIClick", root, function ( ) if (source == الزر) then setCameraMatrix ( x, y, z, xl, yl, zl ) showCursor ( not isCursorShowing () ) end end ) addCommandHandler ( "الكلمة", function() local eg = getLocalPlayer() guiSetVisible ( اسم اللوحة, false ) showCursor ( false ) setCameraTarget (eg) end ) حط اسم اللوحة والاحداثيات!! وتأكد اسم الزر بدون "" جرب
  3. سلام عليكم شباب كيفكم ان شاء الله طيبين المهم....... انا عندي كود فيه ماركرين الاول يفتح لك لوحة والثاني يوديك مكان اوك بعد مايوديك المكان يوديك عالم وهمي ويحطك في سيارة وبعدين تجي ماركرات قدامك لو لمست ماركر يصير فنكشن اوك وفيله نظام سرعة المهم كلنت addEvent ("gui", true) addEventHandler ("gui", getRootElement(), function gui () if (getLocalPlayer() == source) then guiSetVisible (wnd, true) showCursor (true) end end ) addEventHandler("onClientGUIClick",root,function() if (source == close) then guiSetVisible (wnd, false) showCursor (false) elseif (source == buy) then triggerServerEvent("Account",getRootElement()) end end) سيررفر setElementDimension(los,766) setElementDimension(win1,766) setElementDimension(winr,766) addEvent ("gui", true) function markerHit (hitPlayer, matchingDimension) if (source == marker) then local acc = getPlayerAccount(hitPlayer) if getElementType (hitPlayer) == 'player' and acc and not isGuestAccount(acc) then if ( getAccountData(acc,'ماعليك منه') == 'ماعليك منه') then local car = createVehicle( math.random(455,411,577), 2470.6877441406, -1614.0283203125, 1180.4453125) setElementDimension(car,766) setElementDimension(hitPlayer,766) warpPedIntoVehicle(hitPlayer,car) setAccountData(acc,ماعليك منه) else outputChatBox ('لايوجد لديك ', hitPlayer, 255, 0, 0, false) end end elseif (source == marker1) then local acc = getPlayerAccount(hitPlayer) if acc and not isGuestAccount(acc) then triggerClientEvent ("gui", hitPlayer) end end end addEventHandler ("onMarkerHit", getRootElement(), markerHit) addEvent ("Account", true) addEventHandler ("Account", getRootElement(), function() if (getPlayerMoney (source) >= 1000) then outputChatBox ("تم شراء ", source, 255, 0, 0, false) takePlayerMoney (source, 1000) setAccountData (getPlayerAccount (source), ماعليك منه) else outputChatBox ("ليس لديك نقود", source, 255, 0, 0, false) end end) function mkr (hitPlayer, unit) local vh = getVehicleOccupant(hitPlayer) if (source == los) and vh then destroyElement(vh) setElementPosition(hitPlayer, x, y, z) setElementDimension(hitPlayer,766) elseif (source == winr) and vh then local acc = getPlayerAccount(hitPlayer) if acc and not isGuestAccount(acc) then setAccountData (acc, ماعليك منه) destroyElement(vh) setElementPosition(hitPlayer, x, y, z) setElementDimension(hitPlayer,766) end elseif (source == win1) and vh then if (unit == nil) then unit = 0 end if (unit == "kbh") then local Speed = getElementSpeed(hitPlayer, unit) if (Speed >= 90) then destroyElement(vh) setElementPosition(hitPlayer, x, y, z) setElementDimension(hitPlayer,766) end end end end addEventHandler ("onMarkerHit",getRootElement(),mkr) الكود كامل الا المركرات + اللوحة! انتظر الردود
  4. مشكووووووور الله يعطيك العافية
  5. مشكووووووور الله يعطيكالعافية
  6. addEventHandler ("onMarkerHit",marker2, function () local playeraccount = getPlayerAccount (source) setAccountData ( playeraccount, "ro5sa", "yes" ) end )
  7. function markerHit (hitPlayer, matchingDimension) if (source == carShopMarker) or (source == carShopMarker2) or (source == carShopMarker3) or (source == carShopMarker4) or (source == carShopMarker5) then if (getAccountData(hitPlayer,"ro5sa") == "yes") then if getElementType (hitPlayer) == "player" then triggerClientEvent ("viewGUI", hitPlayer) setCameraMatrix ( hitPlayer, 548.46484375, -1267.1435546875, 26.682792663574, 496.4482421875,-1342.6044921875,-13.315231323242, 0, 0) setElementDimension(hitPlayer,755) end end else outputChatBox ("ليس لديك ؟؟؟", hitPlayer, 255, 0, 0, false) end end addEventHandler ("onMarkerHit", getRootElement(), markerHit) هذا هو
  8. اناابي لما المس الماركر لازم يكون عندي داتا معيين واذا مو عندي الداتا مقدر افتح الماركر فهمت Data"ro5sa" type"yes"
  9. function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end Wnd = guiCreateWindow(525, 157, 267, 315, "( {Vehicle Police})", false) guiSetVisible(Wnd,false) centerWindow(Wnd) guiWindowSetMovable(Wnd, false) guiWindowSetSizable(Wnd, false) guiSetAlpha(Wnd, 1.00) guiSetProperty(Wnd, "CaptionColour", "FF0388F8") gridlist = guiCreateGridList(10, 22, 245, 229, false, Wnd) guiGridListAddColumn(gridlist, "Vehicles", 0.9) button = guiCreateButton(35, 261, 195, 27, "{Create it!#}", false, Wnd) guiSetFont(button, "default-bold-small") guiSetProperty(button, "NormalTextColour", "FFFBE600") label = guiCreateLabel(8, 290, 153, 21, "Created By Dr.anAs ", false, Wnd) guiSetFont(label, "default-bold-small") guiLabelSetColor(label,math.random(0, 255), math.random(0, 255), math.random(0, 255)) local VehicleTable = { 597,598,490,596,427,523 } for _,vehicle in ipairs (VehicleTable) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, 1,getVehicleNameFromModel (tonumber( vehicle )), false, false ) guiGridListSetItemColor ( gridlist, row,1, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) guiSetFont(gridlist,"default-bold-small") end addEventHandler("onClientGUIClick",button, function () local Veh = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 ) if Veh == "" then return outputChatBox("Please Chose Vehicle!",math.random(0, 255), math.random(0, 255), math.random(0, 255),true) end triggerServerEvent("When_asked_to_create_a_vehicle",localPlayer,Veh) playSoundFrontEnd(33) guiSetVisible(Wnd,false) showCursor(false) end,false) local marker = createMarker(1570.5,-1608.5,12.39999961853,'cylinder',1.5,0,0,255,255) local marker1 = createMarker(x,y,z,'cylinder',1.5,0,0,255,255) local marker2 = createMarker(x,y,z,'cylinder',1.5,0,0,255,255) addEventHandler("onClientMarkerHit", getRootElment(), function(hitPlayer) if getElementType(getLocalPlayer) == "player" then if (source == marker) or (source == marker1) or (source == marker2) if getTeamName(getPlayerTeam(hitPlayer)) == "Police" then guiSetVisible(Wnd, true) showCursor(true) end end end end) addEventHandler("onClientGUIClick",button, function () local Veh = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 ) if Veh == "" then return outputChatBox("Please Chose Vehicle!",math.random(0, 255), math.random(0, 255), math.random(0, 255),true) end triggerServerEvent("When_asked_to_create_a_vehicle",localPlayer,Veh) playSoundFrontEnd(33) guiSetVisible(Wnd,false) showCursor(false) end,false) جرب
  10. كودك ماشتغل ليش؟؟؟؟ لما اجي اضغط واحدد ماتجي السيارة تأكد من الكود edit: المشكلة حليتها بس في كود اضفته لما يلمس الماركر لازم يكون لاعب+ لازم يكون عنده داتا معيين اوك الكود: addEvent ("viewGUI", true) function markerHit (hitPlayer, matchingDimension) if (getAccountData(hitPlayer,"pent") == "yes") then if getElementType (hitPlayer) == "player" then if (source == carShopMarker) or (source == carShopMarker2) or (source == carShopMarker3) or (source == carShopMarker4) or (source == carShopMarker5) then triggerClientEvent ("viewGUI", hitPlayer) setCameraMatrix ( hitPlayer, 548.46484375, -1267.1435546875, 26.682792663574, 496.4482421875,-1342.6044921875,-13.315231323242, 0, 0) setElementDimension(hitPlayer,755) end end else outputChatBox ("ليس لديك ؟؟؟", hitPlayer, 255, 0, 0, false) end end addEventHandler ("onMarkerHit", getRootElement(), markerHit) edit #2: شباب احد يرد وربي طفشت
  11. الرد شباب +شوفو آخر تعديل edit: شباب انا سويت الكود بس فيه مشكلة كلنت addEventHandler('onClientGUIClick',root,function() if source == buyButton then if guiGridListGetSelectedItem(carGridList) then local Name = guiGridListGetItemText ( carGridList,guiGridListGetSelectedItem ( carGridList ), 1) local id = guiGridListGetItemData ( carGridList,guiGridListGetSelectedItem ( carGridList ), 1) local Cost = guiGridListGetItemText ( carGridList,guiGridListGetSelectedItem ( carGridList ), 2) triggerServerEvent("carShopCarBuy",localPlayer,Name,id,Cost) end elseif source == carGridList then if guiGridListGetSelectedItem(carGridList) then local car = guiGridListGetItemData ( carGridList,guiGridListGetSelectedItem ( carGridList ), 1) triggerServerEvent("CreateV",localPlayer,car) end elseif source == closeButton then local eg = getLocalPlayer() setCameraTarget(eg) guiSetVisible (carshopWindow, false) showCursor (false) end end) سيرفر addEvent ("CreateV", true) function ss (car) cr = createVehicle ( car, 549.94281005859, -1265.0211181641, 17.2421875 ) if isElement(cr) then destroyElement(cr) createVehicle ( car, 549.94281005859, -1265.0211181641, 17.2421875 ) end end addEventHandler ("CreateV", getRootElement(), ss)
  12. طيب ممكن كودسيرفر لاني معرف التحققات والخ...... ممكن كود تغيير مكان الكاميرا plz Edited!!!
  13. الترايقر مولازم بس ممكان مثال على الكود او تسويه ممكن؟؟
  14. شباب خلاص تم حل المشكلة وشكرا يا ذابيست على كود guiGridListSetItemData edit: معد صرت احتاجه بس مشككككككككوور edit #2: بس ممكن لما اختار Row يسوي createVehicle يعني لو حددت على اي سيارة تظهر قدامي ولو غيرت Row تختفي السابقة وتجي المحددة وكود تغيير مكان الكاميرا edit #3: وين رحتو
  15. والله مانفع كودك جربت بس مانفع function onClientGUIClick (button, state, absoluteX, absoluteYe) if (source == buyButton) then guiSetVisible (carshopWindow, false) showCursor (false) if (guiGridListGetSelectedItem (carGridList)) then local car = guiGridListGetItemData ( carGridList,guiGridListGetSelectedItem ( carGridList ), 1) local carCost = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 2) triggerServerEvent("carShopCarBuy",getLocalPlayer(),car,carCost) end elseif (source == closeButton) then guiSetVisible (carshopWindow, false) showCursor (false) end end addEventHandler ("onClientGUIClick", getRootElement(), onClientGUIClick) 2 for i,v in ipairs (cars) do local row = guiGridListAddRow (carGridList) guiGridListSetItemText (carGridList, row, 1, tostring(v[1]), false, true) guiGridListSetItemText (carGridList, row, 2, tostring(v[3]), false, true) guiGridListSetItemData(carGridList,row,1,v[2]) end
  16. شباب الكود الاول حليت مشكلته بس الثاني بحط الكودين:كاملين function onClientGUIClick (button, state, absoluteX, absoluteYe) if (source == buyButton) then guiSetVisible (carshopWindow, false) showCursor (false) if (guiGridListGetSelectedItem (carGridList)) then local carName = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 1) local carID = getVehicleModelFromName (carName) local carCost = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 2) triggerServerEvent ("carShopCarBuy", getLocalPlayer(), carID, carCost, carName) end elseif (source == closeButton) then guiSetVisible (carshopWindow, false) showCursor (false) end end 2-- local cars = {{411,"gallardo",1900000}} for i,v in ipairs (cars) do local row = guiGridListAddRow (carGridList) guiGridListSetItemText (carGridList, row, 1, tostring(v[2]), false, true) guiGridListSetItemText (carGridList, row, 2, tostring(v[3]), false, true) end كيف اخلي الكود الاول يطلع ايدي السيارة من الجدول ان شاء الله رد
  17. نفسي افهم ليش محد يرد وش فيكم ماتردون؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
  18. +ابي الكاميرا يتغير مكانها
  19. شباب انا مسوي معرض بس ابي لما تجي النافضة يكون اسم السيارة في القريد ليست اسم اختياري مو اسم السيارة الاصلي هم كودين for i,v in ipairs (cars) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (carGridList) guiGridListSetItemText (carGridList, row, 1, carName, false, true) guiGridListSetItemText (carGridList, row, 2, tostring(v[2]), false, true) end function onClientGUIClick (button, state, absoluteX, absoluteYe) if (source == buyButton) then guiSetVisible (carshopWindow, false) showCursor (false) if (guiGridListGetSelectedItem (carGridList)) then local carName = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 1) local carID = getVehicleModelFromName (carName) local carCost = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 2) triggerServerEvent ("carShopCarBuy", getLocalPlayer(), carID, carCost, carName) end end
  20. وينكم؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
  21. local s1 = "sn/club3.mp3" local son = playSound(s1) stopSound(son) wnd = guiCreateWindow(200, 169, 599, 487, "لوحة الاغاني", false) stop = guiCreateButton(247, 40, 113, 39, "ايقاف", false, wnd) close = guiCreateButton(404, 40, 113, 39, "X", false, wnd) restart = guiCreateButton(84, 40, 113, 39, "اعادة تشغيل", false, wnd) song1 = guiCreateButton(84, 230, 113, 39, "Midnight clup3", false, wnd) guiSetFont(GUIEditor.button[4], "default-bold-small") stoptime = guiCreateButton(247, 230, 113, 39, "ايقاف مؤقت", false, wnd) guiSetVisible(wnd,false) addEventHandler("onClientGUIClick",guiRoot,function() if source == stop then if (son == true) then stopSound(s1) outputChatBox("تم ايقاف الاغنية", source, 0, 255, 0) elseif (son == false) then outputChatBox("لاتوجد اغنية قيد التشغيل", source, 0, 255, 0) end end end ) addEventHandler("onClientGUIClick",guiRoot,function() if source == close then guiSetVisible(wnd,false) showCursor(false) end end ) addEventHandler("onClientGUIClick",guiRoot,function() if source == restart then if (son == true) then stopSound(s1) playSound(s1) outputChatBox("لقد تم اعادة تشغيل الاغنية", source, 0, 255, 0) elseif (son == false) then outputChatBox("لاتوجد اغنية قيد التشغيل", source, 0, 255, 0) end end end ) addEventHandler("onClientGUIClick",guiRoot,function() if source == song1 then if (son == true) then outputChatBox("لقد بدئت اغنية Midnight clup3 ", source, 0, 255, 0) playSound(s1) elseif (son == false) then outputChatBox("هذه الاغنية قيد التشغيل ", source, 0, 255, 0) end end end ) addEventHandler("onClientGUIClick",guiRoot,function() local pause = isSoundPaused(son) if source == stoptime then if (pause == true) then setSoundPaused(son, false) guiSetText(stoptime,"استكمال") outputChatBox("لقد تم استكمال الموسيقى", source, 0, 255, 0) elseif (pause == true) then outputChatBox("الموسيقى تم ايقفها ايقاف مؤقت", source, 0, 255, 0) guiSetText(stoptime,"ايقاف مؤقت") setSoundPaused(son, true) end end end ) bindKey('F4','down', function() if guiGetVisible(wnd) then guiSetVisible(wnd,false) showCursor(false) else guiSetVisible(wnd,true) showCursor(true) end end ) كذا صح؟
  22. شباب انا سويت مود اغاني فيه الازرار التالية اغلاق اعادة تشغيل ايقاف ايقاف مؤقت local s1 = "sn/club3.mp3" wnd = guiCreateWindow(200, 169, 599, 487, "لوحة الاغاني", false) stop = guiCreateButton(247, 40, 113, 39, "ايقاف", false, wnd) close = guiCreateButton(404, 40, 113, 39, "X", false, wnd) restart = guiCreateButton(84, 40, 113, 39, "اعادة تشغيل", false, wnd) song1 = guiCreateButton(84, 230, 113, 39, "Midnight clup3", false, wnd) guiSetFont(GUIEditor.button[4], "default-bold-small") stoptime = guiCreateButton(247, 230, 113, 39, "ايقاف مؤقت", false, wnd) guiSetVisible(wnd,false) addEventHandler("onClientGUIClick",guiRoot,function(player) local 111 = playSound(s1) if source == stop then if (111 == true) then stopSound(s1) outputChatBox("تم ايقاف الاغنية", player, 0, 255, 0) elseif (111 == false) then outputChatBox("لاتوجد اغنية قيد التشغيل", player, 0, 255, 0) end end end ) addEventHandler("onClientGUIClick",guiRoot,function() if source == close then guiSetVisible(wnd,false) showCursor(false) end end ) addEventHandler("onClientGUIClick",guiRoot,function(player) local 111 = playSound(s1) if source == restart then if (111 == true) then stopSound(s1) playSound(s1) outputChatBox("لقد تم اعادة تشغيل الاغنية", player, 0, 255, 0) elseif (111 == false) then outputChatBox("لاتوجد اغنية قيد التشغيل", player, 0, 255, 0) end end end ) addEventHandler("onClientGUIClick",guiRoot,function(player) local 111 = playSound(s1) if source == song1 then if (111 == true) then outputChatBox("لقد بدئت اغنية clup3 ", player, 0, 255, 0) elseif (111 == false) then outputChatBox("هذه الاغنية قيد التشغيل ", player, 0, 255, 0) end end end ) addEventHandler("onClientGUIClick",guiRoot,function(player) local 111 = playSound(s1) local pause = isSoundPaused(111) if source == stoptime then if (pause == true) then outputChatBox("لقد تم ايقاف الموسيقى ايقاف مؤقت من قبل", player, 0, 255, 0) elseif (pause == true) then outputChatBox("الموسيقى تم ايقفها ايقاف مؤقت", player, 0, 255, 0) end end end ) bindKey('F4','down', function() if guiGetVisible(wnd) then guiSetVisible(wnd,false) showCursor(false) else guiSetVisible(wnd,true) showCursor(true) end end ) الكود موراضي يشتغل اتمنى فهمتوني
×
×
  • Create New...