How to block the command /car for the user

How to block the command /car for the user :slight_smile:

I have try this but i have error with essensial mode after…

TriggerEvent('es:addCommand', 'car', "superadmin", function(source, args, user)
	TriggerClientEvent('es_admin:spawnVehicle', source, args[2])
end)

You add it directly in an essential file ?

no i have replaced the code of base by my code

1 Like

Ok thanks, I think I will do the same for the /admin ! :slight_smile:

TriggerEvent('es:addGroupCommand', 'car', "owner", function(source, args, user)
	TriggerClientEvent("es_admin:spawnVehicle", source, args[2])
end, function(source, args, user)
	TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient permissions!")
end)

For me it’s work, in es_admin

Which file? I am new :smiley: