Hi, I want to create a /vip command to give people a certain item, i don’t know how to do it.This is the code that i do it.
Server side:
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
RegisterCommand('vip', function(source, args, rawCommand)
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.addInventoryItem('water', 1)
end)