Hi, I have this command that works perfectly in game, but i can’t run this command via console. It than says that it just can’t be run through the server console. What could i do to make this also be able to run throught the console?
ESX.RegisterCommand('givepoints', 'admin', function(xPlayer, args, showError)
-- // Check if is valid player
local tPlayer = ESX.GetPlayerFromId(args.playerid)
local adminName = xPlayer.name
if tPlayer == nil then TriggerClientEvent("DimboPoints:SendNotif", xPlayer.playerId, "error", "Invalid Player ID") return end
GivePoints(args.playerid, args.amount, ' via /givepoints van ' .. xPlayer.name .. ' (' .. xPlayer.source .. ') ' .. xPlayer.identifier)
end, false, {help = "Give Points to a Player", validate = false, arguments = {
{name = 'playerid', help = "The players ID", type = 'number'},
{name = 'amount', help = "Amount of points to give", type = 'number'},
}})