Improved i18 formatting, see desc

- /giveweapon now takes ammo as an argument
- improved Swedish translation
- hide actions in the inventory menu if they cannot be done.
- general code improvements, cleanup
This commit is contained in:
ElPumpo
2018-04-15 22:52:03 +02:00
parent 8b648c5d7f
commit 5f93c0a129
5 changed files with 67 additions and 61 deletions
+2 -2
View File
@@ -150,11 +150,11 @@ TriggerEvent('es:addGroupCommand', 'giveweapon', 'admin', function(source, args,
local xPlayer = ESX.GetPlayerFromId(args[1])
local weaponName = string.upper(args[2])
xPlayer.addWeapon(weaponName, 1000)
xPlayer.addWeapon(weaponName, tonumber(args[3]))
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('giveweapon'), params = {{name = "id", help = _U('id_param')}, {name = "weapon", help = _U('weapon')}}})
end, {help = _U('giveweapon'), params = {{name = "id", help = _U('id_param')}, {name = "weapon", help = _U('weapon')}, {name = "ammo", help = _U('amountammo')}}})
TriggerEvent('es:addGroupCommand', 'disc', 'admin', function(source, args, user)
DropPlayer(source, 'You have been disconnected')