orcun99 Posted May 29, 2014 Share Posted May 29, 2014 function repairPlayerVehicle(vehicleID) if vehicleID and tonumber(vehicleID) then vehicleID = tonumber(vehicleID) local dataQuery = executeSQLQuery("SELECT * FROM `personalvehicles` WHERE `id` = ?", vehicleID) if #dataQuery == 1 then local vehicleData = dataQuery[1] if not getElementByID("personalVehicle"..vehicleID) then local damage = 100 - tonumber(vehicleData['health']) local price = damage * 50 local missingFuel = 100 - tonumber(vehicleData['fuel']) local fuelPrice = missingFuel * 10 local price = fuelPrice + price if price > 0 then if price <= tonumber(getElementData(source, "money")) then takePlayerMoney(source, price) local query = executeSQLQuery("UPDATE `personalvehicles` SET `health`=100, `fuel`=100 WHERE `id`=?", vehicleID) if query then triggerClientEvent(source, "clientRefreshVehicles", root, getVehicles(source)) exports.ORCcommands:sendMessage("Vehicle repaired successfully.", 0, 255, 0, source) else givePlayerMoney(source, price) exports.ORCcommands:sendMessage("An error occured. Please contact an HQ admin with error code PV2.", 0, 255, 0, source) end else exports.ORCcommands:sendMessage("Yeterince Paran yok fakir.", 255, 255, 0, source) end else exports.ORCcommands:sendMessage("Vehicle doesn't need repairs.", 255, 255, 0, source) triggerClientEvent(source, "clientRefreshVehicles", root, getVehicles(source)) end else exports.ORCcommands:sendMessage("Vehicle needs to be parked to be repaired.", 255, 255, 0, source) triggerClientEvent(source, "clientRefreshVehicles", root, getVehicles(source)) end else exports.ORCcommands:sendMessage("Vehicle could not be found in vehicle database!", 255, 255, 0, source) triggerClientEvent(source, "clientRefreshVehicles", root, getVehicles(source)) end end end addEvent("onPlayerRepairVehicle", true) addEventHandler("onPlayerRepairVehicle", root, repairPlayerVehicle) Repair does not fix the pressure button please help Link to comment
Castillo Posted May 30, 2014 Share Posted May 30, 2014 You should ask the person who sold you the script. Link to comment
Cadell Posted May 31, 2014 Share Posted May 31, 2014 lol he posting leaked script for fixing Link to comment
orcun99 Posted May 31, 2014 Author Share Posted May 31, 2014 Error: can not be repaired vehicle repair key pressure In this script for me that people have the same problem I was hoping you can fix Link to comment
orcun99 Posted June 1, 2014 Author Share Posted June 1, 2014 select the tool buttons in repair of pressure to go into the tray needs to be repaired, but nothing happens when pressing the buttons in repair Link to comment
Karuzo Posted June 1, 2014 Share Posted June 1, 2014 select the tool buttons in repair of pressure to go into the tray needs to be repaired, but nothing happens when pressing the buttons in repair Debug errors? Link to comment
orcun99 Posted June 19, 2014 Author Share Posted June 19, 2014 ERROR: Ohousing/housing_vehicles_server.lua:157: attempt to compare number with nil 157: if price <= tonumber(getElementData(source, "money")) then Link to comment
xXMADEXx Posted June 19, 2014 Share Posted June 19, 2014 ERROR: Ohousing/housing_vehicles_server.lua:157: attempt to compare number with nil157: if price <= tonumber(getElementData(source, "money")) then Replace that with this: if ( price <= getPlayerMoney ( source ) ) then Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now