Giter VIP home page Giter VIP logo

mojiagarages's People

Contributors

bluesky-fur avatar dragon703 avatar dxmaxi avatar evanillaa avatar gubner avatar hoangducvn avatar holidayy95 avatar idrisdose avatar idrp avatar mrrasmus avatar stolk88 avatar trclassic92 avatar xenfovn avatar zh-development avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mojiagarages's Issues

I can't park the vehicle

hello could someone help me with this this error is appearing "no such export HasVehiclekey in resource qb-vehiclekeys" and I can no longer park the vehicle in the garage. Can someone help me?
20220204235643_1

[Issue] - Nothing showing when using Radial Menu

I have updated everything, and ensured that it all works, but now the menu isn't showing when using the radial menu, I haven't tried using your radial menu, as I want to use the one I have. What would be the problem?

Problems with the keys

Hey, when the server is restart, all the cars lost the owner keys and nobody can unlock him cars.. Somebody can help me please?
Thanks.

Issue

Every time I restart the server, the car is locked and I can't unlock it. It says I don't have the vehicle keys. I did all the read me btw

[question/help] New SQL update and clientsite error

I updated you're script for the new sql update.
Maybe i can send you so you can take a look.

Since the last update i get a client side error (clean database and all)
SCRIPT ERROR: @MojiaGarages/client.lua:870: attempt to index a nil value (local 'oldmodifications')
object not a string...

You know what i dit wrong there?

[Issue] - /impound

When the police impound the car, it's not showing in the impound, no F8 error, nor any Console errors!

Issue with "Reallife Parking?"

So, since the Update we installed the whole GarageSystem completly new.

now we get the issue that the "Reallife Parking" Update seems to be broken, when we buy cars the following error appears

[      script:oxmysql] SCRIPT ERROR in promise (unhandled): Error: qb-vehicleshop was unable to execute a query!
[      script:oxmysql]     Field 'posX' doesn't have a default value
[      script:oxmysql]     INSERT INTO player_vehicles (license, citizenid, vehicle, hash, mods, plate, state) VALUES ('license:d58604e18fe0791373e3538c85dc5ec1f66f8d7b', 'QLA32814', 'npolvette', -1109563416, '{}', '4MG573HZ', 0)
[      script:oxmysql] > query_default (@oxmysql/dist/server/build.js:16103)
[      script:oxmysql] > runMicrotasks (<anonymous>:0)
[      script:oxmysql] > processTicksAndRejections (node:internal/process/task_queues:96)
[      script:oxmysql] 

A few issues

Ive noticed a few issues and i think they are related to the garage and vehicle keys
Screenshot 2022-02-16 162314
Screenshot 2022-02-16 162421

[Question] Hello

So my question is:
Is the garage now fully set up with houses because that was the only thing holding me back from using it. thanks in advance

Cars always broken when getting them from garages

i followed your instructions. and everytime i pull my car out of the garage it comes out completely damaged with no fuel. the qb-menu that shows the cars says the body, engine, fuel, ect is all 0%.

Sell Vehicle issue

When i'm trying to sell my vehicle at the used vehicle sales lot nothing happens with either option so resell you vehicle.
i'm getting no errors in the console at all.

[SMALL STUFF]

When i use the real life parking.. en restart the server ;) . The checkvehiclekey does not work.
Do you know where to look?
p.s. you're a legend!

PolyZone error

when you are under a job that has a station and you change into another job using the setjob command the following print from polyzone keeps repeating itself over and over and over on a loop and it doesn't stop until server restart or /logout https://puu.sh/ICvB7.png

[Question]

What vehiclekey script are you using?
I'm fighting with qb-vehiclekeys for a year now...

The qb-radialmenu scripts works perfect, the only thing i have to do for it to work is restart the resource after server restart..
Do you know a quickfix for the added piece of script?

optimizing issue

Hello,
your work is awesome and i think its best Garage script
after last fix
resmon jumps from 0.08 to 0.70 MojiaGarages
it does fixed duplicate vehicles but now game lag

Thank you! we appreciate your work
image

Vehicle disappearing

I have not found a pattern to reproduce it yet but, I am running into an issue where sometimes vehicles are stored into a garage and are unable to be pulled out. Checking my database and phone shows the car in garage "none".

Any ideas on what could potentially cause this?

[AGAIN]

I'm sorry i'm so in love with this script, i can't stand why sometimes i can't fix things myself...

When ik take out multiple cars (realparking)
And the server resets... you only have the keys to one of the outside vehicles..

Do you know a fix.. or where to look?

DB Error

So, when you try to buy a car from the vehicleshop it presents with the following error
https://puu.sh/ICvyu.png
and the vehicle doesn't get saved in the DB
when you try to /admincar any car it gives an error referring to the columns that we added in the new SQL that was attached to the script saying field 'modifications' doesn't have a default value.

no spawn

Car garages great but doesnt spawn when I try. Makes the little noise like something is stopping it. No errors, correct trigger. Has anyone seen?

Error vector4 in console

Hey, i've updated qb-core, oxmysql and mojiagarages today, but i've one error in console:

[ script:MojiaGarages] SCRIPT ERROR: @MojiaGarages/server.lua:384: bad argument #1 to 'vector3' (invalid vector type)

Somebody can help me please? Thanks

LAST UPDATE

I'm currently using you're latest update.
No more loss of player vehicles works like a charm!!
A true legandary script, and thank you very much!

Right now there is something with duplicating personal cars while realparking.
I think it has something to do with the script working to fast spawning realparked cars?

Even when somebody tries to store there vehicle in a 'normal' garage it happens that there's also a copy left behind.
But that looks like its random and not always happening.

No Parking in the Garage

Hello, first of all a big thank you for the great work.
I've gone through everything step by step, but unfortunately the car can't be parked in the garage and I've got everything in it for the store event.

[REQUEST] Gang option for garages

Are you able to add gang specific garages? Giving us the choice to be able to do either jobs or gangs?

Amazing script by the way!

Issue with qb-houses

i create house and if i want to see option for buy i have to logout. When i join again i can buy house and when i buy i cant enter in and didnt show me garage which i was add before. I have to restart whole server and then everything is fine (like he didnt update in real time)

[Bug] I know this was intended but hear me out.

So great work on the garage system.
But the impound the fact that player can total his vehicle goes to impound and pull it out again or for example, someone throws the other player car into the ocean the player is like "aight bet" just goes to impound and pulls it out again you see what I mean?
This method can be abused in so many ways and there is no limit to it

[BUG] NULL MODS

Hello! Sometimes cars get null mods and people can't open the garage because of it.
image
image

[Issue] - Not using default qb-vehiclekeys

This is the server.lua in the vehiclekeys I'm using, where would I add the export in the file for the garages to work?

-- Variables

local QBCore = exports['qb-core']:GetCoreObject()
local HasKey = false
local IsRobbing = false
local IsHotwiring = false
local AlertSend = false
local lockpicked = false
local lockpickedPlate = nil
local usingAdvanced

-- Functions

local function HasKey(plate)
QBCore.Functions.TriggerCallback('vehiclekeys:CheckHasKey', function(result)
if result then
HasKey = true
else
HasKey = false
end
end, plate)
return HasKey
end

function LockVehicle()
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)
local veh = QBCore.Functions.GetClosestVehicle(pos)
local plate = QBCore.Functions.GetPlate(veh)
local vehpos = GetEntityCoords(veh)
if IsPedInAnyVehicle(ped) then
veh = GetVehiclePedIsIn(ped)
end
if veh ~= nil and #(pos - vehpos) < 7.5 then
QBCore.Functions.TriggerCallback('vehiclekeys:CheckHasKey', function(result)
if result then
local vehLockStatus = GetVehicleDoorLockStatus(veh)
loadAnimDict("anim@mp_player_intmenu@key_fob@")
TaskPlayAnim(ped, 'anim@mp_player_intmenu@key_fob@', 'fob_click', 3.0, 3.0, -1, 49, 0, false, false, false)

            if vehLockStatus == 1 then
                Wait(750)
                ClearPedTasks(ped)
                TriggerServerEvent("InteractSound_SV:PlayWithinDistance", 5, "lock", 0.3)
                SetVehicleDoorsLocked(veh, 2)
                if (GetVehicleDoorLockStatus(veh) == 2) then
                    SetVehicleLights(veh, 2)
                    Wait(250)
                    SetVehicleLights(veh, 1)
                    Wait(200)
                    SetVehicleLights(veh, 0)
                    QBCore.Functions.Notify("Vehicle locked!")
                else
                    QBCore.Functions.Notify("Something went wrong with the locking system!")
                end
            else
                Wait(750)
                ClearPedTasks(ped)
                TriggerServerEvent("InteractSound_SV:PlayWithinDistance", 5, "unlock", 0.3)
                SetVehicleDoorsLocked(veh, 1)
                if (GetVehicleDoorLockStatus(veh) == 1) then
                    SetVehicleLights(veh, 2)
                    Wait(250)
                    SetVehicleLights(veh, 1)
                    Wait(200)
                    SetVehicleLights(veh, 0)
                    QBCore.Functions.Notify("Vehicle unlocked!")
                else
                    QBCore.Functions.Notify("Something went wrong with the locking system!")
                end
            end
        else
            QBCore.Functions.Notify('You don\'t have the keys of the vehicle..', 'error')
        end
    end, plate)
end

end

function LockpickDoor(isAdvanced)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)
local vehicle = QBCore.Functions.GetClosestVehicle(pos)
if vehicle ~= nil and vehicle ~= 0 then
local vehpos = GetEntityCoords(vehicle)
if #(pos - vehpos) < 2.5 then
local vehLockStatus = GetVehicleDoorLockStatus(vehicle)
if (vehLockStatus >= 2) then
usingAdvanced = isAdvanced
loadAnimDict("veh@break_in@0h@p_m_one@")
if usingAdvanced then
TaskPlayAnim(ped, "veh@break_in@0h@p_m_one@", "low_force_entry_ds", 3.0, 3.0, -1, 16, 0, 0, 0, 0)
local seconds = math.random(9,12)
local circles = math.random(1,3)
local success = exports['qb-lock']:StartLockPickCircle(circles, seconds, success)
lockpickFinish(success)
else
TaskPlayAnim(ped, "veh@break_in@0h@p_m_one@", "low_force_entry_ds", 3.0, 3.0, -1, 16, 0, 0, 0, 0)
local seconds = math.random(7,10)
local circles = math.random(2,4)
local success = exports['qb-lock']:StartLockPickCircle(circles, seconds, success)
lockpickFinish(success)
end
end
end
end
end

function lockpickFinish(success)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)
local vehicle = QBCore.Functions.GetClosestVehicle(pos)
local chance = math.random()
StopAnimTask(PlayerPedId(), "veh@break_in@0h@p_m_one@", "low_force_entry_ds", 1.0)
if success then
TriggerServerEvent('hud:server:GainStress', math.random(1, 4))
QBCore.Functions.Notify('Opened Door!', 'success')
SetVehicleDoorsLocked(vehicle, 1)
lockpicked = true
lockpickedPlate = QBCore.Functions.GetPlate(vehicle)
else
PoliceCall()
TriggerServerEvent('hud:server:GainStress', math.random(1, 4))
lockpicked = false
lockpickedPlate = QBCore.Functions.GetPlate(vehicle)
end
if usingAdvanced then
if chance <= Config.RemoveLockpickAdvanced then
TriggerEvent('inventory:client:ItemBox', QBCore.Shared.Items["advancedlockpick"], "remove")
TriggerServerEvent("QBCore:Server:RemoveItem", "advancedlockpick", 1)
end
else
if chance <= Config.RemoveLockpickNormal then
TriggerEvent('inventory:client:ItemBox', QBCore.Shared.Items["lockpick"], "remove")
TriggerServerEvent("QBCore:Server:RemoveItem", "lockpick", 1)
end
end
end

function Hotwire()
if not HasKey then
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, true)
IsHotwiring = true
lockpickedPlate = nil
local hotwireTime = math.random(20000, 40000)
SetVehicleAlarm(vehicle, true)
SetVehicleAlarmTimeLeft(vehicle, hotwireTime)
PoliceCall()
QBCore.Functions.Progressbar("hotwire_vehicle", "Engaging the ignition switch", hotwireTime, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true
}, {
animDict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@",
anim = "machinic_loop_mechandplayer",
flags = 16
}, {}, {}, function() -- Done
StopAnimTask(ped, "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
if (math.random() <= Config.HotwireChance) then
lockpicked = false
TriggerServerEvent('hud:server:GainStress', math.random(1, 4))
TriggerEvent('vehiclekeys:client:SetOwner', QBCore.Functions.GetPlate(vehicle))
QBCore.Functions.Notify("Hotwire succeeded!")
else
SetVehicleEngineOn(veh, false, false, true)
TriggerServerEvent('hud:server:GainStress', math.random(1, 4))
QBCore.Functions.Notify("Hotwire failed!", "error")
end
IsHotwiring = false
end, function() -- Cancel
StopAnimTask(ped, "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
SetVehicleEngineOn(veh, false, false, true)
QBCore.Functions.Notify("Hotwire failed!", "error")
IsHotwiring = false
end)
end
end

function PoliceCall()
if not AlertSend then
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)
local chance = Config.PoliceAlertChance
if GetClockHours() >= 1 and GetClockHours() <= 6 then
chance = Config.PoliceNightAlertChance
end
if math.random() <= chance then
local closestPed = GetNearbyPed()
if closestPed ~= nil then
local msg = ""
local s1, s2 = GetStreetNameAtCoord(pos.x, pos.y, pos.z)
local streetLabel = GetStreetNameFromHashKey(s1)
local street2 = GetStreetNameFromHashKey(s2)
if street2 ~= nil and street2 ~= "" then
streetLabel = streetLabel .. " " .. street2
end
local alertTitle = ""
if IsPedInAnyVehicle(ped) then
local vehicle = GetVehiclePedIsIn(ped, false)
local modelName = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)):lower()
if QBCore.Shared.Vehicles[modelName] ~= nil then
Name = QBCore.Shared.Vehicles[modelName]["brand"] .. ' ' .. QBCore.Shared.Vehicles[modelName]["name"]
else
Name = "Unknown"
end
local modelPlate = QBCore.Functions.GetPlate(vehicle)
local msg = "Vehicle theft attempt at " .. streetLabel .. ". Vehicle: " .. Name .. ", Licenseplate: " .. modelPlate
local alertTitle = "Vehicle theft attempt at"
TriggerServerEvent("police:server:VehicleCall", pos, msg, alertTitle, streetLabel, modelPlate, Name)
else
local vehicle = QBCore.Functions.GetClosestVehicle()
local modelName = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)):lower()
local modelPlate = QBCore.Functions.GetPlate(vehicle)
if QBCore.Shared.Vehicles[modelName] ~= nil then
Name = QBCore.Shared.Vehicles[modelName]["brand"] .. ' ' .. QBCore.Shared.Vehicles[modelName]["name"]
else
Name = "Unknown"
end
local msg = "Vehicle theft attempt at " .. streetLabel .. ". Vehicle: " .. Name .. ", Licenseplate: " .. modelPlate
local alertTitle = "Vehicle theft attempt at"
TriggerServerEvent("police:server:VehicleCall", pos, msg, alertTitle, streetLabel, modelPlate, Name)
end
end
end
AlertSend = true
SetTimeout(Config.AlertCooldown, function()
AlertSend = false
end)
end
end

function RobVehicle(target)
IsRobbing = true
loadAnimDict('mp_am_hold_up')
TaskPlayAnim(target, "mp_am_hold_up", "holdup_victim_20s", 8.0, -8.0, -1, 2, 0, false, false, false)
QBCore.Functions.Progressbar("rob_keys", "Attempting Robbery..", 6000, false, true, {}, {}, {}, {}, function()
local chance = math.random()
if chance <= Config.RobberyChance then
veh = GetVehiclePedIsUsing(target)
TaskEveryoneLeaveVehicle(veh)
Wait(500)
ClearPedTasksImmediately(target)
TaskReactAndFleePed(target, PlayerPedId())
local plate = QBCore.Functions.GetPlate(GetVehiclePedIsIn(target, true))
TriggerServerEvent('hud:server:GainStress', math.random(1, 4))
TriggerEvent('vehiclekeys:client:SetOwner', plate)
QBCore.Functions.Notify('You Got The Keys!', 'success')
Wait(10000)
IsRobbing = false
else
PoliceCall()
ClearPedTasks(target)
TaskReactAndFleePed(target, PlayerPedId())
TriggerServerEvent('hud:server:GainStress', math.random(1, 4))
QBCore.Functions.Notify('They Called The Cops!', 'error')
Wait(10000)
IsRobbing = false
end
end)
end

function LockpickIgnition(isAdvanced)
if not HasKey then
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, true)
if vehicle ~= nil and vehicle ~= 0 then
if GetPedInVehicleSeat(vehicle, -1) == ped then
IsHotwiring = true
PoliceCall()

            local dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@"

            usingAdvanced = isAdvanced
            RequestAnimDict(dict)
            while not HasAnimDictLoaded(dict) do
                RequestAnimDict(dict)
                Citizen.Wait(100)
            end
            if usingAdvanced then
				local seconds = math.random(9,12)
				local circles = math.random(1,3)
				local success = exports['qb-lock']:StartLockPickCircle(circles, seconds, success)
				if success then
					StopAnimTask(ped, dict, "machinic_loop_mechandplayer", 1.0)
					QBCore.Functions.Notify("Lockpicking succeeded!")
					HasKey = true
					TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(vehicle))
					IsHotwiring = false
				else
					QBCore.Functions.Notify("Lockpicking failed!", "error")
				end
			else
                local seconds = math.random(7,10)
				local circles = math.random(2,4)
				local success = exports['qb-lock']:StartLockPickCircle(circles, seconds, success)
				if success then
					StopAnimTask(ped, dict, "machinic_loop_mechandplayer", 1.0)
					QBCore.Functions.Notify("Lockpicking succeeded!")
					HasKey = true
					TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(vehicle))
					IsHotwiring = false
				else
					QBCore.Functions.Notify("Lockpicking failed!", "error")
				end
            end
        end
    end
end

end

function loadAnimDict(dict)
while (not HasAnimDictLoaded(dict)) do
RequestAnimDict(dict)
Wait(0)
end
end

function IsBlacklistedWeapon()
local weapon = GetSelectedPedWeapon(PlayerPedId())
if weapon ~= nil then
for _, v in pairs(Config.NoRobWeapons) do
if weapon == GetHashKey(v) then
return true
end
end
end
return false
end

function GetNearbyPed()
local retval = nil
local PlayerPeds = {}
for _, player in ipairs(GetActivePlayers()) do
local ped = GetPlayerPed(player)
table.insert(PlayerPeds, ped)
end
local player = PlayerPedId()
local coords = GetEntityCoords(player)
local closestPed, closestDistance = QBCore.Functions.GetClosestPed(coords, PlayerPeds)
if not IsEntityDead(closestPed) and closestDistance < 30.0 then
retval = closestPed
end
return retval
end

function DrawText3D(x, y, z, text)
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry("STRING")
SetTextCentre(true)
AddTextComponentString(text)
SetDrawOrigin(x, y, z, 0)
DrawText(0.0, 0.0)
local factor = (string.len(text)) / 370
DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75)
ClearDrawOrigin()
end

-- Events

RegisterNetEvent('lockpicks:UseLockpick', function(isAdvanced)
if (IsPedInAnyVehicle(PlayerPedId())) then
if not HasKey then
LockpickIgnition(isAdvanced)
end
else
LockpickDoor(isAdvanced)
end
end)

RegisterNetEvent('vehiclekeys:client:SetOwner', function(plate)
local VehPlate = plate
local CurrentVehPlate = QBCore.Functions.GetPlate(GetVehiclePedIsIn(PlayerPedId(), true))
if VehPlate == nil then
VehPlate = CurrentVehPlate
end
TriggerServerEvent('vehiclekeys:server:SetVehicleOwner', VehPlate)
if IsPedInAnyVehicle(PlayerPedId()) and plate == CurrentVehPlate then
SetVehicleEngineOn(GetVehiclePedIsIn(PlayerPedId(), true), true, false, true)
end
HasKey = true
end)

RegisterNetEvent('vehiclekeys:client:GiveKeys', function(target)
local plate = QBCore.Functions.GetPlate(GetVehiclePedIsIn(PlayerPedId(), true))
TriggerServerEvent('vehiclekeys:server:GiveVehicleKeys', plate, target)
end)

RegisterNetEvent('vehiclekeys:client:ToggleEngine', function()
local ped = PlayerPedId()
local EngineOn = IsVehicleEngineOn(GetVehiclePedIsIn(ped))
local veh = GetVehiclePedIsIn(ped, true)
local plate = QBCore.Functions.GetPlate(veh)
if IsPedInAnyVehicle(ped) then
veh = GetVehiclePedIsIn(ped)
end
if veh ~= nil and not IsThisModelABicycle(GetEntityModel(GetVehiclePedIsIn(ped,false))) then
QBCore.Functions.TriggerCallback('vehiclekeys:CheckHasKey', function(result)
if result then
if HasKey or lockpicked and isHotWired then
if EngineOn then
SetVehicleEngineOn(veh, false, false, true)
else
SetVehicleEngineOn(veh, true, false, true)
end
else
QBCore.Functions.Notify("You don't have the keys from this vehicle.", 'error')
end
end
end, plate)
end
end)

-- command

RegisterKeyMapping('togglelocks', 'Toggle Vehicle Locks', 'keyboard', 'L')
RegisterCommand('togglelocks', function()
LockVehicle()
end)

-- thread

CreateThread(function()
while true do
local sleep = 100
if LocalPlayer.state.isLoggedIn then
local ped = PlayerPedId()
local entering = GetVehiclePedIsTryingToEnter(ped)
if entering ~= 0 then
sleep = 2000
local plate = QBCore.Functions.GetPlate(entering)
QBCore.Functions.TriggerCallback('vehiclekeys:CheckOwnership', function(result)
if not result then -- if not player owned
local driver = GetPedInVehicleSeat(entering, -1)
if driver ~= 0 and not IsPedAPlayer(driver) then
if Config.Rob then
if IsEntityDead(driver) then
TriggerEvent("vehiclekeys:client:SetOwner", plate)
SetVehicleDoorsLocked(entering, 1)
HasKey = true
else
SetVehicleDoorsLocked(entering, 2)
end
else
TriggerEvent("vehiclekeys:client:SetOwner", plate)
SetVehicleDoorsLocked(entering, 1)
HasKey = true
end
else
QBCore.Functions.TriggerCallback('vehiclekeys:CheckHasKey', function(result)
if not lockpicked or lockpickedPlate ~= plate then
if result == false then
SetVehicleDoorsLocked(entering, 2)
HasKey = false
else
HasKey = true
end
elseif lockpicked and lockpickedPlate == plate then
if result == false then
HasKey = false
else
HasKey = true
end
end
end, plate)
end
end
end, plate)
end

        if IsPedInAnyVehicle(ped, false) and lockpicked and not IsHotwiring and not HasKey then
            sleep = 7
            local veh = GetVehiclePedIsIn(ped)
            local vehpos = GetOffsetFromEntityInWorldCoords(veh, 0.0, 2.0, 1.0)
            SetVehicleEngineOn(veh, false, false, true)
        end

        if Config.Rob then
            if not IsRobbing then
                local playerid = PlayerId()
                local aiming, target = GetEntityPlayerIsFreeAimingAt(playerid)
                if aiming and (target ~= nil and target ~= 0) then
                    if DoesEntityExist(target) and not IsEntityDead(target) and not IsPedAPlayer(target) then
                        if IsPedInAnyVehicle(target, false) then
                            local targetveh = GetVehiclePedIsIn(target)
                            if GetPedInVehicleSeat(targetveh, -1) == target then
                                if not IsBlacklistedWeapon() then
                                    local pos = GetEntityCoords(ped, true)
                                    local targetpos = GetEntityCoords(target, true)
                                    if #(pos - targetpos) < 5.0 then
                                        RobVehicle(target)
                                    end
                                end
                            end
                        end
                    end
                end
            end
        end
    end
    Wait(sleep)
end

end)

[Issue] bad argument for vector4

i just installed the script with your guide and all, but noticed when starting the server it gives an error for a vector4 coordinate

[ script:MojiaGarages] SCRIPT ERROR: @MojiaGarages/server.lua:46: bad argument #1 to 'vector4' (invalid vector type) [ script:MojiaGarages] > handler (@MojiaGarages/server.lua:46) [ script:MojiaGarages] > safeCallback (@oxmysql/oxmysql.js:20087) [ script:MojiaGarages] > <unknown> (@oxmysql/oxmysql.js:20094) [ script:MojiaGarages] > processTicksAndRejections (node:internal/process/task_queues:96)

[BUG] duplicate blip

nếu restart script setjob sẽ bị tạo thêm blip , nên thêm 1 function removeblip để xóa các blip sau đó mới chạy function createblip

[ đề xuất ]

1 - thêm tính năng access citizenid giống job
2 - làm thêm house garages

Depot not working ⚒

all events it's worked well but only Depot area not working for me So I have try everything still notworking shall be have any suggestion for me??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.