forked from Simnation/Main
ed
This commit is contained in:
parent
69aaef7d8c
commit
961260f3f5
2 changed files with 15 additions and 16 deletions
|
@ -15,10 +15,10 @@ local function HasItem(source, itemName)
|
|||
end
|
||||
|
||||
-- Event for client to check if player has an item
|
||||
RegisterNetEvent('nightvision:checkItem', function(itemName)
|
||||
RegisterNetEvent('nightvision:checkItem', function(itemName, callbackEvent)
|
||||
local src = source
|
||||
local hasItem = HasItem(src, itemName)
|
||||
TriggerClientEvent('nightvision:itemCheckResult', src, itemName, hasItem)
|
||||
TriggerClientEvent(callbackEvent, src, hasItem)
|
||||
end)
|
||||
|
||||
-- Register usable items
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue