mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
feat(vehicle): lockpick & hotwire
This commit is contained in:
@@ -268,6 +268,15 @@ if Config.useInventoryForKeys then
|
||||
return
|
||||
end
|
||||
player.notify({
|
||||
RegisterNetEvent("ND_Vehicles:hotwire", function(netId)
|
||||
local src = source
|
||||
local ped = GetPlayerPed(src)
|
||||
local playerVeh = GetVehiclePedIsIn(ped)
|
||||
local veh = NetworkGetEntityFromNetworkId(netId)
|
||||
if not playerVeh or playerVeh == 0 or playerVeh ~= veh then return end
|
||||
local state = Entity(veh).state
|
||||
state.hotwired = true
|
||||
end)
|
||||
title = "No signal",
|
||||
description = "Vehicle to far away.",
|
||||
type = "error",
|
||||
|
||||
Reference in New Issue
Block a user