hii there , i want to make this script work if the player have item id 49 , but how ... ?
Here is the script
function serviceVehicle(veh)
if (veh) then
local mechcost = 100000
if (getElementData(source,"faction")==16) then
mechcost = mechcost / btrdiscountratio
end
if not exports.global:takeMoney(source, mechcost) then
outputChatBox("Kamu tidak dapat membayar service ini.", source, 255, 0, 0)
else
local health = getElementHealth(veh)
if (health <= 850) then
health = health + 150
else
health = 1000
end
fixVehicle(veh)
setElementHealth(veh, health)
if not getElementData(veh, "Impounded") or getElementData(veh, "Impounded") == 0 then
exports['anticheat-system']:changeProtectedElementDataEx(veh, "enginebroke", 0, false)
if armoredCars[ getElementModel( veh ) ] then
setVehicleDamageProof(veh, true)
else
setVehicleDamageProof(veh, false)
end
end
exports.global:sendLocalMeAction(source, "memperbaiki kendaraan.")
exports.logs:dbLog(source, 31, { veh }, "REPAIR QUICK-SERVICE")
end
else
outputChatBox("Kamu harus berada di dalam kendaraan yang akan di perbaiki.", source, 255, 0, 0)
end
end
addEvent("serviceVehicle", true)
addEventHandler("serviceVehicle", getRootElement(), serviceVehicle)