Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tamirKordinat1 = createColSphere (2064.0107421875, -1831.5400390625, 13.546875, 4)
- local tamirKordinat2 = createColSphere (1911.21484375, -1776.421875, 13.40468788147, 4)
- local tamirKordinat3 = createColSphere (1017.654296875, -917.7080078125, 42.1796875, 3)
- armoredCars = { [427]=true, [528]=true, [432]=true, [601]=true, [428]=true } -- Enforcer, FBI Truck, Rhino, SWAT Tank, Securicar
- function tamirColShape(thePlayer, seat)
- if isElementWithinColShape(thePlayer, tamirKordinat1) or isElementWithinColShape(thePlayer, tamirKordinat2) or isElementWithinColShape(thePlayer, tamirKordinat3) then
- if getPedOccupiedVehicle(thePlayer) or seat == 0 then
- local para = exports.global:getMoney(thePlayer)
- local theVeh = getPedOccupiedVehicle(thePlayer)
- if getElementData(theVeh, "engine") == 0 then
- if getElementData(thePlayer, "vipver") == 3 then
- setElementFrozen(theVeh, true)
- setVehicleLocked(theVeh, true)
- toggleAllControls(thePlayer, false, true, false)
- setElementData(thePlayer, "tamirKilit", 1)
- outputChatBox("[!] #ffffffAracınız tamir ediliyor, lütfen bekleyin (10sn).", thePlayer, 0, 0, 255, true)
- setTimer(
- function()
- outputChatBox("[!] #ffffffAracınız VIP 3 olduğunuz için ücretsiz tamir edilmiştir.", thePlayer, 0, 255, 0, true)
- setElementFrozen(theVeh, false)
- setVehicleLocked(theVeh, false)
- toggleAllControls(thePlayer, true)
- setElementData(thePlayer, "tamirKilit", 0)
- fixVehicle(theVeh)
- for i = 0, 5 do
- setVehicleDoorState(theVeh, i, 0)
- end
- setElementHealth(theVeh, 1000)
- if armoredCars[ getElementModel( theVeh ) ] then
- setVehicleDamageProof(theVeh, true)
- else
- setVehicleDamageProof(theVeh, false)
- end
- if (getElementData(theVeh, "Impounded") == 0) then
- exports.anticheat:changeProtectedElementDataEx(theVeh, "enginebroke", 0, false)
- end
- end
- , 10000, 1)
- else
- --[[local toplamHasar = getElementHealth(theVeh)
- if toplamHasar == 1000 then
- outputChatBox("[!] #ffffffAracınızda hasar bulunmamaktadır.", thePlayer, 0, 0, 255, true)
- return
- end]]--
- local toplamHasar = (1000 - getElementHealth(theVeh)) * 4
- if para >= toplamHasar then
- if getElementHealth(theVeh) == 1000 then
- outputChatBox("[!] #ffffffAracınızda hasar bulunmamaktadır.", thePlayer, 0, 0, 255, true)
- return
- end
- exports.global:takeMoney(thePlayer, toplamHasar)
- setElementFrozen(theVeh, true)
- setVehicleLocked(theVeh, true)
- toggleAllControls(thePlayer, false, true, false)
- setElementData(thePlayer, "tamirKilit", 1)
- outputChatBox("[!] #ffffffAracınız tamir ediliyor, lütfen bekleyin (10sn).", thePlayer, 0, 0, 255, true)
- outputChatBox("[!] #ffffffTamir masrafınız: ".. toplamHasar .."$", thePlayer, 0, 0, 255, true)
- setTimer(
- function()
- outputChatBox("[!] #ffffffAracınız başarıyla tamir edilmiştir.", thePlayer, 0, 255, 0, true)
- setElementFrozen(theVeh, false)
- setVehicleLocked(theVeh, false)
- toggleAllControls(thePlayer, true)
- setElementData(thePlayer, "tamirKilit", 0)
- fixVehicle(theVeh)
- for i = 0, 5 do
- setVehicleDoorState(theVeh, i, 0)
- end
- setElementHealth(theVeh, 1000)
- if armoredCars[ getElementModel( theVeh ) ] then
- setVehicleDamageProof(theVeh, true)
- else
- setVehicleDamageProof(theVeh, false)
- end
- if (getElementData(theVeh, "Impounded") == 0) then
- exports.anticheat:changeProtectedElementDataEx(theVeh, "enginebroke", 0, false)
- end
- end
- , 10000, 1)
- else
- outputChatBox("[!] #ffffffBu işlemi yapabilmek için 1000$'a ihtiyacın var.", thePlayer, 255, 0, 0, true)
- end
- end
- else
- outputChatBox("[!] #ffffffBu işlemi yapabilmek için aracınızın motoru kapalı olmalıdır.", thePlayer, 255, 0, 0, true)
- end
- else
- outputChatBox("[!] #ffffffAracın içinde ve şoför koltuğunda olmalısınız.", thePlayer, 255, 0, 0, true)
- end
- end
- end
- addCommandHandler("tamir", tamirColShape)
- --------------------------------------------------------------------------------------------------------------------------------------------------
- function findProperty(thePlayer, dimension)
- local dbid = dimension or (thePlayer and getElementDimension( thePlayer ) or 0)
- if dbid and tonumber(dbid) and tonumber(dbid) > 0 then
- dbid = tonumber(dbid)
- local foundInterior = exports.pool:getElement("interior", dbid)
- if foundInterior then
- local interiorEntrance = getElementData(foundInterior, "entrance")
- local interiorExit = getElementData(foundInterior, "exit")
- local interiorStatus = getElementData(foundInterior, "status")
- return dbid, interiorEntrance, interiorExit, interiorStatus[INTERIOR_TYPE], foundInterior
- end
- end
- return 0
- end
- local tamirhaneKordinat1 = createColSphere (538.12890625, 87.5283203125, 1044.474609375, 3)
- local mysql = exports.mysql
- function tamirColShape(thePlayer, seat)
- if isElementWithinColShape(thePlayer, tamirhaneKordinat1) then
- if getPedOccupiedVehicle(thePlayer) or seat == 0 then
- local para = exports.global:getMoney(thePlayer)
- local theVeh = getPedOccupiedVehicle(thePlayer)
- if getElementData(theVeh, "engine") == 0 then
- if para >= 50 then
- if getElementData(thePlayer, "tamirci") == 1 then
- if getElementData(thePlayer, "tamirciMeslek") == 1 then
- setElementFrozen(theVeh, true)
- setVehicleLocked(theVeh, true)
- toggleAllControls(thePlayer, false, true, false)
- setElementData(thePlayer, "tamirKilit", 1)
- setVehicleDamageProof(theVeh, false)
- outputChatBox("[!] #ffffffAracınız tamir ediliyor, lütfen bekleyin (10sn).", thePlayer, 0, 0, 255, true)
- setTimer(
- function()
- exports.global:takeMoney(thePlayer, 50)
- outputChatBox("[!] #ffffffAracınız başarıyla tamir edilmiştir.", thePlayer, 0, 255, 0, true)
- setElementFrozen(theVeh, false)
- setVehicleLocked(theVeh, false)
- toggleAllControls(thePlayer, true)
- setElementData(thePlayer, "tamirKilit", 0)
- --setVehicleDamageProof(theVeh, false)
- local success = setVehicleDamageProof(theVeh, false)
- if success then
- outputChatBox("kod çalışıyor", thePlayer)
- end
- fixVehicle(theVeh)
- exports.anticheat:changeProtectedElementDataEx(theVeh, "enginebroke", 0, false)
- for i = 0, 5 do
- setVehicleDoorState(theVeh, i, 0)
- end
- end
- , 10000, 1)
- else
- outputChatBox("[!] #ffffffTamirci mesleğinde iş başı yapmamışsınız.", thePlayer, 255, 0, 0, true)
- end
- else
- outputChatBox("[!] #ffffffTamirci değilsiniz.", thePlayer, 255, 0, 0, true)
- end
- else
- outputChatBox("[!] #ffffffBu işlemi yapabilmek için 100$'a ihtiyacın var.", thePlayer, 255, 0, 0, true)
- end
- else
- outputChatBox("[!] #ffffffBu işlemi yapabilmek için aracınızın motoru kapalı olmalıdır.", thePlayer, 255, 0, 0, true)
- end
- else
- outputChatBox("[!] #ffffffAracın içinde ve şoför koltuğunda olmalısınız.", thePlayer, 255, 0, 0, true)
- end
- end
- end
- addCommandHandler("tamir", tamirColShape)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement