Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

wolvherin78

Bronze Elite
Joined
May 14, 2021
Messages
8
Reaction score
8
Points
146
The weight on the weapon does not work

Icona di Verificata con community
 

shikamaru12

Member
Joined
Nov 2, 2021
Messages
4
Reaction score
0
Points
156
Location
columbia
Hey I can't get the shops to work for this at all, is anyone able to send me a resource for a esx_shops folder that works? Thanks in advance.
 

yuma

Member
Joined
Nov 9, 2021
Messages
2
Reaction score
0
Points
146
Location
germany
Can somebody help me here.
I am stuck at esx_shops

He can't find any shop items or is stuck
bb62f727bff1194839ccb39545b7ec78.png


My config.lua
Code:
    TwentyFourSeven = {
        Items = {
            {
                 name = "bread",
                 type = "item",
                 price = 100
            },
        },
        
        ...
        ...
 

Unemployed

Gold Elite
Joined
Aug 27, 2021
Messages
72
Reaction score
76
Points
231
The stores are already working for me, the error I have now is that when I throw an item and then want to pick it up, the inventory does not recognize it

20211110200515_1.jpg
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww.PNG

it won't let me pick up and I get this error
 

yuma

Member
Joined
Nov 9, 2021
Messages
2
Reaction score
0
Points
146
Location
germany
Unemployed dropping is working for me.
Add me on discord and I will help you, but you have to help me with the shops.
Yuma#1618

//edit
I fixed it that in shops the items are displaying (thank N4SIB oin discord)
I edited esx_shops -> server -> main.lua

Replaced esx_shops:buyItem function to this
Code:
RegisterServerEvent('esx_shops:buyItem')
AddEventHandler('esx_shops:buyItem', function(itemName, amount, zone)
    local _source = source
    local xPlayer = ESX.GetPlayerFromId(_source)
    local sourceItem = xPlayer.getInventoryItem(itemName)

    amount = ESX.Math.Round(amount)

    -- is the player trying to exploit?
    if amount < 0 then
        print('esx_shops: ' .. xPlayer.identifier .. ' attempted to exploit the shop!')
        return
    end

    -- get price
    local price = 0
    local itemLabel = ''

    for i=1, #ShopItems[zone], 1 do
        if ShopItems[zone][i].item == itemName then
            price = ShopItems[zone][i].price
            itemLabel = ShopItems[zone][i].label
            break
        end
    end

    price = price * amount

    -- can the player afford this item?
    if xPlayer.getMoney() >= price then
        -- can the player carry the said amount of x item?
        if sourceItem.limit ~= -1 and (sourceItem.count + amount) > sourceItem.limit then
            TriggerClientEvent('esx:showNotification', _source, _U('player_cannot_hold'))
        else
            xPlayer.removeMoney(price)
            xPlayer.addInventoryItem(itemName, amount)
            TriggerClientEvent('esx:showNotification', _source, _U('bought', amount, itemLabel, price))
        end
    else
        local missingMoney = price - xPlayer.getMoney()
        TriggerClientEvent('esx:showNotification', _source, _U('not_enough', missingMoney))
    end
end)
 
Last edited:

Tago

Silver Elite
Joined
Nov 14, 2021
Messages
37
Reaction score
16
Points
166
Location
Czech
Hello, i have a problem with inventory, i open inventory with key 'F2' and my friend open inventory with key 'L'. I dont know where is the problem. (iam checked config.lua and bind on F2). thank you for help
 

camilaQ132020

Bronze Elite
Joined
Nov 3, 2021
Messages
7
Reaction score
5
Points
146
Location
USA
Hello, i have a problem with inventory, i open inventory with key 'F2' and my friend open inventory with key 'L'. I dont know where is the problem. (iam checked config.lua and bind on F2). thank you for help
in which part of the script is the option to change the inventory to F2
 

ALEN TL

ALEN TL#5009
Gold Elite
Joined
Sep 18, 2021
Messages
387
Solutions
1
Reaction score
6,954
Points
321
Age
20
Location
KOCHI
In config.lua, but its really weird, we testing inventory with 5 people and 3 people have inventory on F2 and 2 have on L
That's easy. esc>game settings>key bindings>enter>fivem>inventory>click on that>change to f2. Simple one. I had in K. Just did the same thing and now I have it on f2. Just make a video for it but. That would be nice.
 
Top