Jump to content

Search the Community

Showing results for tags 'taxi'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 3 results

  1. Taksi Scripti Mta -- MTA SA Script Reappersz -- İyi oyunlar. local workMarker = createMarker(-520.324, 2582.393, 52.414, "cylinder", 1.5, 252,0,255,50)--marker createBlipAttachedTo(workMarker, 12, 2, 255,0,0, 255, 0, 1000) --blip local rightWheeledCars = { [543] = true, -- arac [558] = true, -- arac [560] = true, -- arac [562] = true, -- arac [566] = true, -- arac [587] = true, -- arac } -- ========== PANEL ========== local scx1920, scy1080 = guiGetScreenSize() local scx1920, scy1080 = guiGetScreenSize() local GUI = { window = {}, label = {}, button = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() -- BUTONLAR local screenW, screenH = guiGetScreenSize() GUI.window.start = guiCreateStaticImage((screenW - 1340)/0.5,(screenH - 768)/0.5,1250,900, "image/ui.png", false) GUI.button.startWork = guiCreateButton(680, 370, 275, 60, "İşe Başla", false, GUI.window.start) GUI.button.closeStart = guiCreateButton(680, 450, 275, 60, "İptal", false, GUI.window.start) -- BUTONLAR GUI.window.finish = guiCreateStaticImage((screenW - 1340)/0.5,(screenH - 768)/0.5,1250,900, "image/ui.png", false) GUI.button.finishWork = guiCreateButton(680, 370, 275, 60, "İşi Bitir", false, GUI.window.finish) GUI.button.closeFinish = guiCreateButton(680, 450, 275, 60, "İptal", false, GUI.window.finish) guiSetVisible(GUI.window.start, false) guiSetVisible(GUI.window.finish, false) end) --- Kanka şimdi bu scripti sparrow türkçe yapmış felan hani sitesine bakmak istersen bir çok TÜRKÇE script mevcut : https://sparrow-mta.blogspot.com addEventHandler("onClientMarkerHit", workMarker, function(player, matchingDimension) if (player == localPlayer) and (matchingDimension) then local vehicle = getPedOccupiedVehicle(localPlayer) if (not vehicle) or (getPedOccupiedVehicleSeat(localPlayer) == 0) then triggerServerEvent("openWorkWindow", resourceRoot) end end end) --[[ addEventHandler("onClientMarkerLeave", workMarker, function(player) if (player == localPlayer) then hideWorkGUI() end end) ]] local vehicleToUse = false addEvent("showStartWorkGUI", true) addEventHandler("showStartWorkGUI", resourceRoot, function(vehicle) if not isElementWithinMarker(localPlayer, workMarker) then return end if (vehicle) then if isResourceRunning("car_system") then guiSetText(GUI.label.vehicle, "Bu aracı kullana bilirsin ("..exports.car_system:getVehicleModName(vehicle)..").") else guiSetText(GUI.label.vehicle, "Bu araç taksi.") end else guiSetText(GUI.label.vehicle, "Kendi aracınız yok ise kiralık bir araç temin edilecek.") end vehicleToUse = vehicle guiSetVisible(GUI.window.start, true) showCursor(true) end) addEvent("showFinishWorkGUI",true) addEventHandler("showFinishWorkGUI", resourceRoot, function(money) if not isElementWithinMarker(localPlayer, workMarker) then return end guiSetText(GUI.label.finishText, "\n\n\n\nTaksi şöförlüğü işini bitirmeden önce, bu parayı ödemelisin "..tostring(money).." $.") guiSetVisible(GUI.window.finish, true) showCursor(true) end) addEventHandler("onClientGUIClick", resourceRoot, function() if (source == GUI.button.closeStart) or (source == GUI.button.closeFinish) then hideWorkGUI() elseif (source == GUI.button.startWork) then if (getElementDimension(localPlayer) ~= 0) or (getElementInterior(localPlayer) ~= 0) then return end if isResourceRunning("car_driving_school") and (not exports.car_driving_school:doesPlayerHaveLic(localPlayer, "car")) then exports.car_driving_school:outputNoLicenseClient("car") return end triggerServerEvent("startTaxiJob", resourceRoot, vehicleToUse) hideWorkGUI() elseif (source == GUI.button.finishWork) then triggerServerEvent("finishTaxiJob", resourceRoot) hideWorkGUI() end end) function hideWorkGUI() guiSetVisible(GUI.window.start, false) guiSetVisible(GUI.window.finish, false) showCursor(false) vehicleToUse = false end -- ========== Получение нового заказа и создание маркеров ========== addEventHandler("onClientPedDamage", resourceRoot, cancelEvent) local currentPed, currentPoint local sourceMarker, rotateMarker, jobBlip, destinationMarker addEvent("createSourceMarker", true) addEventHandler("createSourceMarker", resourceRoot, function(point, ped) removePedPickupElements() currentPoint = point currentPed = ped sourceMarker = createMarker(point[1], point[2], point[3], "cylinder", 2, 100,100,0,200) rotateMarker = createMarker(point[4], point[5], point[6], "cylinder", 30, 0,0,0,0) jobBlip = createBlipAttachedTo(sourceMarker, 56, 2, 255, 0, 0, 255, 32767, 65535) outputTaxiMessage("Yeni müşteri haritada sarı nokta ile gösterilir.") end) function removePedPickupElements() currentPed = false currentPoint = false if isElement(sourceMarker) then destroyElement(sourceMarker) end if isElement(rotateMarker) then destroyElement(rotateMarker) end if isElement(jobBlip) then destroyElement(jobBlip) end sourceMarker = false rotateMarker = false jobBlip = false end -- ========== Обновление поворота педа при подъезде машины ========== addEventHandler("onClientMarkerHit", resourceRoot, function(player, matchingDimension) if (player == localPlayer) and (source == rotateMarker) and (matchingDimension) then addEventHandlerNoWarnings("onClientRender", root, updatePedRotation) end end) addEventHandler("onClientMarkerLeave", resourceRoot, function(player, matchingDimension) if (player == localPlayer) and (source == rotateMarker) and (matchingDimension) then removeEventHandlerNoWarnings("onClientRender", root, updatePedRotation) end end) function updatePedRotation() if not isElement(currentPed) then removeEventHandlerNoWarnings("onClientRender", root, updatePedRotation) end local vehicle = getPedOccupiedVehicle(localPlayer) if (not vehicle) then return end local pedX, pedY, _ = getElementPosition(currentPed) local carX, carY, _ = getElementPosition(vehicle) setElementRotation(currentPed, 0, 0, getRotationFromVec2D(carX-pedX, carY-pedY), "default", true) end -- ========== Ожидание остановки машины при заезде на маркер ========== local pickupStopTimer, dropStopTimer addEventHandler("onClientMarkerHit", resourceRoot, function(player, matchingDimension) if (player == localPlayer) and (matchingDimension) and (source==sourceMarker or source==destinationMarker) then local _, _, mZ = getElementPosition(source) local _, _, pZ = getElementPosition(localPlayer) if (pZ-mZ < 5) and (pZ-mZ > -1) then if (source == sourceMarker) then if isTimer(pickupStopTimer) then killTimer(pickupStopTimer) end pickupStopTimer = setTimer(waitingForPickupStop, 100, 1) else if isTimer(dropStopTimer) then killTimer(dropStopTimer) end dropStopTimer = setTimer(waitingForDropStop, 100, 1) end end end end) addEventHandler("onClientMarkerLeave", resourceRoot, function(player, matchingDimension) if (player == localPlayer) and (matchingDimension) and (source==sourceMarker or source==destinationMarker) then if isTimer(pickupStopTimer) then killTimer(pickupStopTimer) end if isTimer(dropStopTimer) then killTimer(dropStopTimer) end if getPedOccupiedVehicle(localPlayer) then outputTaxiMessage("Aracı bölgede durdur.") end end end) function waitingForPickupStop() local vehicle = getPedOccupiedVehicle(localPlayer) if (not vehicle) then return end local spX, spY, spZ = getElementVelocity(vehicle) local speed = math.floor(math.sqrt(spX^2 + spY^2 + spZ^2)*180) if (speed < 5) then antiDOSsend("pedPickup", 1000, "startPedPickup", resourceRoot) else pickupStopTimer = setTimer(waitingForPickupStop, 100, 1) end end -- ========== Подход педа к машине и посадка ========== local pos = { [0] = {name = "door_lf_dummy"}, [1] = {name = "door_rf_dummy"}, [2] = {name = "door_lr_dummy"}, [3] = {name = "door_rr_dummy"}, } local animVehicle, animPed, animSeat local doorTimer, resettingDoorTimer addEvent("putPedInVehicle",true) addEventHandler("putPedInVehicle", resourceRoot, function(vehicle, ped) if not isElement(vehicle) or not isElement(ped) then return end removeEventHandlerNoWarnings("onClientRender", root, updatePedRotation) removePedPickupElements() local pedX, pedY, _ = getElementPosition(ped) animVehicle, animPed = vehicle, ped for i = 0, #pos do local offX, offY = getDoorOffset(i, getElementRotation(vehicle)) pos.x, pos.y, pos.z = getVehicleComponentPosition(vehicle, pos.name, "world") if (pos.x) then pos.x = pos.x + offX pos.y = pos.y + offY end end if pos[3].x and (getVehicleMaxPassengers(vehicle) > 1) then if getDistanceBetweenPoints2D(pedX, pedY, pos[3].x, pos[3].y) < getDistanceBetweenPoints2D(pedX, pedY, pos[2].x, pos[2].y) then animSeat = 3 else animSeat = 2 end else if (rightWheeledCars[getElementModel(vehicle)]) then animSeat = 0 else animSeat = 1 end end setPedAnalogControlState(ped, "forwards", 0.5) if isTimer(doorTimer) then killTimer(doorTimer) end doorTimer = setTimer(waitForDoor, 100, 1) if isTimer(resettingDoorTimer) then killTimer(resettingDoorTimer) end resettingDoorTimer = setTimer(resetWaitForDoor, 10000, 1) end) function waitForDoor() local pedX, pedY, pedZ = getElementPosition(animPed) local offX, offY = getDoorOffset(animSeat, getElementRotation(animVehicle)) pos[animSeat].x, pos[animSeat].y, _ = getVehicleComponentPosition(animVehicle, pos[animSeat].name, "world") pos[animSeat].x = pos[animSeat].x + offX pos[animSeat].y = pos[animSeat].y + offY if (getDistanceBetweenPoints2D(pos[animSeat].x, pos[animSeat].y, pedX, pedY) > 0.5) then setElementRotation(animPed, 0, 0, getRotationFromVec2D(pos[animSeat].x-pedX, pos[animSeat].y-pedY), "default", true) doorTimer = setTimer(waitForDoor, 100, 1) else if isTimer(resettingDoorTimer) then killTimer(resettingDoorTimer) end setPedAnalogControlState(animPed, "forwards", 0) attachAndAnimate1() end end function resetWaitForDoor() if isTimer(doorTimer) then killTimer(doorTimer) end setPedAnalogControlState(animPed, "forwards", 0) attachAndAnimate1() end local animPedZShift function attachAndAnimate1() local vehRotX, vehRotY, vehRotZ = getElementRotation(animVehicle, "default") local offX, offY = getDoorOffset(animSeat) local _, _, worldZ = getVehicleComponentPosition(animVehicle, pos[animSeat].name, "world") local _, _, pedZ = getElementPosition(animPed) animPedZShift = pedZ - worldZ pos[animSeat].x, pos[animSeat].y, pos[animSeat].z = getVehicleComponentPosition(animVehicle, pos[animSeat].name, "root") pos[animSeat].x = pos[animSeat].x + offX pos[animSeat].y = pos[animSeat].y + offY pos[animSeat].z = pos[animSeat].z + animPedZShift setElementCollidableWith(animPed, animVehicle, false) attachElements(animPed, animVehicle, pos[animSeat].x, pos[animSeat].y, pos[animSeat].z, vehRotX, vehRotY, vehRotZ) setElementRotation(animPed, vehRotX, vehRotY, vehRotZ) local animation = (animSeat%2 == 1) and "CAR_open_RHS" or "CAR_open_LHS" setPedAnimation(animPed, "ped", animation, -1, false, false, false, true) setTimer(function(v,s) setVehicleDoorOpenRatio(v, s, 1, 300) end, 500, 1, animVehicle, animSeat+2) setTimer(animate2, 1000, 1) end function animate2() local animation = (animSeat%2 == 1) and "CAR_getin_RHS" or "CAR_getin_LHS" setPedAnimation(animPed, "ped", animation, -1, false, false, false, true) setTimer(animate3, 1000, 1) end function animate3() local animation = (animSeat%2 == 1) and "CAR_closedoor_RHS" or "CAR_closedoor_LHS" setPedAnimation(animPed, "ped", animation, -1, false, false, false, true) setTimer(function(v,s) setVehicleDoorOpenRatio(v, s, 0, 200) end, 300, 1, animVehicle, animSeat+2) setTimer(function(event, rootElement, vehicle, seat) triggerServerEvent(event, rootElement, vehicle, seat) end, 500, 1, "pedPutIntoVehicle", resourceRoot, animVehicle, animSeat) end -- ========== Создание точки назначения ========== addEvent("createDestinationMarker", true) addEventHandler("createDestinationMarker", resourceRoot, function(point) removePedDropElements() currentPoint = point destinationMarker = createMarker(point[1], point[2], point[3], "cylinder", 2, 100,100,0,200) jobBlip = createBlipAttachedTo(destinationMarker, 56, 2, 255, 0, 0, 255, 32767, 65535) end) function removePedDropElements() currentPoint = false if isElement(destinationMarker) then destroyElement(destinationMarker) end if isElement(jobBlip) then destroyElement(jobBlip) end destinationMarker = false jobBlip = false end -- ========== Ожидание остановки машины при заезде на маркер окончания ========== function waitingForDropStop() local vehicle = getPedOccupiedVehicle(localPlayer) if (not vehicle) then return end local spX, spY, spZ = getElementVelocity(vehicle) local speed = math.floor(math.sqrt(spX^2 + spY^2 + spZ^2)*180) if (speed < 5) then antiDOSsend("pedDrop", 1000, "startPedDrop", resourceRoot) else dropStopTimer = setTimer(waitingForDropStop, 100, 1) end end -- ========== Выход педа из машины и исчезновение ========== addEvent("extractPedFromVehicle",true) addEventHandler("extractPedFromVehicle", resourceRoot, function(vehicle, ped, seat) removePedDropElements() if (seat == 1) and (rightWheeledCars[getElementModel(vehicle)]) then seat = 0 end animVehicle, animPed, animSeat = vehicle, ped, seat local vehRotX, vehRotY, vehRotZ = getElementRotation(vehicle, "default") local offX, offY = getDoorOffset(seat) pos[seat].x, pos[seat].y, pos[seat].z = getVehicleComponentPosition(vehicle, pos[seat].name, "root") pos[seat].x = pos[seat].x + offX pos[seat].y = pos[seat].y + offY pos[seat].z = pos[seat].z + animPedZShift setElementCollidableWith(ped, vehicle, false) attachElements(ped, vehicle, pos[seat].x, pos[seat].y, pos[seat].z-10, vehRotX, vehRotY, vehRotZ) setElementRotation(ped, vehRotX, vehRotY, vehRotZ) local animation = (seat%2 == 1) and "CAR_getout_RHS" or "CAR_getout_LHS" setPedAnimation(ped, "ped", animation, -1, false, false, false, true) setTimer(function(v,s) setVehicleDoorOpenRatio(v, s, 1, 300) end, 150, 1, vehicle, seat+2) setTimer(function(p, v, x, y, z, rX, rY, rZ) attachElements(p, v, x, y, z, rX, rY, rZ) end, 200, 1, ped, vehicle, pos[seat].x, pos[seat].y, pos[seat].z, vehRotX, vehRotY, vehRotZ) setTimer(closeDoor, 900, 1) end) function closeDoor() local animation = (animSeat%2 == 1) and "CAR_close_RHS" or "CAR_close_LHS" setPedAnimation(animPed, "ped", animation, -1, false, false, false, true) setTimer(function(v,s) setVehicleDoorOpenRatio(v, s, 0, 300 ) end, 150, 1, animVehicle, animSeat+2) setTimer(startWalkOut, 900, 1) end local pedAlpha function startWalkOut() local _, _, vehRotZ = getElementRotation(animVehicle, "default") detachElements(animPed) setPedAnimation(animPed) setElementCollidableWith(animPed, animVehicle, true) setPedAnalogControlState(animPed, "forwards", 0.5) setElementRotation(animPed, 0, 0, (animSeat%2 == 1) and (vehRotZ-90) or (vehRotZ+90), "default", true) pedAlpha = 255 addEventHandler("onClientRender", root, vanishPed) triggerServerEvent("pedDropped", resourceRoot, animVehicle) end function vanishPed() pedAlpha = pedAlpha-1 if isElement(animPed) then setElementAlpha(animPed, pedAlpha) end if (pedAlpha == 0) or (not isElement(animPed)) then removeEventHandler("onClientRender", root, vanishPed) triggerServerEvent("killVanishedPed", resourceRoot) end end -- ========== Очистка всей инфы о работе ========== addEvent("deleteAllObjects", true) addEventHandler("deleteAllObjects", resourceRoot, function() currentPed = false currentPoint = false if isElement(sourceMarker) then destroyElement(sourceMarker) end if isElement(rotateMarker) then destroyElement(rotateMarker) end if isElement(jobBlip) then destroyElement(jobBlip) end if isElement(destinationMarker) then destroyElement(destinationMarker) end if isTimer(pickupStopTimer) then killTimer(pickupStopTimer) end if isTimer(dropStopTimer) then killTimer(dropStopTimer) end animVehicle = false animPed = false animSeat = false if isTimer(doorTimer) then killTimer(doorTimer) end if isTimer(resettingDoorTimer) then killTimer(resettingDoorTimer) end end) -- ========== Мелкие вспомогательные функции ========== -- Получить смещение педа относительно дверной петли function getDoorOffset(seat, _, _, rotZ) local Xshift, Yshift = 0.5, -1.25 if (tonumber(seat)%2 == 0) then Xshift = -Xshift end if (rotZ) then rotZ = math.rad(rotZ) return Xshift*math.cos(rotZ)-Yshift*math.sin(rotZ), Xshift*math.sin(rotZ)+Yshift*math.cos(rotZ) else return Xshift, Yshift end end -- Получить угол наклона вектора function getRotationFromVec2D(x, y) local a = math.deg(math.acos(y/((x^2+y^2)^0.5))) return (x < 0) and (a) or (-a) end -- Сообщения от имени такси function outputTaxiMessage(text) outputChatBox("[TAKSİ] #FFFFFF"..text, 227, 173, 0, true) end -- Убирание ошибки при добавлении/убирании эвента function addEventHandlerNoWarnings(eventName, element, func) for _, attachedFunc in ipairs(getEventHandlers(eventName, element)) do if (attachedFunc == func) then return end end addEventHandler(eventName, element, func) end function removeEventHandlerNoWarnings(eventName, element, func) for _, attachedFunc in ipairs(getEventHandlers(eventName, element)) do if (attachedFunc == func) then removeEventHandler(eventName, element, func) end end end -- Проверка, что ресурс запущен function isResourceRunning(resName) local res = getResourceFromName(resName) return (res) and (getResourceState(res) == "running") end -- ========== Слоумод на кнопку/действие ========== local sendData = {} local sendTimers = {} function antiDOSsend(actionGroup, pause, ...) local args = {...} if isTimer(sendTimers[actionGroup]) then sendData[actionGroup] = args[1] and args else if (args[1]) then triggerServerEvent(...) sendData[actionGroup] = false sendTimers[actionGroup] = setTimer(slowSend, pause, 1, actionGroup) end end end function slowSend(actionGroup) if (sendData[actionGroup]) then triggerServerEvent(unpack(sendData[actionGroup])) sendData[actionGroup] = nil end end --[[ addEventHandler("onClientPreRender",root, function () if animPed and isElement(animPed) then local block, animation = getPedAnimation(animPed) dxDrawText ( "CURRENT ANIMATION INFO...", 500, 300 ) if not block then block = "N/A" end if not animation then animation = "N/A" end dxDrawText ( "Block = "..block.." Animation = "..animation, 500, 315 ) end end ) ]] --[[ addEventHandler ( "onClientRender", root, function() if isPedInVehicle ( localPlayer ) and getPedOccupiedVehicle ( localPlayer ) then local veh = getPedOccupiedVehicle ( localPlayer ) for v in pairs ( getVehicleComponents(veh) ) do local x,y,z = getVehicleComponentPosition ( veh, v, "world" ) if x then local wx,wy,wz = getScreenFromWorldPosition ( x, y, z ) if wx and wy then dxDrawText ( v, wx -1, wy -1, 0 -1, 0 -1, tocolor(0,0,0), 1, "default-bold" ) dxDrawText ( v, wx +1, wy -1, 0 +1, 0 -1, tocolor(0,0,0), 1, "default-bold" ) dxDrawText ( v, wx -1, wy +1, 0 -1, 0 +1, tocolor(0,0,0), 1, "default-bold" ) dxDrawText ( v, wx +1, wy +1, 0 +1, 0 +1, tocolor(0,0,0), 1, "default-bold" ) dxDrawText ( v, wx, wy, 0, 0, tocolor(0,255,255), 1, "default-bold" ) end end end end end) ]]
  2. كيف حالكم عساكم بخير , مثل ماهو معروض بعنوان الموضوع للبيع سكربت اوبر للي مايعرف وش اوبر , تطلب سيارة وتختار مكان ويجي شخص يوصلك للمكان الي اخترته الي انا سويته خليت بيد تلقائي يجي يوصلك للمكان الي تبغاه طبعا هذا اول سكربت اعرضه للبيع تفتحلك لوحة وفيها الاماكن وانت تضيف الاماكن والسعر بيكون على حسب بعدك عن المكان الي تبي تروح له سعر الميل انا حاطه 2 ويمديك تغيره بس تشتري السكربت , الاماكن القريبة لك ماراح تظهر لازم يكون بعدك 150 عن المكان عشان يظهر هذا الحد الادنى وطبعا تقدر تغير البعد تقدر تخلي السكربت يفتح من زر وتقدر تخليه يفتح من امر من اف8 صور من السكربت طبعا في حال استعجالك عشان تروح للمكان تضغط انتر وراح ينتقلك للمكان الي تبيه بثانية الخصائص الموجودة بالسكربت ولو يتبرع واحد من الشباب يسوي فديو ويحطه بأكون شاكر له الي يبي يجرب السكربت وياخذ صورة اوضح منه يخش السيرفر mtasa://178.32.99.229:22222 uber او اكتب باف8 m طبعا بس تخش راح يعطيك فلوس واضغط حرف حاب اقولك ماخذت من السكربت الا احداثيات الطرق traffic وجرب لين تقتنع , الي يجي يسوي نفسه محقق كونان ويقول نسخ لصق من سكربت السكربت يحتوي على ملفين كلينت وسيرفر وملف احداثيات الطرق مثل ماذكرت فوق التحميل حق السكربت قليل مره لان احداثيات الطرق سيرفر واغلب الشغل على السيرفر والمعروف ان ملفات السيرفر ماتتحمل على جهاز الاعب الكلينت عليه اللوحة وبعض الامور البسيطة , السكربت مبرمج بأفضل الطرق ومافيه ولا بق ان شاء الله والحين نجي للسعر صراحة انا معطيه سعر مو من حقه مقارنة بالسكربت ومواصفاته السعر بالريال السعودي : 100 السعر بالدولار الامريكي : 26 طرق الدفع واول 3 اشخاص يشترون السكربت بيحصلون على الاصدار الثاني من السكربت مجانا الاصدار الثاني بيكون مختلف جذريا والسعر راح يكون اغلى من هذا واتمنى مايكون فيه ردود خارجا عن صياغ الموضوع واي استفسار بخصوص السكربت حط ردك : طرق التواصل معي وهذا وصل الله وسلم على نبينا محمد
  3. Estou precisando de alguem que tenha a bondade de me ensinar um pouco sobre uma função que quero realizar, tenho um script aqui no qual ele cria uma tag chamada TAXISTAS e quando o player é adicionado nesse grupo, ao entrar no taxi ele vira taxista, onde o player que precisar do serviço vai digitar /taxi pra pedir um. porem o script ta muito manual, eu queria APRENDER a como fazer um sistema parecido com um que tenho rodando no meu servidor ( entregador de rosquinha ) nesse trabalho de entregador o palyer ao entrar no circulo vermlhho é teleportado pra dentro de um caminhao pra fazer a entrega em determinado ponto, caso o player saia do caminhão, o veiculo some automaticamente e ele perde o trabalho tendo que voltar la novamente. Resumindo: Oque eu queria era aprender como faz esse teleporte pra dentro de um veiculo (no caso o taxi) e ao teleportar ele já entrar automaticamente na "TEAM" Taxista na qual o script gera. e ao sair do taxi o veiculo some e caso queria trabalhar de taxista tera que voltar la no local pra pegar um novo taxi -- by manawydan taxi_system lado = server local PrecoTaxi = "1000" local BlipsTaxi = {} addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function() if not TimeTaxi then TimeTaxi = createTeam("Taxistas",20,100,20) end end) function PedirTaxi(thePlayer) if (getElementData(thePlayer,"TaxiClient")) then return end --else if (getPlayerMoney(thePlayer) >= tonumber(PrecoTaxi)) then setElementData(thePlayer,"TaxiClient",true) BlipsTaxi[thePlayer] = createBlipAttachedTo(thePlayer,0,2,0,0,250,210) JogadoresTaxistaTabela(thePlayer) outputChatBox("[Taxi]: Taxi logo chegara, por favor aguarde",thePlayer) end end addCommandHandler("taxi",PedirTaxi) function JogadoresTaxistaTabela(Player) local Jogadores = getElementsByType("player") for _,Jogad in ipairs(Jogadores) do if (getElementData(Jogad,"Taxista")) and (getElementData(Jogad,"TaxistaStat") == vazio) and getPlayerTeam(Jogad) == getTeamFromName("Taxistas") then local NomeTaxiClient = getPlayerName(Player) outputChatBox("Taxi solicitado por: "..NomeTaxiClient,Jogad) end end end function TaxiSystemEntrarNoTaxi(Carro,assento,jacked) if not (getElementModel(Carro) == 420) then return end if not (getElementData(source,"TaxiClient")) then return end if not (assento == 0) then local Taxista = getVehicleController(Carro) if Taxista and getElementData(Taxista,"Taxista") and (getPlayerTeam(Taxista) == getTeamFromName("Taxistas")) then destroyElement(BlipsTaxi[source]) setElementData(Taxista,"TaxistaStat",ocupado) end end end addEventHandler ("onPlayerVehicleEnter",getRootElement(),TaxiSystemEntrarNoTaxi) -- function TaxiSystemSairTaxi(Carro,assento,jacked) if not (getElementModel(Carro) == 420) then return end if not (getElementData(source,"TaxiClient")) then return end if not (assento == 0) then local Taxista = getVehicleController(Carro) if Taxista and getElementData(Taxista,"Taxista") and (getPlayerTeam(Taxista) == getTeamFromName("Taxistas")) then removeElementData(source,"TaxiClient") setElementData(Taxista,"TaxistaStat",vazio) takePlayerMoney(source,tonumber(PrecoTaxi)) givePlayerMoney(Taxista,tonumber(PrecoTaxi)) end end end addEventHandler ("onPlayerVehicleExit",getRootElement(),TaxiSystemSairTaxi) function TaxistaSer(Carro,assento,jacked) if not (getElementModel(Carro) == 420) then return end if (getElementData(source,"Taxista")) then return end --not if (getPlayerTeam(source) == getTeamFromName("Taxistas")) then if (assento == 0) then setElementData(source,"Taxista",true) setElementData(source,"TaxistaStat",vazio) outputChatBox("[Taxi]: Você agora é um taxista, fique atento para não perder cliente",source) end end end addEventHandler ("onPlayerVehicleEnter",getRootElement(),TaxistaSer) esse codigo aqui é o do entregador dee rosquinha que ja tenho no servidor rodando 100% Minicio4 = createMarker (1038.02332, -1337.93970, 13.72656 -1, "cylinder", 2, 255 ,0 ,0, 255) blip1 = createBlip(1032.4301757813,-1337.6319580078,13.7265625,42,4,0,0,0,0,0,200) Mfim4 = createMarker ( 2818.73046875, -1088.7072753906, 30.735580444336 -1, "cylinder", 2, 0 ,255 ,0, 255) Bfim4 = createBlipAttachedTo ( Mfim4, 19 ) setElementVisibleTo ( Bfim4, root, false ) veh = {} function incio4 (source) if isElementWithinMarker(source, Minicio4) then if veh[source] and isElement( veh[source] ) then destroyElement ( veh[source] ) veh[source] = nil end x,y,z = getElementPosition(source) Trabalho = true veh[source] = createVehicle(498,1009.50598, -1355.16431, 13.34428) setElementVisibleTo ( Bfim4, source, true ) warpPedIntoVehicle ( source, veh[source] ) outputChatBox ("#D3D3D3[Trabalho] #00FF7FVocê agora é um entregador de rosquinhas",source,0,0,0,true ) outputChatBox ("#D3D3D3[Trabalho] #00FF7FLeve o carregamento de rosquinhas até a bandeira vermelha no mapa",source,0,0,0,true ) outputChatBox ("#D3D3D3[Trabalho] #00FF7FVa até la com o veiculo caso saia dele perdera o trabalho",source,0,0,0,true ) end end addEventHandler( "onMarkerHit", Minicio4, incio4 ) function fim4 (source) if veh[source] and isElement(veh[source]) then destroyElement (veh[source]) givePlayerMoney(source,10000) -------------- Caso queira mudar o dinheiro que o player vai ganhar ao finalizar o trabalho setElementVisibleTo ( Bfim4, source, false ) outputChatBox("#D3D3D3[Trabalho] #00BFFFBom trabalho você entregou as rosquinhas e ganhou: #00FF0010000 $$",source,0,0,0,true) outputChatBox("#D3D3D3Trabalho de entregador By : #F0FFFF[L]ost",source,0,0,0,true) else end end addEventHandler("onMarkerHit",Mfim4 ,fim4) function sair4 (source) if (veh[source]) and isElement(veh[source]) then setElementVisibleTo ( Bfim4, source, false ) destroyElement (veh[source]) outputChatBox("#FF4040[Desistiu] Você saiu do veiculo e perdeu o trabalho ", source ,0,0,0,true) else end end addEventHandler ( "onVehicleExit", getRootElement(), sair4 )
×
×
  • Create New...