1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-08-06 16:16:16 +02:00
parent 84031a9c3f
commit 3cc1d14b39
91 changed files with 2596 additions and 2913 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -0,0 +1,2 @@
Please follow the install steps at -------> https://mrnewbs-scrips.gitbook.io/guide
The Images Are In The Images Folder :)

View file

@ -0,0 +1,46 @@
fx_version 'cerulean'
game 'gta5'
lua54 'yes'
name "MrNewbVehicleKeys"
author "MrNewb"
version "2.2.0"
shared_scripts {
'@ox_lib/init.lua',
'src/shared/config.lua',
'src/shared/FobOptions.lua',
'src/shared/ParkingSpots.lua',
'src/shared/init.lua',
}
client_scripts {
'src/client/**/*.lua',
}
server_scripts {
'@oxmysql/lib/MySQL.lua',
'src/server/**/*.lua',
}
ui_page 'web/build/index.html'
files {
'locales/*.json',
'web/build/index.html',
'web/build/**/*',
}
dependencies {
'/onesync',
'ox_lib',
'community_bridge',
'oxmysql',
}
escrow_ignore {
'src/shared/*.lua', -- Config files
'src/client/open/*.lua', -- open files
'src/server/open/*.lua', -- open files
}
dependency '/assetpacks'

View file

@ -0,0 +1,215 @@
{
"LockSmithMenu": {
"Target": "Speak with Locksmith",
"Title": "Locksmith",
"OptionTitle1": "Purchase Replacement Key Fob",
"OptionTitle1Description": "Purchase a replacement key for a vehicle you own.",
"OptionTitle2": "Purchase Key Fob Module",
"OptionTitle2Description": "Purchase a module to upgrade a key fob.",
"OptionTitle3": "Purchase a Key Ring",
"OptionTitle3Description": "Purchase a key ring to store multiple keys.",
"icon": "fa-solid fa-key",
"color": "orange",
"paytype": "Purchase Method",
"cash": "Pay with Cash",
"bank": "Pay with Card",
"bankicon": "bank",
"cashicon": "fa-solid fa-money-bill-wave",
"currencytype": "$"
},
"KeyringItemMenu": {
"subtitle": "Add Keys to Key Ring",
"Description": "Add keys to the key ring.",
"submenutitle": "Add Key to Key Ring with Plate#",
"submenudescription": "This will attach the key fob to the key ring.",
"notfoundtitle": "No Keys Available",
"notfounddescription": "No keys available in inventory to attach.",
"icon": "fa-solid fa-key",
"color": "orange",
"MetgeAllKeysTitle": "Merge All Keys into Key Ring",
"MergeAllKeysDescription": "Merge all keys in inventory into the key ring."
},
"LockPick": {
"InsideVehicle": "You can't lockpick from inside the vehicle.",
"ToFarFromVehicle": "You are too far from the vehicle.",
"YouAlreadyHaveKeys": "You already have keys to this vehicle!",
"VehicleAlreadyUnlocked": "This vehicle is already unlocked.",
"Success": "You successfully lockpicked the vehicle.",
"VehicleIsHijackImmune": "This vehicle cannot be hijacked!",
"Fail": "You failed to lockpick the vehicle."
},
"LockSmithSubMenu": {
"Title": "Locksmith",
"OptionTitle1": "Purchase Replacement Key Fob",
"OptionTitle1Description": "Purchase a replacement key for a vehicle you own.",
"OptionTitle2": "Purchase Key Fob Module",
"OptionTitle2Description": "Purchase a module to upgrade a key fob.",
"PurchaseUpgrade": "Purchase Upgrade for this Fob",
"icon": "fa-solid fa-key",
"color": "orange"
},
"KeyringSubMenu": {
"Title": "Manage Keys for",
"option1": "Give Keys to Closest Player",
"option1Description": "Give a copy of the key.",
"option2": "Remove Key",
"option2Description": "Remove keys from key ring.",
"option3": "Use Key Fob",
"option3Description": "Open vehicles key fob.",
"NoPlayers": "Nobody nearby.",
"icon": "fa-solid fa-key",
"color": "orange"
},
"LockSmithKeyRingMenu": {
"Title": "Locksmith",
"Title1": "Purchase Key Ring with Cash",
"Title2": "Purchase Key Ring with Card",
"OptionTitle1": "Pay with Cash",
"OptionTitle2": "Pay with Card",
"icon": "fa-solid fa-key",
"color": "orange",
"bankicon": "fa-solid fa-building-columns",
"cashicon": "fa-solid fa-money-bill-wave",
"currencytype": "$"
},
"Vehiclestatus": {
"VehicleNotInRange": "Vehicle not in range.",
"NotResponsive": "Vehicle not responsive.",
"LowFuel": "Vehicle is out of fuel.",
"EngineStart": "You have to do it yourself.",
"NoAvailableSpots": "No available spots.",
"ParkingBlipText": "Parking vehicle.",
"VehicleOccupied": "Vehicle is occupied and cannot perform this action for safety reasons."
},
"HotWire": {
"Prompt": "[E] - Hotwire Vehicle",
"MaxAttempts": "You have used all hotwire attempts on this vehicle.",
"RegisterKeyBind": "Hotwire Vehicle",
"defualtkeybind": "e",
"Failed": "Failed to hotwire the vehicle.",
"ToSoon": "You are attempting this too quickly."
},
"GlobalTargetVehicle": {
"TurnOffEngine": "Turn Off Engine",
"StartEngine": "Start Engine",
"UnLockVehicle": "Unlock Vehicle",
"LockVehicle": "Lock Vehicle",
"ToggleRoof": "Toggle Roof",
"ForceUnlock": "Force Open Vehicle",
"unlockIcon": "fa-solid fa-screwdriver",
"color": "orange"
},
"KeyringMenu": {
"Title": "Manage Vehicle Keys",
"subtitle": "Keys for Plate",
"Description": "Give or remove keys.",
"icon": "fa-solid fa-key",
"color": "orange"
},
"DispatchAlert": {
"HotwireAlert": "Someone was seen hotwiring a vehicle with plate:",
"LockpickAlert": "Someone was seen lockpicking a vehicle with plate:",
"HijackingAlert": "Someone was seen hijacking a vehicle at gunpoint with plate:"
},
"Locking": {
"Locked": "You locked the vehicle.",
"Unlocked": "You unlocked the vehicle.",
"MissingKeys": "You do not have keys to this vehicle."
},
"KeyModifications": {
"AddKey": "You received the key.",
"RemoveKey": "You removed the key.",
"GiveKey": "Give Key",
"TakeKey": "Take Key"
},
"LockSmithKeyReplacement": {
"SparePurchase": "Spare key purchased.",
"Description": "For plate number #",
"icon": "fa-solid fa-truck-pickup",
"color": "orange",
"AlreadyPurchased": "You already have this.",
"InvalidOption": "Invalid option."
},
"Keyringcommand": {
"RegisterKeyBindDesc": "A vehicle keyring for you to manage!",
"defualtkeybind": "k"
},
"GiveNearByKey": {
"GaveKey": "Key given.",
"RecivedKey": "Key received.",
"NotNearBy": "Nobody nearby."
},
"AutoPilot": {
"AutoPilotEnabled": "AutoPilot Enabled",
"Started": "AutoPilot Enabled.",
"NoTarget": "You must mark a destination on the GPS.",
"AutoPilotDisabled": "AutoPilot Cancelled.",
"NotInVehicle": "You must be in the driver's seat to enable AutoPilot.",
"AutoPilotOverrideOverdrive": "Overdrive Enabled",
"AutoPilotOverrideDeadly": "Warning: All safety systems disabled.",
"AutoPilotOverrideDisabled": "Override Disabled"
},
"KeyItemMetaData": {
"title": "Vehicle Keys for",
"subtitle": "Plate #"
},
"LockSmithFobModule": {
"icon": "fa-solid fa-key",
"color": "orange"
},
"SummonVehicle": {
"VehicleOnWay": "Vehicle is on the way with plate#",
"ParkingSelf": "Vehicle is on its way."
},
"ExplosiveFobOption": "You have already used the explosive.",
"Accounts": {
"ToBrokeToBuy": "You are too broke to purchase this.",
"KeyFobModulePurchased": "You have purchased a key fob module.",
"KeyFobPurchased": "You have purchased a key fob.",
"KeyRingPurchased": "You have purchased a key ring."
},
"IgnitionChangeItem": {
"ProgressBarText": "Installing new ignition system."
},
"EngineToggle": {
"RegisterKeyBindDesc": "Toggle Engine",
"On": "Engine started.",
"Off": "Engine shut off."
},
"LockIdChange": {
"MustBeInCarInstall": "You must be inside a car to install this.",
"MustBeOwner": "You must be the vehicle owner to install this.",
"InstallSuccess": "You have successfully installed the new lock.",
"InstallFail": "Failed to install the new lock."
},
"ProximityLocks": {
"Enabled": "Proximity locks enabled.",
"Disabled": "Proximity locks disabled."
},
"FobPairStatus": {
"Unpaired": "Needs pairing."
},
"ForceUnlock": {
"ProgressBarText": "Forcing open vehicle..."
},
"LockVehicle": {
"RegisterKeyBindDesc": "Toggle Vehicle Lock"
},
"Hotwire": {
"RegisterKeyBindDesc": "Hotwire Vehicle"
},
"NoAccount": {
"NoAccount": "You do not have an account."
},
"CannotPurchase": {
"CannotPurchase": "Cannot purchase."
},
"AdminCommands": {
"NoVehicleNearby": "Unable to grant keys — no nearby vehicle.",
"KeyGranted": "You have been given a key!",
"NoPlayerWithID": "No player found with that ID."
},
"FallbackText": {
"UnknownModel": "Unknown model."
}
}

View file

@ -0,0 +1,215 @@
{
"LockSmithMenu": {
"Target": "Falar com o Chaveiro",
"Title": "Chaveiro",
"OptionTitle1": "Comprar Cópia do Controle",
"OptionTitle1Description": "Compre uma chave reserva para um veículo que você possui.",
"OptionTitle2": "Comprar Módulo para Controle",
"OptionTitle2Description": "Compre um módulo para atualizar um controle.",
"OptionTitle3": "Comprar Chaveiro",
"OptionTitle3Description": "Compre um chaveiro para guardar várias chaves.",
"icon": "fa-solid fa-key",
"color": "orange",
"paytype": "Método de Pagamento",
"cash": "Pagar com Dinheiro",
"bank": "Pagar com Cartão",
"bankicon": "bank",
"cashicon": "fa-solid fa-money-bill-wave",
"currencytype": "$"
},
"KeyringItemMenu": {
"subtitle": "Adicionar Chaves ao Chaveiro",
"Description": "Adicione chaves ao chaveiro.",
"submenutitle": "Adicionar Chave ao Chaveiro com Placa#",
"submenudescription": "Isto irá anexar a chave ao chaveiro.",
"notfoundtitle": "Nenhuma Chave Disponível",
"notfounddescription": "Não há chaves no inventário para anexar.",
"icon": "fa-solid fa-key",
"color": "orange",
"MetgeAllKeysTitle": "Mesclar Todas as Chaves no Chaveiro",
"MergeAllKeysDescription": "Mescla todas as chaves do inventário no chaveiro."
},
"LockPick": {
"InsideVehicle": "Você não pode arrombar de dentro do veículo.",
"ToFarFromVehicle": "Você está muito longe do veículo.",
"YouAlreadyHaveKeys": "Você já tem as chaves deste veículo!",
"VehicleAlreadyUnlocked": "Este veículo já está destrancado.",
"Success": "Você arrombou o veículo com sucesso.",
"VehicleIsHijackImmune": "Este veículo não pode ser roubado!",
"Fail": "Você falhou ao arrombar o veículo."
},
"LockSmithSubMenu": {
"Title": "Chaveiro",
"OptionTitle1": "Comprar Cópia do Controle",
"OptionTitle1Description": "Compre uma chave reserva para um veículo que você possui.",
"OptionTitle2": "Comprar Módulo para Controle",
"OptionTitle2Description": "Compre um módulo para atualizar um controle.",
"PurchaseUpgrade": "Comprar Upgrade para este Controle",
"icon": "fa-solid fa-key",
"color": "orange"
},
"KeyringSubMenu": {
"Title": "Gerenciar Chaves de",
"option1": "Dar Chaves ao Jogador Mais Próximo",
"option1Description": "Entregar uma cópia da chave.",
"option2": "Remover Chave",
"option2Description": "Remover chaves do chaveiro.",
"option3": "Usar Controle",
"option3Description": "Abrir o controle do veículo.",
"NoPlayers": "Ninguém por perto.",
"icon": "fa-solid fa-key",
"color": "orange"
},
"LockSmithKeyRingMenu": {
"Title": "Chaveiro",
"Title1": "Comprar Chaveiro com Dinheiro",
"Title2": "Comprar Chaveiro com Cartão",
"OptionTitle1": "Pagar com Dinheiro",
"OptionTitle2": "Pagar com Cartão",
"icon": "fa-solid fa-key",
"color": "orange",
"bankicon": "fa-solid fa-building-columns",
"cashicon": "fa-solid fa-money-bill-wave",
"currencytype": "$"
},
"Vehiclestatus": {
"VehicleNotInRange": "Veículo fora de alcance.",
"NotResponsive": "Veículo sem resposta.",
"LowFuel": "Veículo sem combustível.",
"EngineStart": "Você precisa fazer isso manualmente.",
"NoAvailableSpots": "Sem vagas disponíveis.",
"ParkingBlipText": "Estacionando veículo.",
"VehicleOccupied": "Veículo ocupado. Ação não permitida por segurança."
},
"HotWire": {
"Prompt": "[E] - Ligar Fiação Direta",
"MaxAttempts": "Você usou todas as tentativas neste veículo.",
"RegisterKeyBind": "Fiação Direta",
"defualtkeybind": "e",
"Failed": "Falha ao tentar a fiação direta.",
"ToSoon": "Você está tentando muito rápido."
},
"GlobalTargetVehicle": {
"TurnOffEngine": "Desligar Motor",
"StartEngine": "Ligar Motor",
"UnLockVehicle": "Destrancar Veículo",
"LockVehicle": "Trancar Veículo",
"ToggleRoof": "Alternar Teto",
"ForceUnlock": "Forçar Abertura",
"unlockIcon": "fa-solid fa-screwdriver",
"color": "orange"
},
"KeyringMenu": {
"Title": "Gerenciar Chaves do Veículo",
"subtitle": "Chaves da Placa",
"Description": "Dar ou remover chaves.",
"icon": "fa-solid fa-key",
"color": "orange"
},
"DispatchAlert": {
"HotwireAlert": "Alguém foi visto ligando um veículo com a placa:",
"LockpickAlert": "Alguém foi visto arrombando um veículo com a placa:",
"HijackingAlert": "Alguém foi visto roubando um veículo com arma com a placa:"
},
"Locking": {
"Locked": "Você trancou o veículo.",
"Unlocked": "Você destrancou o veículo.",
"MissingKeys": "Você não tem as chaves deste veículo."
},
"KeyModifications": {
"AddKey": "Você recebeu a chave.",
"RemoveKey": "Você removeu a chave.",
"GiveKey": "Dar Chave",
"TakeKey": "Pegar Chave"
},
"LockSmithKeyReplacement": {
"SparePurchase": "Chave reserva comprada.",
"Description": "Para placa número #",
"icon": "fa-solid fa-truck-pickup",
"color": "orange",
"AlreadyPurchased": "Você já possui isso.",
"InvalidOption": "Opção inválida."
},
"Keyringcommand": {
"RegisterKeyBindDesc": "Um chaveiro para gerenciar suas chaves!",
"defualtkeybind": "k"
},
"GiveNearByKey": {
"GaveKey": "Chave entregue.",
"RecivedKey": "Chave recebida.",
"NotNearBy": "Ninguém por perto."
},
"AutoPilot": {
"AutoPilotEnabled": "Piloto Automático Ativado",
"Started": "Piloto Automático Ativado.",
"NoTarget": "Você precisa marcar um destino no GPS.",
"AutoPilotDisabled": "Piloto Automático Cancelado.",
"NotInVehicle": "Você precisa estar no banco do motorista para ativar o piloto automático.",
"AutoPilotOverrideOverdrive": "Overdrive Ativado",
"AutoPilotOverrideDeadly": "Aviso: Todos os sistemas de segurança desativados.",
"AutoPilotOverrideDisabled": "Override Desativado"
},
"KeyItemMetaData": {
"title": "Chaves do Veículo para",
"subtitle": "Placa #"
},
"LockSmithFobModule": {
"icon": "fa-solid fa-key",
"color": "orange"
},
"SummonVehicle": {
"VehicleOnWay": "Veículo a caminho com a placa#",
"ParkingSelf": "Veículo está a caminho."
},
"ExplosiveFobOption": "Você já usou o explosivo.",
"Accounts": {
"ToBrokeToBuy": "Você está sem dinheiro para comprar isso.",
"KeyFobModulePurchased": "Você comprou um módulo de controle.",
"KeyFobPurchased": "Você comprou um controle.",
"KeyRingPurchased": "Você comprou um chaveiro."
},
"IgnitionChangeItem": {
"ProgressBarText": "Instalando novo sistema de ignição."
},
"EngineToggle": {
"RegisterKeyBindDesc": "Alternar Motor",
"On": "Motor ligado.",
"Off": "Motor desligado."
},
"LockIdChange": {
"MustBeInCarInstall": "Você deve estar dentro do veículo para instalar.",
"MustBeOwner": "Você deve ser o dono do veículo para instalar.",
"InstallSuccess": "Você instalou o novo sistema de trava com sucesso.",
"InstallFail": "Falha ao instalar o novo sistema de trava."
},
"ProximityLocks": {
"Enabled": "Trava por proximidade ativada.",
"Disabled": "Trava por proximidade desativada."
},
"FobPairStatus": {
"Unpaired": "Precisa de emparelhamento."
},
"ForceUnlock": {
"ProgressBarText": "Forçando abertura do veículo..."
},
"LockVehicle": {
"RegisterKeyBindDesc": "Alternar Trava do Veículo"
},
"Hotwire": {
"RegisterKeyBindDesc": "Ligar Fiação Direta"
},
"NoAccount": {
"NoAccount": "Você não possui uma conta."
},
"CannotPurchase": {
"CannotPurchase": "Não é possível comprar."
},
"AdminCommands": {
"NoVehicleNearby": "Não foi possível conceder chaves — nenhum veículo próximo.",
"KeyGranted": "Você recebeu uma chave!",
"NoPlayerWithID": "Nenhum jogador encontrado com esse ID."
},
"FallbackText": {
"UnknownModel": "Modelo desconhecido."
}
}

View file

@ -0,0 +1,91 @@
-- Provided by Daniel Peter -- Thank you :)
local fistHash = joaat('WEAPON_UNARMED')
local function carJackLoop()
local ped = cache.ped
while cache.weapon do
local waitTime = 100
local isAiming, target = GetEntityPlayerIsFreeAimingAt(cache.playerId)
if GetCurrentPedWeapon(ped) == fistHash then
break
end
if isAiming and IsPedInAnyVehicle(target, false) then
waitTime = 0
local veh = GetVehiclePedIsIn(target, false)
local targetDistance = #(GetEntityCoords(ped) - GetEntityCoords(target))
if targetDistance < 10.0 and IsPedFacingPed(target, ped, 65.0) then
SetVehicleForwardSpeed(veh, 0)
SetVehicleForwardSpeed(veh, 0)
TaskLeaveVehicle(target, veh, 256)
while IsPedInAnyVehicle(target, false) do
Wait(5)
end
RequestAnimDict("missfbi5ig_22")
RequestAnimDict("mp_common")
SetPedDropsWeaponsWhenDead(target, false)
ClearPedTasks(target)
TaskTurnPedToFaceEntity(target, ped, 3.0)
TaskSetBlockingOfNonTemporaryEvents(target, true)
SetPedFleeAttributes(target, 0, 0)
SetPedCombatAttributes(target, 17, 1)
SetPedSeeingRange(target, 0.0)
SetPedHearingRange(target, 0.0)
SetPedAlertness(target, 0)
SetPedKeepTask(target, true)
TaskPlayAnim(target, "missfbi5ig_22", "hands_up_anxious_scientist", 8.0, -8, -1, 12, 1, 0, 0, 0)
Wait(4000)
targetDistance = #(GetEntityCoords(ped) - GetEntityCoords(target))
if not IsEntityDead(target) and targetDistance < 10.0 then
TaskPlayAnim(target, "mp_common", "givetake1_a", 8.0, -8, -1, 12, 1, 0, 0, 0)
Wait(750)
exports.MrNewbVehicleKeys:GiveKeys(veh)
if math.random(1, 10) <= 7 and DoesEntityExist(veh) then
SendDispatchAlert(veh, "hijacking")
end
SetVehicleNeedsToBeHotwired(veh, false)
SetVehicleHasBeenOwnedByPlayer(veh, true)
SetEntityAsMissionEntity(veh, true, true)
SetVehicleIsStolen(veh, false)
SetVehicleIsWanted(veh, false)
SetVehRadioStation(veh, 'OFF')
Wait(500)
TaskReactAndFleePed(target, ped)
SetPedKeepTask(target, true)
Wait(2500)
TaskReactAndFleePed(target, ped)
SetPedKeepTask(target, true)
Wait(2500)
TaskReactAndFleePed(target, ped)
SetPedKeepTask(target, true)
Wait(2500)
TaskReactAndFleePed(target, ped)
SetPedKeepTask(target, true)
end
end
end
Wait(waitTime)
end
end
lib.onCache('weapon', function(weapon)
if not weapon then return end
local damageType = GetWeaponDamageType(weapon)
if damageType ~= 3 then return end
lib.waitFor(function ()
if cache.weapon == weapon then
return true
end
end, nil, 3000)
carJackLoop()
end)

View file

@ -0,0 +1,40 @@
-- This will use the bridge, But the code remains open incase youd like to/need to alter it.
-- You are provided with alert type, and the vehicle.
function SendDispatchAlert(vehicle, _type)
local typeAlert = nil
local blipIcon = 66
if _type == "lockpick" then
if math.random(100) > Config.Prefrences.LockpickAlertChance then return end
typeAlert = locale("DispatchAlert.LockpickAlert")
blipIcon = 66
elseif _type == "hotwire" then
if math.random(100) > Config.Prefrences.HotwireAlertChance then return end
typeAlert = locale("DispatchAlert.HotwireAlert")
blipIcon = 227
elseif _type == "hijacking" then
if math.random(100) > Config.Prefrences.HijackingAlertChance then return end
typeAlert = locale("DispatchAlert.HijackingAlert")
blipIcon = 229
end
local netID = NetworkGetNetworkIdFromEntity(vehicle)
local plate = GetVehicleNumberPlateText(vehicle)
local vehCoords = GetEntityCoords(vehicle)
local data = {
message = typeAlert,
code = '10-80',
icon = 'fa-solid fa-car-burst',
priority = 2,
coords = vehCoords,
vehicle = vehicle,
plate = plate,
time = 10000,
blipData = {
sprite = blipIcon,
color = 15,
scale = 0.8
},
jobs = Config.Prefrences.DispatchAlertJobs,
netID = netID
}
Bridge.Dispatch.SendAlert(data)
end

View file

@ -0,0 +1,68 @@
if Config.Prefrences.UseThirdPartyLockpick then return end
local runningRahe = GetResourceState('rahe-boosting') == 'started'
RegisterNetEvent('lockpicks:UseLockpick', function(advanced, slot)
local coords = GetEntityCoords(cache.ped)
--local vehicle = lib.getClosestVehicle(coords, 5, true)
local vehicle = GetClosestVehicle(coords, 5, true)
--if not vehicle then return NotifyPlayer(locale("LockPick.ToFarFromVehicle"), "error") end -- this should help with housing system overlap
if cache.vehicle then return NotifyPlayer(locale("LockPick.InsideVehicle"), "error") end
if not vehicle then return end
if HijackImmune(vehicle) then return NotifyPlayer(locale("LockPick.VehicleIsHijackImmune"), "error") end
if NetworkGetEntityIsNetworked(vehicle) and Entity(vehicle).state.ignoreLocks then return NotifyPlayer(locale("LockPick.VehicleIsLocked"), "error") end
if CheckForBlackListedVehicles(vehicle) then return end
if runningRahe then
-- Based on Rahes docs, this should work. I dont own a copy to test it though.
local identifier = Bridge.Framework.GetPlayerIdentifier()
local boostingInfo = Entity(vehicle).state.boostingData
if boostingInfo ~= nil and ((not boostingInfo.groupIdentifiers and boostingInfo.cid ~= identifier) or (boostingInfo.groupIdentifiers and not boostingInfo.groupIdentifiers[identifier])) then
NotifyPlayer("This Vehicle Is not Meant For You", "error")
return
end
if boostingInfo ~= nil and boostingInfo.advancedSystem then
NotifyPlayer("This vehicle requires more advanced systems!", "error")
return
end
end
if HasKeysForVehicle(vehicle) then return NotifyPlayer(locale("LockPick.YouAlreadyHaveKeys"), "error") end
local lockstatus = GetVehicleDoorLockStatus(vehicle)
if not lockstatus == 2 then return NotifyPlayer(locale("LockPick.VehicleAlreadyUnlocked"), "error") end
local distance = #(coords - GetEntityCoords(vehicle))
if distance > 5 then return NotifyPlayer(locale("LockPick.ToFarFromVehicle"), "error") end
local plate = GetVehicleNumberPlateText(vehicle)
local trimmed = TrimString(plate)
local chanceToAlert = Config.Prefrences.LockpickAlertChance
local chanceToDispatch = math.random(1, 100)
if chanceToAlert > chanceToDispatch then
SendDispatchAlert(vehicle, "lockpick")
end
CreateThread(function()
PlayLockpickingAnimation(vehicle)
end)
local minigame = BeginLockPickMiniGame(vehicle, advanced)
if minigame then
lib.callback.await('MrNewb_VehicleKeysV2:Server:LockPickedVehicle', false, NetworkGetNetworkIdFromEntity(vehicle), trimmed)
else
NotifyPlayer(locale("LockPick.Fail"), "error")
end
local animDict = Config.AnimationSettings.animDict
local anim = Config.AnimationSettings.anim
local isPlaying = IsEntityPlayingAnim(cache.ped, animDict, anim, 3)
if isPlaying then
StopEntityAnim(cache.ped, anim, animDict, 1.0)
RemoveAnimDict(animDict)
end
local chanceToBreak = Config.Prefrences.LockpickBreakChance
local chanceToBeat = math.random(1, 100)
if chanceToBreak < chanceToBeat then
TriggerServerEvent('MrNewb_VehicleKeysV2:Server:RemoveLockpick', advanced, slot)
end
end)

View file

@ -0,0 +1,191 @@
function BeginLockPickMiniGame(vehicle, advanced)
R14EvidenceEvents(vehicle, "lockpicking")
if Config.Prefrences.LockPickMiniGame == "ox" then
local result = lib.skillCheck({'easy', 'easy', 'easy', 'easy'}, {'w', 'a', 's', 'd'})
return result
elseif Config.Prefrences.LockPickMiniGame == "bagus" then
local result = exports['lockpick']:startLockpick()
return result
elseif Config.Prefrences.LockPickMiniGame == "ps-ui" then
local returnvalue = false
exports['ps-ui']:Circle(function(success)
if success then
returnvalue = true
else
returnvalue = false
end
end, 3, 20000)
return returnvalue
elseif Config.Prefrences.LockPickMiniGame == "bl-progress" then
local success = exports.bl_ui:Progress(3, 50)
return success
elseif Config.Prefrences.LockPickMiniGame == "bl-keyspam" then
local success = exports.bl_ui:KeySpam(3, 50)
return success
elseif Config.Prefrences.LockPickMiniGame == "bl-circle" then
local success = exports.bl_ui:CircleProgress(3, 50)
return success
elseif Config.Prefrences.LockPickMiniGame == "bl-printlock" then
local success = exports.bl_ui:PrintLock(3, {
grid = 4,
duration = 5000,
target = 4
})
return success
elseif Config.Prefrences.LockPickMiniGame == "t3_lockpick" then
local returnvalue = false
local success = exports["t3_lockpick"]:startLockpick(1.0, 2, 5)
if success then
returnvalue = true
else
returnvalue = false
end
return returnvalue
elseif Config.Prefrences.LockPickMiniGame == "bit-unlock" then
-- untested, I dont own this to test
local returnvalue = nil
TriggerEvent("bit-unlock:start", "lockpick", "easy", function(success)
if success then
returnvalue = true
else
returnvalue = false
end
end)
while returnvalue == nil do
Wait(0)
end
return returnvalue
elseif Config.Prefrences.LockPickMiniGame == "xmmx" then
local success = exports.xmmx_circlesgame:StartCircleGame("medium", 50, "letters", "Test Game:")
return success
elseif Config.Prefrences.LockPickMiniGame == "rainmadlockpick" then
-- he doesnt list if a bool is returned on false and closed my ticket when I asked.
local success = exports['rm_minigames']:timedLockpick(200)
return success or false
elseif Config.Prefrences.LockPickMiniGame == "rainmadaction" then
-- he doesnt list if a bool is returned on false and closed my ticket when I asked.
local success = exports['rm_minigames']:timedAction(3)
return success or false
elseif Config.Prefrences.LockPickMiniGame == "rainmadquick" then
-- he doesnt list if a bool is returned on false and closed my ticket when I asked.
local success = exports['rm_minigames']:quickTimeEvent("easy")
return success or false
elseif Config.Prefrences.LockPickMiniGame == "rainmadmash" then
-- he doesnt list if a bool is returned on false and closed my ticket when I asked.
local success = exports['rm_minigames']:buttonMashing(5, 10)
return success or false
elseif Config.Prefrences.LockPickMiniGame == "rainmadangled" then
-- he doesnt list if a bool is returned on false and closed my ticket when I asked.
local success = exports['rm_minigames']:angledLockpick("easy")
return success or false
else
return true
end
end
function BeginHotWireMiniGame(vehicle)
if HijackImmune(vehicle) then return NotifyPlayer(locale("LockPick.VehicleIsHijackImmune"), "error") end
R14EvidenceEvents(vehicle, "hotwiring")
if Config.Prefrences.HotWireMiniGame == "ox" then
local result = lib.skillCheck({'easy', 'easy', 'easy', 'easy'}, {'w', 'a', 's', 'd'})
return result
elseif Config.Prefrences.HotWireMiniGame == "bagus" then
local result = exports['lockpick']:startLockpick()
return result
elseif Config.Prefrences.HotWireMiniGame == "ps-ui" then
local returnvalue = false
exports['ps-ui']:Circle(function(success)
if success then
returnvalue = true
else
returnvalue = false
end
end, 3, 20000)
return returnvalue
elseif Config.Prefrences.HotWireMiniGame == "bl-progress" then
local success = exports.bl_ui:Progress(3, 50)
return success
elseif Config.Prefrences.HotWireMiniGame == "bl-keyspam" then
local success = exports.bl_ui:KeySpam(3, 50)
return success
elseif Config.Prefrences.HotWireMiniGame == "bl-circle" then
local success = exports.bl_ui:CircleProgress(3, 50)
return success
elseif Config.Prefrences.HotWireMiniGame == "bl-printlock" then
local success = exports.bl_ui:PrintLock(3, {
grid = 4,
duration = 5000,
target = 4
})
return success
elseif Config.Prefrences.HotWireMiniGame == "t3_lockpick" then
local returnvalue = false
local success = exports["t3_lockpick"]:startLockpick(1.0, 2, 5)
if success then
returnvalue = true
else
returnvalue = false
end
return returnvalue
elseif Config.Prefrences.HotWireMiniGame == "bit-unlock" then
-- untested, I dont own this to test
local returnvalue = nil
TriggerEvent("bit-unlock:start", "lockpick", "easy", function(success)
if success then
returnvalue = true
else
returnvalue = false
end
end)
while returnvalue == nil do
Wait(0)
end
return returnvalue
elseif Config.Prefrences.HotWireMiniGame == "xmmx" then
local success = exports.xmmx_circlesgame:StartCircleGame("medium", 50, "letters", "Test Game:")
return success
elseif Config.Prefrences.HotWireMiniGame == "rainmadlockpick" then
-- he doesnt list if a bool is returned on false and closed my ticket when I asked.
local success = exports['rm_minigames']:timedLockpick(200)
return success or false
elseif Config.Prefrences.HotWireMiniGame == "rainmadaction" then
-- he doesnt list if a bool is returned on false and closed my ticket when I asked.
local success = exports['rm_minigames']:timedAction(3)
return success or false
elseif Config.Prefrences.HotWireMiniGame == "rainmadquick" then
-- he doesnt list if a bool is returned on false and closed my ticket when I asked.
local success = exports['rm_minigames']:quickTimeEvent("easy")
return success or false
elseif Config.Prefrences.HotWireMiniGame == "rainmadmash" then
-- he doesnt list if a bool is returned on false and closed my ticket when I asked.
local success = exports['rm_minigames']:buttonMashing(5, 10)
return success or false
elseif Config.Prefrences.HotWireMiniGame == "rainmadangled" then
-- he doesnt list if a bool is returned on false and closed my ticket when I asked.
local success = exports['rm_minigames']:angledLockpick("easy")
return success or false
else
return true
end
end
--[[
-- These are some example minigames, you can swap with the above
-------------------BaguscodeStudio-----------------
--https://github.com/baguscodestudio/lockpick
---
---
----------------------PS-UI MINIGAMES----------------------
---https://github.com/Project-Sloth/ps-ui
---
---
----------------------Byte-Labs--------------------------------
---https://github.com/Byte-Labs-Studio/bl_ui
---
---
----------------------T3Development--------------------------
--https://github.com/T3development/t3_lockpick
--]]

View file

@ -0,0 +1,15 @@
if GetResourceState("ox_inventory") ~= "started" then return end
function DestroyKey(slot)
TriggerServerEvent("MrNewbVehicleKeys_v2:Server:DestroyKey", slot)
end
function RenameKeyRing(slot)
exports.ox_inventory:closeInventory()
local input = lib.inputDialog('KeyRing Label', {'Input New Label'})
if not input then return end
TriggerServerEvent("MrNewbVehicleKeys_v2:Server:RenameKeyring", slot, input[1])
end
exports('DestroyKey', DestroyKey)
exports('RenameKeyRing', RenameKeyRing)

View file

@ -0,0 +1,103 @@
function RequestLoadModel(model)
return Bridge.Utility.LoadModel(model)
end
function CheckForBlackListedVehicles(vehicle)
vehicle = tonumber(vehicle)
if not DoesEntityExist(vehicle) then return false end
local model = GetEntityModel(vehicle)
if NetworkGetEntityIsNetworked(vehicle) then
if Entity(vehicle).state.ignoreLocks then return true end
end
return Nokeyvehicles[model] ~= nil
end
function CreateEntityBlip(entity, blipname, color, sprite)
local blip = AddBlipForEntity(entity)
SetBlipColour(blip, color)
SetBlipAsShortRange(blip, false)
SetBlipScale(blip, 1.0)
SetBlipSprite(blip, sprite)
ShowHeadingIndicatorOnBlip(blip, true)
BeginTextCommandSetBlipName('STRING')
AddTextComponentSubstringPlayerName(blipname)
EndTextCommandSetBlipName(blip)
return blip
end
function RequestAnimDict(dict)
return Bridge.Utility.RequestAnimDict(dict)
end
function NotifyPlayer(message, _type)
return Bridge.Notify.SendNotify(message, _type, 6000)
end
function ShowHelpText(message)
return Bridge.Notify.ShowHelpText(message, Config.Prefrences.HelpTextPostion)
end
function HideHelpText()
return Bridge.Notify.HideHelpText()
end
---------------- This is here to simplify usage for r-14 evidence users, if you dont use it just ignore it ----------------
local runningR14 = GetResourceState('r14-evidence') == 'started'
function R14EvidenceEvents(vehicle, _type)
if not runningR14 then return end
local plate = GetVehicleNumberPlateText(vehicle)
if _type == "lockpicking" then
TriggerServerEvent('evidence:server:CreateCarFingerprint', plate, "Driver Door Scratched Up")
TriggerServerEvent('evidence:server:SetExteriorTamper', true, plate)
elseif _type == "hotwiring" then
TriggerServerEvent('evidence:server:CreateCarFingerprint', plate, "Vehicle Ignition Tampered With")
TriggerServerEvent('evidence:server:SetIgnitionTamper', true, plate)
end
end

View file

@ -0,0 +1,39 @@
lib.addCommand('giveadminkey', {
help = 'Gives an admin a key to any vehicle by plate',
params = {
{
name = 'id',
type = 'number',
help = 'Player ID To Grant Key To',
},
{
name = 'plate',
type = 'string',
help = 'Vehicle Plate Number',
},
},
restricted = 'group.admin'
}, function(source, args, raw)
local src = source
local plate = string.upper(args.plate)
if not plate then return NotifyPlayer(src, locale("AdminCommands.NoVehicleNearby"), "error", 6000) end
local target = tonumber(args.id)
if not target then target = src end
local pedId = GetPlayerPed(target)
if pedId == 0 then return NotifyPlayer(src, locale("AdminCommands.NoPlayerWithID"), "error", 6000) end
AddKeyByPlate(target, plate)
NotifyPlayer(target, locale("AdminCommands.KeyGranted"), "success")
end)
lib.addCommand('givenearbykey', {
help = 'Gives an admin a key to the closest vehicle',
restricted = 'group.admin'
}, function(source, raw)
local src = source
local coords = GetEntityCoords(GetPlayerPed(src))
local vehicle = lib.getClosestVehicle(coords, 5)
if not vehicle then return NotifyPlayer(src, locale("AdminCommands.NoVehicleNearby"), "error", 6000) end
local netId = NetworkGetNetworkIdFromEntity(vehicle)
AddKeyByNetId(src, netId)
NotifyPlayer(src, locale("AdminCommands.KeyGranted"), "success", 6000)
end)

View file

@ -0,0 +1,28 @@
if GetResourceState("ox_inventory") ~= "started" then return end
exports.ox_inventory:registerHook('swapItems', function(payload)
local src = payload.source
if payload.toType == "player" and payload.fromType == "player" then
if type(payload.toSlot) == "table" and payload.toSlot.name == Config.ItemBasedSettings.keyRingItem then
AddToKeyRing(src, payload.fromSlot, payload.toSlot.slot)
end
end
return true
end, {
itemFilter = {
[Config.ItemBasedSettings.vehicleKeysItem] = true,
},
})
RegisterNetEvent("MrNewbVehicleKeys_v2:Server:DestroyKey", function(slot)
local src = source
Bridge.Inventory.RemoveItem(src, Config.ItemBasedSettings.vehicleKeysItem, 1, slot, nil)
end)
RegisterNetEvent("MrNewbVehicleKeys_v2:Server:RenameKeyring", function(slot, newlabel)
local src = source
local slotData = Bridge.Inventory.GetItemBySlot(src, slot)
if type(slotData) ~= "table" then return end
slotData.metadata.label = newlabel
Bridge.Inventory.SetMetadata(src, slotData.name, slot, slotData.metadata)
end)

View file

@ -0,0 +1,33 @@
RegisterNetEvent('MrNewbVehicleKeys:Server:SendLog', function(data)
local src = source
local identifier = Bridge.Framework.GetPlayerIdentifier(src)
Bridge.Utility.SendLog(src, "Player: | ID#" .. src .. " | "..identifier.." | ".. data)
end)
RegisterNetEvent("MrNewb_VehicleKeysV2:Server:RemoveLockpick", function(lockPickType, slot)
local src = source
if not src then return DoDebugPrint("ERROR: RemoveLockpick No Source") end
--If you want the advanced lockpicks to remove then uncomment out this stuff
--if lockPickType then
--Bridge.Inventory.RemoveItem(src, Config.ItemBasedSettings.advancedlockpickItemName, 1, slot, nil)
--else
Bridge.Inventory.RemoveItem(src, Config.ItemBasedSettings.lockpickItemName, 1, slot, nil)
--end
end)
function RemoveAccountBalance(src, account, price)
return Bridge.Framework.RemoveAccountBalance(src, account, price)
end
function GetAccountBalance(src, account)
return Bridge.Framework.GetAccountBalance(src, account)
end
function NotifyPlayer(src, message, _type)
if not _type then _type = "success" end
return Bridge.Notify.SendNotify(src, message, _type, 6000)
end
function GetPlayerIdentifier(src)
return Bridge.Framework.GetPlayerIdentifier(src)
end

View file

@ -0,0 +1,97 @@
FobConfig = {
EnabledButtons = {'REMOTE_START',}, -- set this to the defualt buttons you want to use --[['EXPLODE_VEHICLE','ROOF_TOGGLE', 'SELFPARK_VEHICLE', 'SUMMON_VEHICLE'-]]
ExtraButtons = { -- set this to the extra buttons you want to use
{
number = 1,
action_id = 'REMOTE_START',
text = 'Remote Start',
description = 'This will start/stop the engine of the vehicle',
icon = 'fas fa-car',
price = 25000,
canPurchase = false,
action = function(vehicle)
local engineStatus = GetIsVehicleEngineRunning(vehicle)
SetVehicleEngineOn(vehicle, not engineStatus, true, true)
end,
},
{
number = 2,
action_id = 'ROOF_TOGGLE',
text = 'Toggle Roof',
description = 'This will open/close the roof of the vehicle',
icon = 'fas fa-car',
price = 25000,
canPurchase = false,
action = function(vehicle)
local roofState = GetConvertibleRoofState(vehicle)
if roofState == 2 then return RaiseConvertibleRoof(vehicle, false) end
LowerConvertibleRoof(vehicle, false)
end,
},
{
number = 3,
action_id = 'SELFPARK_VEHICLE',
text = 'Park Vehicle',
description = 'This will park your vehicle in the nearest parking spot',
icon = 'fas fa-car',
price = 25000,
canPurchase = false,
action = function(vehicle)
-- Please be aware this feature is something I added for fun, due to the nature of fivem itl never be perfect but by using this you accept bugs may occur.
DoVehicleSelfPark(vehicle)
end,
},
{
number = 4,
action_id = 'SUMMON_VEHICLE',
text = 'Summon Vehicle',
description = 'This will summon your vehicle to your location',
icon = 'fas fa-car',
price = 25000,
canPurchase = false,
action = function(vehicle)
-- Please be aware this feature is something I added for fun, due to the nature of fivem itl never be perfect but by using this you accept bugs may occur.
SummonVehicle(vehicle)
end,
},
{
number = 5,
action_id = 'AUTO_PILOT',
text = 'Auto Pilot',
description = 'This Will Drive Your Vehicle To The Set Waypoint',
icon = 'fas fa-car',
price = 25000,
canPurchase = true,
action = function()
-- Please be aware this feature is something I added for fun, due to the nature of fivem itl never be perfect but by using this you accept bugs may occur.
EnableAutoPilot()
end,
},
{
number = 6,
action_id = 'DANCE_MODE',
text = 'Dance Mode',
description = 'This Will Make Your Vehicle Dance',
icon = 'fas fa-car',
price = 25000,
canPurchase = true,
action = function(vehicle)
-- Please be aware this feature is something I added for fun, due to the nature of fivem itl never be perfect but by using this you accept bugs may occur.
DanceMode(vehicle)
end,
},
{
number = 7,
action_id = 'PROXIMITY_TOGGLE',
text = 'Proximity Locks',
description = 'This Will Allow You To Toggle Proximity Locks',
icon = 'fas fa-car',
price = 1000,
canPurchase = true,
action = function(vehicle)
-- Please be aware this feature is something I added for fun, due to the nature of fivem itl never be perfect but by using this you accept bugs may occur.
ExecuteCommand('proximitylocks')
end,
},
},
}

View file

@ -0,0 +1,256 @@
ParkingConfig = {
ParkingSpots = {
-- legionSq Parking, These can be iffy because the gates and pathing in the area. It is what it is, mlos that change the are only add to complications.
vector4(216.5536, -773.5043, 30.4210, 68.5943),
vector4(215.7879, -776.1614, 30.4259, 70.2589),
vector4(214.7778, -778.6617, 30.4364, 70.0988),
vector4(214.0412, -781.2578, 30.4436, 67.8297),
vector4(213.2212, -783.8340, 30.4528, 69.4862),
vector4(212.2259, -786.3449, 30.4670, 67.9735),
vector4(211.2191, -788.7724, 30.4813, 68.4553),
vector4(210.2605, -791.1945, 30.4969, 69.6803),
vector4(210.2605, -791.1945, 30.4969, 69.6803),
vector4(209.3122, -793.6119, 30.5151, 71.4489),
vector4(218.2334, -796.6345, 30.3452, 248.8618),
vector4(219.5647, -791.5513, 30.3419, 248.8551),
vector4(220.3498, -789.0867, 30.3485, 248.8456),
vector4(221.2847, -786.5503, 30.3514, 249.8745),
vector4(222.3132, -784.1670, 30.3454, 248.7818),
vector4(223.9967, -778.9752, 30.3415, 249.2326),
vector4(225.0811, -776.3969, 30.3496, 248.1942),
vector4(207.96, -795.82, 30.55, 248.81),
vector4(206.91, -798.68, 30.57, 248.97),
vector4(205.45, -800.74, 30.6, 249.38),
vector4(234.07, -771.23, 30.33, 249.64),
vector4(232.09, -776.31, 30.3, 248.31),
vector4(230.94, -778.87, 30.29, 248.97),
vector4(230.7, -781.41, 30.28, 250.6),
vector4(229.02, -783.81, 30.28, 250.06),
vector4(227.64, -789.2, 30.26, 247.99),
vector4(226.28, -791.42, 30.26, 248.95),
vector4(225.72, -794.21, 30.24, 249.28),
vector4(224.66, -796.59, 30.24, 247.01),
vector4(223.2, -798.92, 30.25, 248.79),
vector4(222.61, -801.4, 30.25, 248.1),
vector4(221.77, -804.1, 30.26, 245.92),
vector4(221.6, -806.74, 30.25, 247.77),
vector4(228.63, -768.88, 30.36, 69.31),
vector4(227.76, -771.74, 30.35, 71.5),
vector4(226.39, -773.88, 30.35, 68.62),
vector4(224.35, -778.81, 30.34, 64.93),
vector4(224.25, -781.78, 30.33, 70.11),
vector4(222.81, -784.16, 30.34, 72.1),
vector4(221.16, -786.48, 30.35, 68.66),
vector4(221.04, -789.3, 30.34, 68.07),
vector4(219.76, -791.48, 30.34, 70.29),
vector4(218.97, -794.38, 30.34, 68.04),
vector4(218.34, -796.97, 30.34, 66.59),
vector4(217.56, -799.45, 30.35, 69.51),
vector4(216.23, -801.69, 30.37, 70.17),
vector4(215.69, -804.56, 30.38, 68.56),
vector4(228.66, -786.48, 30.27, 248.6),
vector4(233.41, -774.07, 30.31, 248.68),
vector4(236.32, -812.55, 29.88, 248.26),
vector4(237.41, -809.93, 29.89, 244.26),
vector4(238.45, -807.4, 29.9, 244.04),
vector4(238.94, -804.82, 29.93, 248.53),
vector4(240.36, -802.39, 29.94, 246.63),
vector4(241.52, -799.87, 29.96, 245.68),
vector4(242.03, -797.37, 29.98, 246.08),
vector4(243.06, -794.79, 30.01, 249.35),
vector4(244.27, -792.42, 30.03, 247.07),
vector4(245.14, -789.87, 30.06, 247.13),
vector4(246.18, -787.38, 30.08, 248.58),
vector4(246.61, -784.52, 30.12, 248.32),
vector4(248.17, -782.46, 30.14, 248.95),
vector4(249.12, -779.63, 30.18, 249.01),
vector4(249.32, -776.78, 30.22, 247.42),
vector4(250.19, -774.3, 30.26, 248.86),
vector4(244.75, -772.24, 30.29, 69.17),
vector4(228.66, -786.48, 30.27, 248.6),
vector4(233.41, -774.07, 30.31, 248.68),
vector4(231.42, -810.44, 30.01, 70.18),
vector4(231.62, -807.79, 30.03, 68.27),
vector4(232.96, -805.51, 30.02, 66.62),
vector4(234.88, -803.0, 30.02, 69.62),
vector4(235.38, -800.43, 30.04, 68.23),
vector4(236.58, -797.83, 30.05, 69.89),
vector4(236.68, -795.08, 30.08, 66.13),
vector4(237.88, -792.75, 30.08, 66.76),
vector4(238.84, -790.11, 30.11, 68.34),
vector4(240.15, -787.59, 30.13, 67.55),
vector4(241.01, -785.27, 30.15, 69.84),
vector4(244.51, -775.07, 30.26, 70.7),
vector4(243.65, -777.69, 30.22, 67.25),
vector4(242.44, -779.84, 30.2, 68.04),
vector4(241.32, -782.41, 30.18, 69.19),
-- lower power -- ty Joey
vector4(48.46, -600.58, 31.05, 339.83),
vector4(45.27, -598.81, 31.05, 337.94),
vector4(41.67, -597.67, 31.05, 340.45),
vector4(38.56, -596.16, 31.05, 338.12),
vector4(34.99, -595.47, 31.05, 340.89),
vector4(31.2, -593.92, 31.05, 339.65),
vector4(27.64, -592.9, 31.05, 341.86),
vector4(7.72, -596.58, 31.05, 251.56),
vector4(9.52, -592.97, 31.05, 249.91),
vector4(10.79, -589.67, 31.05, 248.15),
vector4(11.64, -586.28, 31.05, 250.38),
vector4(13.02, -582.73, 31.05, 250.56),
vector4(14.43, -579.28, 31.05, 250.48),
vector4(15.79, -575.91, 31.05, 250.57),
vector4(16.99, -572.2, 31.05, 250.35),
vector4(32.27, -579.78, 31.05, 338.59),
vector4(36.28, -581.01, 31.05, 342.11),
vector4(39.79, -581.82, 31.05, 339.93),
vector4(42.7, -583.86, 31.05, 338.52),
vector4(46.25, -584.88, 31.05, 343.14),
vector4(49.66, -586.2, 31.05, 341.91),
vector4(53.64, -586.94, 31.05, 341.75),
vector4(57.03, -588.71, 31.05, 340.63),
vector4(64.95, -576.19, 31.05, 163.06),
vector4(68.08, -577.66, 31.05, 154.95),
vector4(72.16, -578.61, 31.05, 155.89),
vector4(73.41, -586.19, 31.05, 69.64),
vector4(72.48, -589.82, 31.05, 67.8),
vector4(70.89, -592.9, 31.05, 68.41),
vector4(69.46, -596.76, 31.05, 68.6),
vector4(67.89, -600.17, 31.05, 69.91),
vector4(67.24, -603.68, 31.05, 67.92),
vector4(65.89, -607.19, 31.05, 68.69),
vector4(64.22, -611.22, 31.1, 68.4),
vector4(54.68, -638.55, 31.09, 246.21),
vector4(53.23, -641.75, 31.06, 69.7),
vector4(52.06, -645.06, 31.05, 70.13),
vector4(50.58, -648.56, 31.05, 67.35),
vector4(49.61, -652.33, 31.05, 69.85),
vector4(48.33, -655.49, 31.05, 68.67),
vector4(47.37, -659.23, 31.05, 69.73),
vector4(45.67, -662.47, 31.05, 66.96),
--Alta Apartments
vector4(-297.71, -990.11, 30.76, 338.79),
vector4(-301.09, -988.82, 30.76, 339.11),
vector4(-304.64, -987.72, 30.76, 339.36),
vector4(-308.09, -986.34, 30.76, 339.47),
vector4(-311.46, -985.08, 30.76, 339.5),
vector4(-315.07, -983.98, 30.76, 339.18),
vector4(-318.71, -982.49, 30.76, 338.43),
vector4(-285.76, -888.04, 30.76, 168.44),
vector4(-289.39, -887.34, 30.76, 168.59),
vector4(-292.99, -886.36, 30.76, 167.4),
vector4(-296.78, -885.82, 30.75, 167.93),
vector4(-300.35, -885.14, 30.76, 167.76),
vector4(-303.82, -884.06, 30.76, 167.76),
vector4(-307.59, -883.44, 30.76, 167.24),
vector4(-311.16, -882.7, 30.76, 166.92),
vector4(-314.74, -881.99, 30.75, 166.91),
vector4(-318.34, -881.19, 30.75, 167.5),
vector4(-322.02, -880.47, 30.75, 167.75),
vector4(-325.62, -879.65, 30.75, 168.31),
vector4(-329.11, -878.9, 30.75, 168.35),
vector4(-332.88, -878.22, 30.75, 167.35),
vector4(-336.55, -877.38, 30.75, 168.02),
vector4(-340.1, -876.67, 30.75, 167.45),
vector4(-343.78, -875.91, 30.75, 167.01),
vector4(-352.86, -874.08, 30.75, 0.76),
vector4(-360.26, -889.43, 30.75, 269.23),
vector4(-360.46, -893.17, 30.75, 268.23),
vector4(-360.24, -896.83, 30.75, 270.26),
vector4(-360.37, -900.58, 30.75, 268.61),
vector4(-360.29, -904.27, 30.75, 269.75),
vector4(-360.14, -908.01, 30.75, 270.4),
vector4(-360.5, -911.66, 30.76, 269.55),
vector4(-360.12, -915.4, 30.76, 269.63),
vector4(-360.28, -919.07, 30.76, 270.11),
vector4(-360.56, -922.77, 30.75, 268.41),
vector4(-360.46, -926.49, 30.76, 270.43),
vector4(-360.37, -930.12, 30.76, 269.72),
vector4(-360.22, -933.88, 30.76, 270.34),
vector4(-360.28, -937.58, 30.76, 269.99),
vector4(-360.47, -941.31, 30.75, 269.54),
vector4(-360.28, -944.99, 30.76, 270.14),
vector4(-360.32, -948.72, 30.76, 269.82),
vector4(-360.38, -952.44, 30.75, 269.95),
vector4(-360.57, -956.16, 30.76, 270.31),
vector4(-322.02, -981.29, 30.76, 339.92),
vector4(-325.56, -980.1, 30.76, 340.1),
vector4(-329.0, -978.69, 30.76, 338.49),
vector4(-332.49, -977.59, 30.76, 339.58),
vector4(-335.9, -976.3, 30.76, 339.7),
vector4(-339.43, -975.08, 30.76, 339.47),
vector4(-342.7, -973.45, 30.76, 338.85),
vector4(-326.58, -956.4, 30.75, 250.37),
vector4(-325.37, -952.84, 30.76, 250.47),
vector4(-324.03, -949.43, 30.76, 250.37),
vector4(-322.69, -945.96, 30.75, 249.91),
vector4(-321.47, -942.43, 30.76, 250.29),
vector4(-320.23, -939.06, 30.76, 250.38),
vector4(-318.8, -935.56, 30.76, 249.46),
vector4(-317.66, -932.03, 30.76, 250.73),
vector4(-316.5, -928.43, 30.76, 250.15),
vector4(-345.07, -932.2, 30.76, 69.27),
vector4(-343.99, -928.61, 30.76, 70.11),
vector4(-342.58, -925.18, 30.76, 70.69),
vector4(-341.39, -921.67, 30.76, 69.83),
vector4(-327.34, -924.44, 30.76, 69.82),
vector4(-328.81, -927.89, 30.76, 69.43),
vector4(-330.09, -931.33, 30.76, 70.81),
vector4(-331.29, -934.83, 30.76, 70.29),
vector4(-332.71, -938.34, 30.76, 69.75),
vector4(-333.91, -941.81, 30.76, 69.46),
vector4(-335.02, -945.3, 30.75, 71.24),
vector4(-336.56, -948.74, 30.75, 70.65),
vector4(-337.69, -952.22, 30.76, 70.31),
vector4(-340.74, -902.45, 30.75, 167.89),
vector4(-337.18, -903.24, 30.75, 167.65),
vector4(-333.64, -903.98, 30.75, 167.05),
vector4(-329.93, -904.61, 30.75, 167.95),
vector4(-326.38, -905.62, 30.75, 168.51),
vector4(-322.65, -906.2, 30.75, 167.96),
vector4(-318.98, -906.94, 30.75, 168.06),
vector4(-315.39, -907.89, 30.75, 166.81),
vector4(-311.81, -908.81, 30.75, 167.5),
vector4(-308.14, -909.33, 30.75, 167.34),
vector4(-285.56, -921.9, 30.76, 70.14),
vector4(-283.75, -918.52, 30.76, 70.23),
vector4(-282.97, -914.81, 30.75, 69.93),
vector4(-281.65, -911.4, 30.76, 69.49),
vector4(-280.5, -908.04, 30.76, 69.51),
vector4(-279.28, -904.45, 30.76, 70.18),
vector4(-302.07, -933.44, 30.75, 69.9),
vector4(-303.19, -937.09, 30.76, 70.71),
vector4(-304.56, -940.34, 30.76, 70.04),
vector4(-305.74, -943.95, 30.76, 70.49),
vector4(-307.19, -947.34, 30.76, 69.04),
vector4(-308.26, -950.95, 30.76, 70.24),
vector4(-309.63, -954.35, 30.76, 68.9),
vector4(-310.83, -957.88, 30.76, 69.56),
vector4(-312.07, -961.38, 30.76, 70.21),
vector4(-313.39, -964.8, 30.76, 68.92),
vector4(-298.26, -899.82, 30.66, 346.23),
vector4(-302.47, -898.86, 30.66, 348.7),
vector4(-305.9, -898.52, 30.66, 351.35),
vector4(-309.58, -897.38, 30.66, 347.24),
vector4(-313.04, -896.37, 30.65, 349.98),
vector4(-316.74, -895.46, 30.65, 347.83),
vector4(-320.36, -894.95, 30.65, 348.97),
vector4(-324.05, -893.86, 30.65, 348.71),
vector4(-327.67, -893.18, 30.65, 347.61),
vector4(-331.02, -892.69, 30.65, 346.03),
vector4(-334.83, -891.72, 30.65, 350.2),
vector4(-338.6, -891.08, 30.65, 348.34),
--cityhall
vector4(-475.26, -219.26, 36.05, 30.12),
vector4(-478.26, -214.06, 36.21, 30.11),
vector4(-481.41, -208.59, 36.37, 30.32),
vector4(-484.34, -203.49, 36.52, 30.67),
vector4(-487.17, -198.51, 36.67, 30.37),
vector4(-490.26, -193.18, 36.83, 29.72),
vector4(-493.21, -187.98, 36.99, 29.64),
vector4(-496.19, -182.75, 37.14, 29.96),
vector4(-499.21, -177.5, 37.3, 30.1),
},
}

View file

@ -0,0 +1,235 @@
-- ___ ___ _ _ _ _____ _ _
-- | \/ | | \ | | | | / ___| (_) | |
-- | . . | _ __ | \| | ___ __ __| |__ \ `--. ___ _ __ _ _ __ | |_ ___
-- | |\/| || '__|| . ` | / _ \\ \ /\ / /| '_ \ `--. \ / __|| '__|| || '_ \ | __|/ __|
-- | | | || | | |\ || __/ \ V V / | |_) |/\__/ /| (__ | | | || |_) || |_ \__ \
-- \_| |_/|_| \_| \_/ \___| \_/\_/ |_.__/ \____/ \___||_| |_|| .__/ \__||___/
-- | |
-- |_|
--
-- Need support? Join our Discord server for help: https://discord.gg/mrnewbscripts
-- If you need help with configuration or have any questions, please do not hesitate to ask.
-- Docs Are Always Available At -- https://mrnewbs-scrips.gitbook.io/guide
Config = {}
Config.Utility = {
Debug = false, -- DO NOT ENABLE THIS UNLESS YOU KNOW WHAT YOU ARE DOING!
EngineToggle = true, -- set this to true to use my engine toggle command and keybind, if you have a hud/command that already has this set it as false to prevent overlap.
}
Config.KeybingSettings = {
LockKeyBind = "l", -- set this to the defualt keybind you want to use for the lock/unlock feature. (players can rebind this)
HotWireBind = "e", -- set this to the defualt keybind you want to use for the hotwire feature.
EngineKeyBind = "g", -- set this to the defualt keybind you want to use for the engine toggle feature from line 21 here in the config. (players can rebind this)
Keyring = "f5", -- set this to the defualt keybind you want to use for the keyring feature (only for non item setting). (players can rebind this)
}
Config.HotWireSettings = {
Cooldown = true,
HotWireCooldownTime = 4000, -- set this to the cooldown time between hotwiring attempts on a vehicle in milliseconds (1000 = 1 second)
MaxAttempts = 3, -- set this to the maximum number of hotwire attempts per vehicle
GrantVehicleKeysOnHotWire = true, -- set this to false to disable the key being given on successful hotwire. If you dont grant the key it has a "hotwired status" that allows engine toggle and to drive it only.
}
Config.VehicleSettings = {
HotwireDisabled = false, -- set this to true to disable the hotwire features, this will make it so a player can just get in and drive the car without the keys. This forces keys to mainly focus on lock/unlocking.
EngineRemainsOnWhenExiting = false, -- set this to true to keep a vehicle running when exiting it, this is a more realistic approach where youd have to turn it off when getting out or leave it on if you want to plan an escape etc.
GiveKeysIfEngineRunning = false, -- set this to true to grant the keys on entering the vehicles that are running (like real life keys would be in the ignition right?), anyone who enters driver seat while its running will get a key.
IsFronk = {
-- this is the door index, its for if a car has a trunk in the front etc
[`adder`] = 4,
[`reaper`] = 4,
[`torero`] = 5,
[`t20`] = 4,
},
JobBypassKeys = {
-- This is to make it so the listed job does not require keys for the listed vehicles
-- If a cop gets in another cop car they can just drive, but if they get in a civ car they need keys.
--[[
["JobName"] = { -- this is the job name, anthing in this table will be bypassed with this job
"vehiclename" -- this is the spawn name of the vehicle.
},
--]]
["police"] = {
[`police`] = true,
[`police2`] = true,
[`polmav`] = true,
},
["ambulance"] = {
[`ambulance`] = true,
[`polmav`] = true,
},
},
No_Key_Required_Vehicles = {
[`bmx`] = true,
[`cruiser`] = true,
[`scorcher`] = true,
[`tribike2`] = true,
[`tribike3`] = true,
[`fixter`] = true,
[`tribike`] = true,
[`inductor`] = true,
[`inductor2`] = true,
--put other vehicles you wish to remove key requirements from here
--this must be the model name itself
},
ElectricVehicles = {
[`dilettante2`] = true,
[`voltic`] = true,
[`voltic2`] = true,
[`dilettante`] = true,
[`pipistrello`] = true,
[`omnisegt`] = true,
[`surge`] = true,
[`khamelion`] = true,
[`raiden`] = true,
[`mower`] = true,
[`coureur`] = true,
[`buffalo5`] = true,
[`cyclone`] = true,
[`neon`] = true,
[`tezeract`] = true,
[`imorgon`] = true,
[`iwagen`] = true,
[`virtue`] = true,
[`vivanite`] = true,
[`envisage`] = true,
-- this is a list of all known vanilla electric vehicles, if you have a custom one you can add it here
},
ConvertableVehicles = {
[`ninef2`] = true,
[`cogcabrio`] = true,
[`felon2`] = true,
[`carbonizzare`] = true,
[`rt3000`] = true,
[`issi2`] = true,
[`tornado2`] = true,
[`rapidgt2`] = true,
[`sentinel2`] = true,
[`zion2`] = true,
[`comet7`] = true,
[`surano`] = true,
[`windsor2`] = true,
[`tornado5`] = true,
[`Vigero3`] = true,
[`dominator9`] = true,
-- this is a list of all known vanilla convertable vehicles, if you have a custom one you can add it here
},
HijackImmune = {
--[`police`] = true,
-- this is a list of vehicles that are immune to hijacking, if you have a custom one you can add it here. ie prevent civs from stealing cop cars
}
}
Config.VehicleLockingChance = {
EnableLocalVehicleLocking = true, -- set this to to true to enable the chance of the local vehicles being locked, parked/driving otherwise only locked vehicles will be set by spawning locked or set by a player with keys
UnlockedChance = 50, -- set this to the percentage chance that local vehicles will be unlocked. Set to 0 to lock all cars (both parked and driving)
}
Config.ItemBasedSettings = {
lockpickItemName = "lockpick", -- set this to the itemname that would be used for the lockpick
advancedlockpickItemName = "advancedlockpick", -- set this to the itemname that would be used for the advanced lockpick
using_key_items = true, -- set this to true if you want to use the keys as an item
DisableKeyFobUI = false, -- set this to true if you want to use the keys as an item WITHOUT UI
vehicleKeysItem = "vehiclekeys", -- set this to the itemname that would be used for the keys
keyRingItem = "keyring", -- set this to the itemname that would be used for the keyring
LockChangeSystemEnabled = true, -- set this to true to enable the lock change system (this will allow players to change the lock on a vehicle making old item based keys useless)
locksystemItem = "aftermarket_locks", -- set this to the itemname that would be used for the lock change
FallBackTimerCheck = 3000, -- set this to the time in milliseconds that the script will check for keys if they are not found on the player, 3000 = 3 seconds and seems fair. lower the number if you want it to check more often.
}
Config.LockSmithSettings = {
-- please be aware if you dont own a vehicle through the framework tables you will not be able to purchaase spare keys
SpareKeyPrice = 500, -- set to to the price of a spare key
KeyRingPrice = 50, -- set to the price of a key ring
Locations = {
["Dirks Locksmithing"] = {
coords = vector4(170.3532, -1799.5085, 28.34, 327.1338),
pedmodel = "u_m_y_pogo_01",
distance = 100,
blipSprite = 811, -- if you use an outdated hud use 186, if you use a newer hud use 811 or if you want no blip comment this line out
blipColor = 1,
blipDisplay = 4,
blipScale = 1.2,
},
--[[
-- The below is an example for how to add more locations
freds = {
coords = vector4(1036.2108, -2111.0986, 32.6040, 357.9673),
pedmodel = "u_m_y_pogo_01",
distance = 100,
blipSprite = 186,
blipColor = 1,
blipDisplay = 4,
blipScale = 1.2,
}--]]
},
}
Config.AnimationSettings = {
animDict = "veh@break_in@0h@p_m_one@", -- set to the animation dictionary for progressbar
anim = "low_force_entry_ds", -- set to the animation name for progressbar
keyProp = "prop_cuff_keys_01", -- set to the prop name for the keys used when locking/unlocking a car
}
Config.Prefrences = {
HelpTextPostion = "right-center", -- set this to the position of the help text messages (the ones that say press e to hotwire)
UseThirdPartyLockpick = false, -- set this to true to use a third party lockpick system, set to false to use the built in one here. This is for compatability with qb-smallresources/other lockpick systems in housing scripts. If you need to alter it its in shared/init.lua
LockpickAlertChance = 100, -- set this to the percentage chance that a dispatch alert will be sent when a vehicle is lockpicked -- set to 0 to never alert
HotwireAlertChance = 100, -- set this to the percentage chance that a dispatch alert will be sent when a vehicle is Hotwired -- set to 0 to never alert
LockpickBreakChance = 50, -- set this to the percentage chance that the lockpick will break when lockpicking fails, set to 100 to never break
HijackingAlertChance = 100, -- set this to the percentage chance that a dispatch alert will be sent when a vehicle is hijacked -- set to 0 to never alert
TargetVehicleFunctionsEnabled = true, -- set this to true to enable the target features on cars to lock/unlock/toggle engine etc
DisableVehicleAutoStart = false, -- set this to true to disable the auto start of the vehicle when entering
LockPickMiniGame = "ox", -- set this to the minigame you want to use for lockpicking "ox", "bagus", "ps-ui", "bl-progress", "bl-keyspam", "bl-circle", "bl-printlock", "t3_lockpick", "xmmx", "rainmadlockpick", "rainmadaction", "rainmadquick", "rainmadmash", "rainmadangled", "false" (false for none and always success)
HotWireMiniGame = "ox", -- set this to the minigame you want to use for hotwiring "ox", "bagus", "ps-ui", "bl-progress", "bl-keyspam", "bl-circle", "bl-printlock", "t3_lockpick", "xmmx", "rainmadlockpick", "rainmadaction", "rainmadquick", "rainmadmash", "rainmadangled", "false" (false for none and always success)
ProximityLocking = { -- set this to true to enable the proximity locking system for cars you have keys to
enabled = true,
lockdistance = 12, -- set this to the distance for the proximity locking system when the vehicle is locked
unlockdistance = 5, -- set this to the distance for the proximity locking system when the vehicle is unlocked
},
DispatchAlertJobs = {
-- set this to the jobs that will receive dispatch alerts for hotwire/lockpick etc
"police"
},
ForceUnlockJobs = {
-- set this to the jobs that will be able to force unlock vehicles (ie cops or whatever you want)
"ambulance",
"mechanic",
"police",
},
}
function AdditionalProximityChecks()
-- these are additional checks you can do for the proximity locking system
-- for example if a player is dead or handcuffed you wouldnt want them to be able to lock/unlock a car when a ems comes
if Bridge.Framework.GetIsPlayerDead() then return false end
if GetResourceState("wasabi_police") == "started" then
if exports.wasabi_police:IsHandcuffed() then return false end
end
if GetResourceState("qb-policejob") == "started" then
if exports["qb-policejob"]:IsHandcuffed() then return false end
end
--if LocalPlayer.state.inv_busy then return false end
--if LocalPlayer.state.cuffed then return false end
-- you can add additional checks for proximity locking here.
-- return false to disable proximity locking on this condition
return true
end
Config.CustomCarsMissingLabels = {
-- This is for messed up cars that display "NULL" in the garage menus/When hitting z in a car.
-- This will also prevent keyfobs from saying "NULL" as the name of the vehicle
-- If you already have something fixing these ignore this
-- This is just a additional option to help you.
--{model = "spawnname", label = "desired in game name"},
{model = "aerocab", label = "Aerocab"},
{model = "blacktop", label = "Blacktop"},
{model = "brickades", label = "Brickades"},
{model = "linerunner", label = "linerunner"},
{model = "vetirs", label = "Vetirs"},
}

View file

@ -0,0 +1,45 @@
Bridge = exports.community_bridge:Bridge()
function locale(message)
return Bridge.Language.Locale(message)
end
function TableContains(table, value, nested)
if not table then return false end
return lib.table.contains(table, value)
end
function GetClosestVehicle(coords, distance, includePlayerVeh)
local veh = lib.getClosestVehicle(coords, distance, includePlayerVeh)
return veh
end
function DoDebugPrint(message)
if not Config.Utility.Debug then return end
return Bridge.Prints.Debug(message)
end
function VerifyValidEntity(entity)
return entity and entity ~= -1 and DoesEntityExist(entity) and GetEntityType(entity) ~= 0 or false
end
function TrimString(plate)
local stringIfy = tostring(plate)
return stringIfy:match("^%s*(.-)%s*$"):upper()
end
function GenerateRandomString()
return Bridge.Ids.RandomLower(nil, 8)
end
if not IsDuplicityVersion() then return end
if Config.Prefrences.UseThirdPartyLockpick then return end
Bridge.Framework.RegisterUsableItem(Config.ItemBasedSettings.advancedlockpickItemName, function(src, itemData)
TriggerClientEvent('lockpicks:UseLockpick', src, true, itemData.slot)
end)
Bridge.Framework.RegisterUsableItem(Config.ItemBasedSettings.lockpickItemName, function(src, itemData)
TriggerClientEvent('lockpicks:UseLockpick', src, false, itemData.slot)
end)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link href="https://fonts.googleapis.com/css2?family=Akshar:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Key Fob</title>
<script type="module" crossorigin src="./assets/index-Iv9lEw8I.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-Crx3Is11.css">
</head>
<body style="overflow:hidden">
<div id="root"></div>
</body>
</html>