Typo creatingItems.md (#20)

* Typo creatingItems.md

* Update creatingItems.md
This commit is contained in:
IT-Kewai authored and GitHub committed 2022-05-07 22:51:21 +02:00
1 parent 465102205d
commit fbb38c9873
1 file changed
+5 -5
+5 -5
View File
@@ -187,12 +187,12 @@ This can either be an export (recommended), or added to [items/server.lua](https
```lua
exports('bandage', function(event, item, inventory, slot, data)
if event == 'usingItem' then
local playerPed = GetPlayerPed(inventory.source)
local playerPed = GetPlayerPed(inventory.id)
local maxHealth = GetEntityMaxHealth(playerPed)
local health = GetEntityHealth(playerPed)
if health >= maxHealth then
TriggerClientEvent('ox_inventory:notify', inventory.source, {type = 'error', text = 'You don\'t need a bandage right now'})
TriggerClientEvent('ox_inventory:notify', inventory.id, {type = 'error', text = 'You don\'t need a bandage right now'})
-- Returning 'false' will prevent the item from being used
return false
@@ -200,10 +200,10 @@ exports('bandage', function(event, item, inventory, slot, data)
return
elseif event == 'usedItem' then
return TriggerClientEvent('ox_inventory:notify', inventory.source, {text = 'You feel better already'})
return TriggerClientEvent('ox_inventory:notify', inventory.id, {text = 'You feel better already'})
elseif event == 'buying' then
return TriggerClientEvent('ox_inventory:notify', inventory.source, {type = 'success', text = 'You bought a bandage'})
return TriggerClientEvent('ox_inventory:notify', inventory.id, {type = 'success', text = 'You bought a bandage'})
end
end)
```
@@ -248,4 +248,4 @@ You can also define the number of slots, the maximum weight, blacklist and white
['testburger'] = true -- No burgers!
}
},
```
```