[Release] No more NPC/parked vehicle stealing

made lockpick real quick xD

add into your vdkinv.lua


function DrawMissionText(m_text, showtime)
    ClearPrints()
	SetTextEntry_2("STRING")
	AddTextComponentString(m_text)
	DrawSubtitleTimed(showtime, 1)
end

function ShowNotification(text)
	SetNotificationTextEntry("STRING")
	AddTextComponentString(text)
	DrawNotification(false, false)
end

function use(item)
    if (ITEMS[item].quantity - 1 >= 0) then
        -- Nice var swap for nothing
        TriggerEvent("player:looseItem", item, 1)
        -- Calling the Hunger/Thirst
        if ITEMS[item].type == 2 then
            TriggerEvent("food:eat", ITEMS[item])
        elseif ITEMS[item].type == 1 then
            TriggerEvent("food:drink", ITEMS[item])
        elseif ITEMS[item].type == 3 then
            RepairVehicle()
	        elseif ITEMS[item].type == 4 then
            lockpick()

	        else
            -- Any other type? Drugs??????
            Toxicated()
            Citizen.Wait(3000)
            ClearPedTasks(GetPlayerPed(-1))
            Reality()
        end
    end
end


Citizen.CreateThread(function()
 
  -- Load the animation 
  RequestAnimDict("mini@repair")
  while not HasAnimDictLoaded("mini@repair") do
    Wait(1)
  end
end)

--------------------------------------------------------
function asd()
	  Citizen.Wait(5000)
			SetVehicleFixed(GetVehiclePedIsUsing(GetPlayerPed(-1)))
			SetVehicleDeformationFixed(GetVehiclePedIsUsing(GetPlayerPed(-1)))
			SetVehicleUndriveable(GetVehiclePedIsUsing(GetPlayerPed(-1)), false)
		    ShowNotification("~g~Vehicle is fully Repaired.")
end

function RepairVehicle()
		Citizen.CreateThread(function()
		local ply = GetPlayerPed(-1)
		local plyCoords = GetEntityCoords(ply, 0)
		veh = GetClosestVehicle(plyCoords["x"], plyCoords["y"], plyCoords["z"], 5.001, 0, 70)
		--ClearPedTasksImmediately(GetPlayerPed(-1))
	    --TaskStartScenarioInPlace(GetPlayerPed(-1), "WORLD_HUMAN_VEHICLE_MECHANIC", 0, true)  
        TaskPlayAnim(GetPlayerPed(-1),"mini@repair","fixing_a_player", 8.0, 0.0, -1, 1, 0, 0, 0, 0)		
	    Citizen.Wait(20000)
		SetVehicleFixed(veh, 1)
		SetVehicleDeformationFixed(veh, 1)
		SetVehicleUndriveable(veh, 1)
		ClearPedTasksImmediately(GetPlayerPed(-1))
	  --  ShowNotification("~g~Vehicle is fully Repaired~r~Turn on Engine via Vehicle Menu Key:M or select")
		DrawMissionText("~g~Vehicle is fully Repaired. ~y~Turn on Engine via Vehicle Menu Key:M or select", 30000)
	end)
end

function lockpick()
		Citizen.CreateThread(function()
		local ply = GetPlayerPed(-1)
		local plyCoords = GetEntityCoords(ply, 0)
		veh = GetClosestVehicle(plyCoords["x"], plyCoords["y"], plyCoords["z"], 5.001, 0, 70)
        TaskPlayAnim(GetPlayerPed(-1),"mini@repair","fixing_a_player", 8.0, 0.0, -1, 1, 0, 0, 0, 0)		
		--StartVehicleAlarm(veh)
		StartVehicleAlarm(vehicle)
		StartVehicleAlarm(veh)
	    Citizen.Wait(20000)
        SetVehicleDoorsLocked(veh, 1)
		ClearPedTasksImmediately(GetPlayerPed(-1))
	    --ShowNotification("~g~test")
		DrawMissionText("~y~You unlocked the vehicle", 15000)
		
	end)
end

add item id 19 value 0 type 3, for repair kit can use it on [Release] Car damage system
if u use car dmg better use the code of [Release] Car damage system
additem id 20 value 0 type 4 ,for lockpick into your db and if use gb_foodshops add em into it

u also need MissionText.rar (393 Bytes)

or remove the – on ShowNotification and add em @ DrawMissionText

1 Like