Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --All credit to soundjester @ gta5-mods.com for getting us this far.
- local car ={}
- local function inTable(tbl, item)
- for key, value in pairs(tbl) do
- if value == item then return true end
- end
- return false
- end
- local function repairVeh(int)
- VEHICLE.SET_VEHICLE_FIXED(int)
- --Clean the car - dirtLvl = 0 (clean) to 15 (dirty)
- VEHICLE.SET_VEHICLE_DIRT_LEVEL(int, 0)
- --Lets make our car "not wanted" anymore as well
- VEHICLE.SET_VEHICLE_IS_WANTED(int, false)
- --Make sure we have bulletproof tyres
- VEHICLE.SET_VEHICLE_TYRES_CAN_BURST(veh, false)
- --Does this actually work? Tune in next week to find out!
- VEHICLE.SET_VEHICLE_CAN_BE_VISIBLY_DAMAGED(veh, false)
- return
- end
- function car.tick()
- local playerPed = PLAYER.PLAYER_PED_ID()
- local player = PLAYER.GET_PLAYER_PED(playerPed)
- local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)
- local myCar = PED.GET_VEHICLE_PED_IS_USING(player)
- if(playerExists) then
- if(PED.IS_PED_IN_ANY_VEHICLE(playerPed, false)) then
- local veh = PED.GET_VEHICLE_PED_IS_IN(playerPed,true)
- if(get_key_pressed(107))then
- --And apply the magic sauce...
- repairVeh(veh)
- local testmodule = {}
- end
- end
- end
- end
- return car
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement