Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Phone does not work #149

Open
DarknessV1 opened this issue Nov 19, 2023 · 6 comments
Open

Phone does not work #149

DarknessV1 opened this issue Nov 19, 2023 · 6 comments

Comments

@DarknessV1
Copy link

DarknessV1 commented Nov 19, 2023

Hello i install phone like what description says .. and when i test it in server it doesn't open at all it wont even show phone
how can i find it??
phone

@DarknessV1
Copy link
Author

i fix it .. now it open .. but no apps shown
image

@Eminole
Copy link

Eminole commented Nov 19, 2023

Hello i have the same issu when i use the new version of qb-garage (V2.0.0).
I have fix my issu, in the first line of config.lua in qb-garage i have replace
Config = {} by Config = Config or {}

@DarknessV1
Copy link
Author

Hello i have the same issu when i use the new version of qb-garage (V2.0.0). I have fix my issu, in the first line of config.lua in qb-garage i have replace Config = {} by Config = Config or {}

TY mate phone work now perfect

@Usechex
Copy link

Usechex commented Dec 6, 2023

What was the solution to the problem?/cual fue la solucion al problema

@HanZoV
Copy link

HanZoV commented Jan 3, 2024

Hello i install phone like what description says .. and when i test it in server it doesn't open at all it wont even show phone how can i find it?? phone

How do you fix your first problem

@flyinggoatman
Copy link

flyinggoatman commented Jan 31, 2024

Hello i install phone like what description says .. and when i test it in server it doesn't open at all it wont even show phone how can i find it?? phone

How do you fix your first problem

I replaced the HasIten function with this

local function HasItem(items, amount)
local isTable = type(items) == 'table'
local isArray = isTable and #items > 0
local totalItems = isTable and #items or 0
local count = 0


if isTable and not isArray then
    totalItems = 0
    for _ in pairs(items) do totalItems = totalItems + 1 end
end

for _, itemData in ipairs(PlayerData.items or {}) do
    if isTable then
        for k, v in pairs(items) do
            if itemData and itemData.name == k and ((amount and itemData.amount >= amount) or (not isArray and itemData.amount >= v) or (not amount and isArray)) then
                count = count + 1
            end
        end
        if count == totalItems then
            return true
        end
    else 
        if itemData and itemData.name == items and (not amount or (itemData.amount >= amount)) then
            return true
        end
    end
end
return false

end

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants