Added /clear /cls for clearing chat, 4 tab indent for inventory

This commit is contained in:
ElPumpo
2018-07-01 14:48:37 +02:00
parent 7ed39a4666
commit 8dad759187
8 changed files with 297 additions and 288 deletions
+242 -272
View File
@@ -719,32 +719,32 @@ ESX.Game.GetVehicleProperties = function(vehicle)
return {
model = GetEntityModel(vehicle),
model = GetEntityModel(vehicle),
plate = GetVehicleNumberPlateText(vehicle),
plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
plate = GetVehicleNumberPlateText(vehicle),
plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
health = GetEntityHealth(vehicle),
dirtLevel = GetVehicleDirtLevel(vehicle),
health = GetEntityHealth(vehicle),
dirtLevel = GetVehicleDirtLevel(vehicle),
color1 = color1,
color2 = color2,
color1 = color1,
color2 = color2,
pearlescentColor = pearlescentColor,
wheelColor = wheelColor,
pearlescentColor = pearlescentColor,
wheelColor = wheelColor,
wheels = GetVehicleWheelType(vehicle),
windowTint = GetVehicleWindowTint(vehicle),
wheels = GetVehicleWheelType(vehicle),
windowTint = GetVehicleWindowTint(vehicle),
neonEnabled = {
neonEnabled = {
IsVehicleNeonLightEnabled(vehicle, 0),
IsVehicleNeonLightEnabled(vehicle, 1),
IsVehicleNeonLightEnabled(vehicle, 2),
IsVehicleNeonLightEnabled(vehicle, 3),
},
neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)),
neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)),
modSpoilers = GetVehicleMod(vehicle, 0),
modFrontBumper = GetVehicleMod(vehicle, 1),
@@ -1082,315 +1082,285 @@ end
ESX.ShowInventory = function()
local playerPed = GetPlayerPed(-1)
local elements = {}
local playerPed = GetPlayerPed(-1)
local elements = {}
if ESX.PlayerData.money > 0 then
table.insert(elements, {
label = _U('cash', ESX.PlayerData.money),
count = ESX.PlayerData.money,
type = 'item_money',
value = 'money',
usable = false,
rare = false,
canRemove = true
})
end
if ESX.PlayerData.money > 0 then
table.insert(elements, {
label = _U('cash', ESX.PlayerData.money),
count = ESX.PlayerData.money,
type = 'item_money',
value = 'money',
usable = false,
rare = false,
canRemove = true
})
end
for i=1, #ESX.PlayerData.accounts, 1 do
if ESX.PlayerData.accounts[i].money > 0 then
table.insert(elements, {
label = '[' .. ESX.PlayerData.accounts[i].label .. '] $' .. ESX.PlayerData.accounts[i].money,
count = ESX.PlayerData.accounts[i].money,
type = 'item_account',
value = ESX.PlayerData.accounts[i].name,
usable = false,
rare = false,
canRemove = true
})
end
end
for i=1, #ESX.PlayerData.accounts, 1 do
if ESX.PlayerData.accounts[i].money > 0 then
table.insert(elements, {
label = '[' .. ESX.PlayerData.accounts[i].label .. '] $' .. ESX.PlayerData.accounts[i].money,
count = ESX.PlayerData.accounts[i].money,
type = 'item_account',
value = ESX.PlayerData.accounts[i].name,
usable = false,
rare = false,
canRemove = true
})
end
end
for i=1, #ESX.PlayerData.inventory, 1 do
for i=1, #ESX.PlayerData.inventory, 1 do
if ESX.PlayerData.inventory[i].count > 0 then
table.insert(elements, {
label = ESX.PlayerData.inventory[i].label .. ' x' .. ESX.PlayerData.inventory[i].count,
count = ESX.PlayerData.inventory[i].count,
type = 'item_standard',
value = ESX.PlayerData.inventory[i].name,
usable = ESX.PlayerData.inventory[i].usable,
rare = ESX.PlayerData.inventory[i].rare,
canRemove = ESX.PlayerData.inventory[i].canRemove,
})
end
if ESX.PlayerData.inventory[i].count > 0 then
table.insert(elements, {
label = ESX.PlayerData.inventory[i].label .. ' x' .. ESX.PlayerData.inventory[i].count,
count = ESX.PlayerData.inventory[i].count,
type = 'item_standard',
value = ESX.PlayerData.inventory[i].name,
usable = ESX.PlayerData.inventory[i].usable,
rare = ESX.PlayerData.inventory[i].rare,
canRemove = ESX.PlayerData.inventory[i].canRemove,
})
end
end
end
for i=1, #Config.Weapons, 1 do
for i=1, #Config.Weapons, 1 do
local weaponHash = GetHashKey(Config.Weapons[i].name)
local weaponHash = GetHashKey(Config.Weapons[i].name)
if HasPedGotWeapon(playerPed, weaponHash, false) and Config.Weapons[i].name ~= 'WEAPON_UNARMED' then
if HasPedGotWeapon(playerPed, weaponHash, false) and Config.Weapons[i].name ~= 'WEAPON_UNARMED' then
local ammo = GetAmmoInPedWeapon(playerPed, weaponHash)
table.insert(elements, {
label = Config.Weapons[i].label .. ' x1 [' .. ammo .. ']',
count = 1,
type = 'item_weapon',
value = Config.Weapons[i].name,
ammo = ammo,
usable = false,
rare = false,
canRemove = true
})
end
end
local ammo = GetAmmoInPedWeapon(playerPed, weaponHash)
ESX.UI.Menu.CloseAll()
table.insert(elements, {
label = Config.Weapons[i].label .. ' x1 [' .. ammo .. ']',
count = 1,
type = 'item_weapon',
value = Config.Weapons[i].name,
ammo = ammo,
usable = false,
rare = false,
canRemove = true
})
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'inventory',
{
title = _U('inventory'),
align = 'bottom-right',
elements = elements,
}, function(data, menu)
menu.close()
end
end
local player, distance = ESX.Game.GetClosestPlayer()
local elements = {}
ESX.UI.Menu.CloseAll()
if data.current.usable then
table.insert(elements, {label = _U('use'), action = 'use', type = data.current.type, value = data.current.value})
end
ESX.UI.Menu.Open(
'default', GetCurrentResourceName(), 'inventory',
{
title = _U('inventory'),
align = 'bottom-right',
elements = elements,
},
function(data, menu)
menu.close()
if data.current.canRemove then
if player ~= -1 and distance <= 3.0 then
table.insert(elements, {label = _U('give'), action = 'give', type = data.current.type, value = data.current.value})
end
table.insert(elements, {label = _U('remove'), action = 'remove', type = data.current.type, value = data.current.value})
end
local player, distance = ESX.Game.GetClosestPlayer()
local elements = {}
if data.current.type == 'item_weapon' and data.current.ammo > 0 and player ~= -1 and distance <= 3.0 then
table.insert(elements, {label = _U('giveammo'), action = 'giveammo', type = data.current.type, value = data.current.value})
end
if data.current.usable then
table.insert(elements, {label = _U('use'), action = 'use', type = data.current.type, value = data.current.value})
end
table.insert(elements, {label = _U('return'), action = 'return'})
if data.current.canRemove then
if player ~= -1 and distance <= 3.0 then
table.insert(elements, {label = _U('give'), action = 'give', type = data.current.type, value = data.current.value})
end
table.insert(elements, {label = _U('remove'), action = 'remove', type = data.current.type, value = data.current.value})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'inventory_item',
{
title = data.current.label,
align = 'bottom-right',
elements = elements,
}, function(data, menu)
if data.current.type == "item_weapon" and data.current.ammo > 0 and player ~= -1 and distance <= 3.0 then
table.insert(elements, {label = _U('giveammo'), action = 'giveammo', type = data.current.type, value = data.current.value})
end
local item = data.current.value
local type = data.current.type
local playerPed = GetPlayerPed(-1)
table.insert(elements, {label = _U('return'), action = 'return'})
if data.current.action == 'give' then
ESX.UI.Menu.Open(
'default', GetCurrentResourceName(), 'inventory_item',
{
title = data.current.label,
align = 'bottom-right',
elements = elements,
},
function(data, menu)
if type == 'item_weapon' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
local closestPed = GetPlayerPed(closestPlayer)
local pedAmmo = GetAmmoInPedWeapon(GetPlayerPed(-1), GetHashKey(item))
local item = data.current.value
local type = data.current.type
local playerPed = GetPlayerPed(-1)
if not IsPedSittingInAnyVehicle(closestPed) then
if closestPlayer ~= -1 and closestDistance < 3.0 then
if pedAmmo > 0 then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'inventory_item_count_give',
{
title = _U('amountammo')
}, function(data2, menu2)
local quantity = tonumber(data2.value)
if quantity <= pedAmmo and quantity >= 0 and quantity ~= nil then
TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), type, item, quantity)
local finalammo = math.floor(pedAmmo - quantity)
SetPedAmmo(playerPed, item, finalammo)
menu2.close()
menu.close()
else
ESX.ShowNotification(_U('noammo'))
end
end, function(data2, menu2)
menu2.close()
end)
else
TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), type, item, 0)
menu.close()
end
else
ESX.ShowNotification(_U('players_nearby'))
end
else
ESX.ShowNotification(_U('in_vehicle'))
end
if data.current.action == 'give' then
else -- type: item_standard
if type == 'item_weapon' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
local closestPed = GetPlayerPed(closestPlayer)
local pedAmmo = GetAmmoInPedWeapon(GetPlayerPed(-1), GetHashKey(item))
if not IsPedSittingInAnyVehicle(closestPed) then
if closestPlayer ~= -1 and closestDistance < 3.0 then
if pedAmmo > 0 then
ESX.UI.Menu.Open(
'dialog', GetCurrentResourceName(), 'inventory_item_count_give',
{
title = _U('amountammo')
},
function(data2, menu2)
local quantity = tonumber(data2.value)
if quantity <= pedAmmo and quantity >= 0 and quantity ~= nil then
TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), type, item, quantity)
local finalammo = math.floor(pedAmmo - quantity)
SetPedAmmo(playerPed, item, finalammo)
menu2.close()
menu.close()
else
ESX.ShowNotification(_U('noammo'))
end
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'inventory_item_count_give',
{
title = _U('amount')
}, function(data2, menu2)
local quantity = tonumber(data2.value)
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
local closestPed = GetPlayerPed(closestPlayer)
end, function(data2, menu2)
menu2.close()
end
)
else
TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), type, item, 0)
menu.close()
end
else
ESX.ShowNotification(_U('players_nearby'))
end
else
ESX.ShowNotification(_U("in_vehicle"))
end
if not IsPedSittingInAnyVehicle(closestPed) then
if closestPlayer ~= -1 and closestDistance < 3.0 then
TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), type, item, quantity)
else
ESX.ShowNotification(_U('players_nearby'))
end
else
ESX.ShowNotification(_U('in_vehicle'))
end
else
menu2.close()
menu.close()
ESX.UI.Menu.Open(
'dialog', GetCurrentResourceName(), 'inventory_item_count_give',
{
title = _U('amount')
},
function(data2, menu2)
end, function(data2, menu2)
menu2.close()
end)
end
local quantity = tonumber(data2.value)
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
local closestPed = GetPlayerPed(closestPlayer)
if not IsPedSittingInAnyVehicle(closestPed) then
if closestPlayer ~= -1 and closestDistance < 3.0 then
TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), type, item, quantity)
else
ESX.ShowNotification(_U('players_nearby'))
end
else
ESX.ShowNotification(_U("in_vehicle"))
end
elseif data.current.action == 'remove' then
menu2.close()
menu.close()
if type == 'item_weapon' then
local pedAmmo = GetAmmoInPedWeapon(GetPlayerPed(-1),GetHashKey(item))
-- does the player have any ammo for the weapon?
if pedAmmo > 0 then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'inventory_item_count_remove',
{
title = _U('amount')
}, function(data2, menu2)
local quantity = tonumber(data2.value)
end,
function(data2, menu2)
menu2.close()
end
)
if quantity <= pedAmmo and quantity >= 0 and quantity ~= nil then
local finalammo = math.floor(pedAmmo - quantity)
SetPedAmmo(playerPed, item, finalammo)
TriggerServerEvent('esx:removeInventoryItem', type, item, quantity)
else
ESX.ShowNotification(_U('noammo'))
end
menu2.close()
menu.close()
end, function(data2, menu2)
menu2.close()
end)
else
TriggerServerEvent('esx:removeInventoryItem', type, item, 0)
menu.close()
end
end
else -- type: item_standard
elseif data.current.action == 'remove' then
if type == 'item_weapon' then
local pedAmmo = GetAmmoInPedWeapon(GetPlayerPed(-1),GetHashKey(item))
-- does the player have any ammo for the weapon?
if pedAmmo > 0 then
ESX.UI.Menu.Open(
'dialog', GetCurrentResourceName(), 'inventory_item_count_remove',
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'inventory_item_count_remove',
{
title = _U('amount')
}, function(data2, menu2)
local quantity = tonumber(data2.value)
if quantity <= pedAmmo and quantity >= 0 and quantity ~= nil then
local finalammo = math.floor(pedAmmo - quantity)
SetPedAmmo(playerPed, item, finalammo)
TriggerServerEvent('esx:removeInventoryItem', type, item, quantity)
if quantity == nil then
ESX.ShowNotification(_U('amount_invalid'))
else
ESX.ShowNotification(_U('noammo'))
TriggerServerEvent('esx:removeInventoryItem', type, item, quantity)
end
menu2.close()
menu.close()
end, function(data2, menu2)
menu2.close()
end)
else
TriggerServerEvent('esx:removeInventoryItem', type, item, 0)
menu.close()
end
else
elseif data.current.action == 'use' then
TriggerServerEvent('esx:useItem', data.current.value)
ESX.UI.Menu.Open(
'dialog', GetCurrentResourceName(), 'inventory_item_count_remove',
{
title = _U('amount')
},
function(data2, menu2)
elseif data.current.action == 'return' then
local quantity = tonumber(data2.value)
ESX.UI.Menu.CloseAll()
ESX.ShowInventory()
elseif data.current.action == 'giveammo' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
local closestPed = GetPlayerPed(closestPlayer)
local pedAmmo = GetAmmoInPedWeapon(playerPed,GetHashKey(item))
if not IsPedSittingInAnyVehicle(closestPed) then
if closestPlayer ~= -1 and closestDistance < 3.0 then
if pedAmmo > 0 then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'inventory_item_count_give',
{
title = _U('amountammo')
}, function(data2, menu2)
local quantity = tonumber(data2.value)
if quantity <= pedAmmo and quantity >= 0 and quantity ~= nil then
if quantity == nil then
ESX.ShowNotification(_U('amount_invalid'))
else
TriggerServerEvent('esx:removeInventoryItem', type, item, quantity)
end
local finalAmmoSource = math.floor(pedAmmo - quantity)
SetPedAmmo(playerPed, item, finalAmmoSource)
AddAmmoToPed(closestPed, item, quantity)
menu2.close()
menu.close()
ESX.ShowNotification(_U('gave_ammo', quantity, GetPlayerName(closestPlayer)))
-- todo notify target that he received ammo
menu2.close()
menu.close()
else
ESX.ShowNotification(_U('noammo'))
end
end,
function(data2, menu2)
menu2.close()
end
)
end, function(data2, menu2)
menu2.close()
end)
else
TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), type, item, 0)
menu.close()
end
else
ESX.ShowNotification(_U('players_nearby'))
end
else
ESX.ShowNotification(_U('in_vehicle'))
end
end
end
elseif data.current.action == 'use' then
TriggerServerEvent('esx:useItem', data.current.value)
elseif data.current.action == 'return' then
ESX.UI.Menu.CloseAll()
ESX.ShowInventory()
elseif data.current.action == 'giveammo' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
local closestPed = GetPlayerPed(closestPlayer)
local pedAmmo = GetAmmoInPedWeapon(playerPed,GetHashKey(item))
if not IsPedSittingInAnyVehicle(closestPed) then
if closestPlayer ~= -1 and closestDistance < 3.0 then
if pedAmmo > 0 then
ESX.UI.Menu.Open(
'dialog', GetCurrentResourceName(), 'inventory_item_count_give',
{
title = _U('amountammo')
},
function(data2, menu2)
local quantity = tonumber(data2.value)
if quantity <= pedAmmo and quantity >= 0 and quantity ~= nil then
local finalAmmoSource = math.floor(pedAmmo - quantity)
SetPedAmmo(playerPed, item, finalAmmoSource)
AddAmmoToPed(closestPed, item, quantity)
ESX.ShowNotification(_U('gave_ammo', quantity, GetPlayerName(closestPlayer)))
-- todo notify target that he received ammo
menu2.close()
menu.close()
else
ESX.ShowNotification(_U('noammo'))
end
end,
function(data2, menu2)
menu2.close()
end
)
else
TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), type, item, 0)
menu.close()
end
else
ESX.ShowNotification(_U('players_nearby'))
end
else
ESX.ShowNotification(_U("in_vehicle"))
end
end
end,
function(data, menu)
ESX.UI.Menu.CloseAll()
ESX.ShowInventory()
end
)
end,
function(data, menu)
menu.close()
end
)
end, function(data, menu)
ESX.UI.Menu.CloseAll()
ESX.ShowInventory()
end)
end, function(data, menu)
menu.close()
end)
end
RegisterNetEvent('esx:serverCallback')
+3
View File
@@ -64,6 +64,9 @@ Locales['br'] = {
['giveitem'] = 'dar item',
['weapon'] = 'arma',
['giveweapon'] = 'dar arma',
['disconnect'] = 'disconnect from the server',
['chat_clear'] = 'clear the chat',
['chat_clear_all'] = 'clear the chat for everyone',
-- Weapons
['weapon_knife'] = 'faca',
['weapon_nightstick'] = 'cacetete',
+3
View File
@@ -58,6 +58,9 @@ Locales['de'] = {
['giveitem'] = 'give item',
['weapon'] = 'weapon',
['giveweapon'] = 'give weapon',
['disconnect'] = 'disconnect from the server',
['chat_clear'] = 'clear the chat',
['chat_clear_all'] = 'clear the chat for everyone',
-- Weapons
['weapon_knife'] = 'Messer',
['weapon_nightstick'] = 'Schlagstock',
+2
View File
@@ -69,6 +69,8 @@ Locales['en'] = {
['weapon'] = 'weapon',
['giveweapon'] = 'give weapon',
['disconnect'] = 'disconnect from the server',
['chat_clear'] = 'clear the chat',
['chat_clear_all'] = 'clear the chat for everyone',
-- Weapons
['weapon_knife'] = 'knife',
['weapon_nightstick'] = 'nightstick',
+2
View File
@@ -69,6 +69,8 @@ Locales['fi'] = {
['weapon'] = 'ase',
['giveweapon'] = 'anna ase',
['disconnect'] = 'poistu serveriltä',
['chat_clear'] = 'clear the chat',
['chat_clear_all'] = 'clear the chat for everyone',
-- Weapons
['weapon_knife'] = 'veitsi',
['weapon_nightstick'] = 'pamppu',
+3
View File
@@ -65,6 +65,9 @@ Locales['fr'] = {
['giveitem'] = 'donner un article',
['weapon'] = 'arme',
['giveweapon'] = 'donner de l\'arme',
['disconnect'] = 'disconnect from the server',
['chat_clear'] = 'clear the chat',
['chat_clear_all'] = 'clear the chat for everyone',
-- Weapons
['weapon_knife'] = 'couteau',
['weapon_nightstick'] = 'matraque',
+2
View File
@@ -69,6 +69,8 @@ Locales['sv'] = {
['weapon'] = 'vapen',
['giveweapon'] = 'ge vapen',
['disconnect'] = 'koppla från servern',
['chat_clear'] = 'töm chatten',
['chat_clear_all'] = 'töm chatten för alla',
-- Weapons
['weapon_knife'] = 'knife',
['weapon_nightstick'] = 'nightstick',
+40 -16
View File
@@ -13,7 +13,7 @@ TriggerEvent('es:addGroupCommand', 'tp', 'admin', function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Invalid coordinates!")
end
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = "Teleport to coordinates", params = {{name = "x", help = "X coords"}, {name = "y", help = "Y coords"}, {name = "z", help = "Z coords"}}})
TriggerEvent('es:addGroupCommand', 'setjob', 'jobmaster', function(source, args, user)
@@ -28,56 +28,56 @@ TriggerEvent('es:addGroupCommand', 'setjob', 'jobmaster', function(source, args,
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Invalid usage.")
end
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('setjob'), params = {{name = "id", help = _U('id_param')}, {name = "job", help = _U('setjob_param2')}, {name = "grade_id", help = _U('setjob_param3')}}})
TriggerEvent('es:addGroupCommand', 'loadipl', 'admin', function(source, args, user)
TriggerClientEvent('esx:loadIPL', -1, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('load_ipl')})
TriggerEvent('es:addGroupCommand', 'unloadipl', 'admin', function(source, args, user)
TriggerClientEvent('esx:unloadIPL', -1, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('unload_ipl')})
TriggerEvent('es:addGroupCommand', 'playanim', 'admin', function(source, args, user)
TriggerClientEvent('esx:playAnim', -1, args[1], args[3])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('play_anim')})
TriggerEvent('es:addGroupCommand', 'playemote', 'admin', function(source, args, user)
TriggerClientEvent('esx:playEmote', -1, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('play_emote')})
TriggerEvent('es:addGroupCommand', 'car', 'admin', function(source, args, user)
TriggerClientEvent('esx:spawnVehicle', source, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('spawn_car'), params = {{name = "car", help = _U('spawn_car_param')}}})
TriggerEvent('es:addGroupCommand', 'dv', 'admin', function(source, args, user)
TriggerClientEvent('esx:deleteVehicle', source)
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('delete_vehicle'), params = {{name = "car", help = _U('delete_veh_param')}}})
TriggerEvent('es:addGroupCommand', 'spawnped', 'admin', function(source, args, user)
TriggerClientEvent('esx:spawnPed', source, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('spawn_ped'), params = {{name = "name", help = _U('spawn_ped_param')}}})
TriggerEvent('es:addGroupCommand', 'spawnobject', 'admin', function(source, args, user)
TriggerClientEvent('esx:spawnObject', source, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('spawn_object'), params = {{name = "name"}}})
TriggerEvent('es:addGroupCommand', 'setmoney', 'admin', function(source, args, user)
@@ -111,7 +111,7 @@ TriggerEvent('es:addGroupCommand', 'setmoney', 'admin', function(source, args, u
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('money_set', money_amount, money_type))
end
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('setmoney'), params = {{name = "id", help = _U('id_param')}, {name = "money type", help = _U('money_type')}, {name = "amount", help = _U('money_amount')}}})
TriggerEvent('es:addGroupCommand', 'giveaccountmoney', 'admin', function(source, args, user)
@@ -132,7 +132,7 @@ TriggerEvent('es:addGroupCommand', 'giveaccountmoney', 'admin', function(source,
end
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('giveaccountmoney'), params = {{name = "id", help = _U('id_param')}, {name = "account", help = _U('account')}, {name = "amount", help = _U('money_amount')}}})
TriggerEvent('es:addGroupCommand', 'giveitem', 'admin', function(source, args, user)
@@ -153,7 +153,7 @@ TriggerEvent('es:addGroupCommand', 'giveitem', 'admin', function(source, args, u
end
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('giveitem'), params = {{name = "id", help = _U('id_param')}, {name = "item", help = _U('item')}, {name = "amount", help = _U('amount')}}})
TriggerEvent('es:addGroupCommand', 'giveweapon', 'admin', function(source, args, user)
@@ -164,17 +164,41 @@ TriggerEvent('es:addGroupCommand', 'giveweapon', 'admin', function(source, args,
xPlayer.addWeapon(weaponName, tonumber(args[3]))
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
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')
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('disconnect')})
TriggerEvent('es:addGroupCommand', 'disconnect', 'admin', function(source, args, user)
DropPlayer(source, 'You have been disconnected')
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('disconnect')})
TriggerEvent('es:addGroupCommand', 'clear', 'user', function(source, args, user)
TriggerClientEvent('chat:clear', source)
end, function(source, args, user)
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('chat_clear')})
TriggerEvent('es:addGroupCommand', 'cls', 'user', function(source, args, user)
TriggerClientEvent('chat:clear', source)
end, function(source, args, user)
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('chat_clear')})
TriggerEvent('es:addGroupCommand', 'clsall', 'admin', function(source, args, user)
TriggerClientEvent('chat:clear')
end, function(source, args, user)
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('chat_clear_all')})
TriggerEvent('es:addGroupCommand', 'clearall', 'admin', function(source, args, user)
TriggerClientEvent('chat:clear')
end, function(source, args, user)
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = _U('chat_clear_all')})