Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 Run formatter #633

Merged
merged 19 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_
('ammu',2,'armorychief','Capo Armeria',60,'{}','{}'),
('ammu',3,'deputydirector','Vice direttore',85,'{}','{}'),
('ammu',4,'boss','Direttore',100,'{}','{}')
;
;
262 changes: 126 additions & 136 deletions server-data/resources/[bpt_addons]/bpt_ammujob/client/main.lua

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions server-data/resources/[bpt_addons]/bpt_ammujob/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ Config.Zones = {

VehicleDeleter = {
Pos = { x = 822.540649, y = -2134.575928, z = 28.279907 },
Size = { x = 3.0, y = 3.0, z = 0.25 },
Color = { r = 255, g = 0, b = 0 },
Type = 1,
Rotate = false,
},
Size = { x = 3.0, y = 3.0, z = 0.25 },
Color = { r = 255, g = 0, b = 0 },
Type = 1,
Rotate = false,
},

AmmuActions = {
Pos = { x = 812.479126, y = -2159.182373, z = 29.616821 },
Size = { x = 0.5, y = 0.5, z = 0.5 },
Color = { r = 204, g = 204, b = 0 },
Type = 20,
Rotate = true,
},
AmmuActions = {
Pos = { x = 812.479126, y = -2159.182373, z = 29.616821 },
Size = { x = 0.5, y = 0.5, z = 0.5 },
Color = { r = 204, g = 204, b = 0 },
Type = 20,
Rotate = true,
},

Cloakroom = {
Pos = { x = 810.065918, y = -2162.439453, z = 29.616821 },
Size = { x = 0.5, y = 0.5, z = 0.5 },
Color = { r = 204, g = 204, b = 0 },
Type = 21,
Rotate = true,
},
}
Cloakroom = {
Pos = { x = 810.065918, y = -2162.439453, z = 29.616821 },
Size = { x = 0.5, y = 0.5, z = 0.5 },
Color = { r = 204, g = 204, b = 0 },
Type = 21,
Rotate = true,
},
}
66 changes: 33 additions & 33 deletions server-data/resources/[bpt_addons]/bpt_ammujob/locales/en.lua
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
Locales["en"] = {
-- cloakroom
["cloakroom_menu"] = "cloakroom",
["cloakroom_prompt"] = "press [E] to access the cloakroom.",
["wear_citizen"] = "civilian clothing",
["wear_work"] = "work clothes",
-- Inventory
["deposit_stock"] = "Deposit stock",
["take_stock"] = "Take stock",
["have_deposited"] = "Have deposited",
["quantity_invalid"] = "Quantity invelid",
-- garage
["spawner_prompt"] = "press [E] to access the garage.",
["vehicle_spawned"] = "vehicle spawned successfully!",
["store_veh"] = "press [E] to deposit the vehicle",
["spawn_veh"] = "spawn vehicle",
["spawnpoint_blocked"] = "vehicle blocks the spawnpoint!",
["only_ammu"] = "you can only deposit company vehicles.",
["empty_garage"] = "no vehicles in the garage!",
["taking_service"] = "Take service: Gunsmith",
["full_service"] = "complete service: ",
["amount_invalid"] = "invalid amount",
["press_to_open"] = "press [E] to access the menu",
["billing"] = "billing",
["billing_sent"] = "the invoice has been posted!",
["invoice_amount"] = "invoice amount",
["no_players_near"] = "no players nearby",
["boss_actions"] = "Boss actions",
["blip_ammu"] = "Armory.",
["ammu"] = "ammu",
-- billing
["bill_amount"] = "Amount to bill..",
["confirm"] = "Confirm",
}
-- cloakroom
["cloakroom_menu"] = "cloakroom",
["cloakroom_prompt"] = "press [E] to access the cloakroom.",
["wear_citizen"] = "civilian clothing",
["wear_work"] = "work clothes",
-- Inventory
["deposit_stock"] = "Deposit stock",
["take_stock"] = "Take stock",
["have_deposited"] = "Have deposited",
["quantity_invalid"] = "Quantity invelid",
-- garage
["spawner_prompt"] = "press [E] to access the garage.",
["vehicle_spawned"] = "vehicle spawned successfully!",
["store_veh"] = "press [E] to deposit the vehicle",
["spawn_veh"] = "spawn vehicle",
["spawnpoint_blocked"] = "vehicle blocks the spawnpoint!",
["only_ammu"] = "you can only deposit company vehicles.",
["empty_garage"] = "no vehicles in the garage!",
["taking_service"] = "Take service: Gunsmith",
["full_service"] = "complete service: ",
["amount_invalid"] = "invalid amount",
["press_to_open"] = "press [E] to access the menu",
["billing"] = "billing",
["billing_sent"] = "the invoice has been posted!",
["invoice_amount"] = "invoice amount",
["no_players_near"] = "no players nearby",
["boss_actions"] = "Boss actions",
["blip_ammu"] = "Armory.",
["ammu"] = "ammu",
-- billing
["bill_amount"] = "Amount to bill..",
["confirm"] = "Confirm",
}
66 changes: 33 additions & 33 deletions server-data/resources/[bpt_addons]/bpt_ammujob/locales/it.lua
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
Locales["it"] = {
-- cloakroom
["cloakroom_menu"] = "guardaroba",
["cloakroom_prompt"] = "premi [E] per accedere al guardaroba.",
["wear_citizen"] = "abbigliamento civile",
["wear_work"] = "abiti da lavoro",
-- Inventory
["deposit_stock"] = "Depositare",
["take_stock"] = "Prendi",
["have_deposited"] = "Hai depositato",
["quantity_invalid"] = "Qunatità non valida",
-- garage
["spawner_prompt"] = "premi [E] per accedere al garage.",
["vehicle_spawned"] = "veicolo generato con successo!",
["store_veh"] = "premi [E] per depositare il veicolo",
["spawn_veh"] = "genera veicolo",
["spawnpoint_blocked"] = "un veicolo blocca lo spawnpoint!",
["only_ammu"] = "puoi depositare solo veicoli aziendali.",
["empty_garage"] = "nessun veicolo nel garage!",
["taking_service"] = "prendi servizio: Armaiolo",
["full_service"] = "servizio completo: ",
["amount_invalid"] = "importo non valido",
["press_to_open"] = "premi [E] per accedere al menu",
["billing"] = "fattura",
["billing_sent"] = "la fattura è stata registrata!",
["invoice_amount"] = "importo fattura",
["no_players_near"] = "nessun giocatore nelle vicinanze",
["boss_actions"] = "Azioni del capo",
["blip_ammu"] = "Armeria.",
["ammu"] = "ammu",
-- billing
["bill_amount"] = "importo della fattura",
["confirm"] = "Conferma",
}
-- cloakroom
["cloakroom_menu"] = "guardaroba",
["cloakroom_prompt"] = "premi [E] per accedere al guardaroba.",
["wear_citizen"] = "abbigliamento civile",
["wear_work"] = "abiti da lavoro",
-- Inventory
["deposit_stock"] = "Depositare",
["take_stock"] = "Prendi",
["have_deposited"] = "Hai depositato",
["quantity_invalid"] = "Qunatità non valida",
-- garage
["spawner_prompt"] = "premi [E] per accedere al garage.",
["vehicle_spawned"] = "veicolo generato con successo!",
["store_veh"] = "premi [E] per depositare il veicolo",
["spawn_veh"] = "genera veicolo",
["spawnpoint_blocked"] = "un veicolo blocca lo spawnpoint!",
["only_ammu"] = "puoi depositare solo veicoli aziendali.",
["empty_garage"] = "nessun veicolo nel garage!",
["taking_service"] = "prendi servizio: Armaiolo",
["full_service"] = "servizio completo: ",
["amount_invalid"] = "importo non valido",
["press_to_open"] = "premi [E] per accedere al menu",
["billing"] = "fattura",
["billing_sent"] = "la fattura è stata registrata!",
["invoice_amount"] = "importo fattura",
["no_players_near"] = "nessun giocatore nelle vicinanze",
["boss_actions"] = "Azioni del capo",
["blip_ammu"] = "Armeria.",
["ammu"] = "ammu",
-- billing
["bill_amount"] = "importo della fattura",
["confirm"] = "Conferma",
}
48 changes: 24 additions & 24 deletions server-data/resources/[bpt_addons]/bpt_ammujob/server/main.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
TriggerEvent('esx_society:registerSociety', 'ammu', 'Ammu', 'society_ammu', 'society_ammu', 'society_ammu', {
type = 'public'
TriggerEvent("esx_society:registerSociety", "ammu", "Ammu", "society_ammu", "society_ammu", "society_ammu", {
type = "public",
})

if Config.MaxInService ~= -1 then
TriggerEvent('esx_service:activateService', 'ammu', Config.MaxInService)
TriggerEvent("esx_service:activateService", "ammu", Config.MaxInService)
end

ESX.RegisterServerCallback("bpt_ammujob:SpawnVehicle", function(source, cb, model , props)
ESX.RegisterServerCallback("bpt_ammujob:SpawnVehicle", function(source, cb, model, props)
local xPlayer = ESX.GetPlayerFromId(source)

if xPlayer.job.name ~= "ammu" then
print(('[^3WARNING^7] Player ^5%s^7 attempted to Exploit Vehicle Spawing!!'):format(source))
print(("[^3WARNING^7] Player ^5%s^7 attempted to Exploit Vehicle Spawing!!"):format(source))
return
end
local SpawnPoint = vector3(Config.Zones.VehicleSpawnPoint.Pos.x, Config.Zones.VehicleSpawnPoint.Pos.y, Config.Zones.VehicleSpawnPoint.Pos.z)
Expand All @@ -24,12 +24,12 @@ ESX.RegisterServerCallback("bpt_ammujob:SpawnVehicle", function(source, cb, mode
cb()
end)

RegisterNetEvent('bpt_ammujob:getStockItem')
AddEventHandler('bpt_ammujob:getStockItem', function(itemName, count)
RegisterNetEvent("bpt_ammujob:getStockItem")
AddEventHandler("bpt_ammujob:getStockItem", function(itemName, count)
local xPlayer = ESX.GetPlayerFromId(source)

if xPlayer.job.name == 'ammu' then
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_ammu', function(inventory)
if xPlayer.job.name == "ammu" then
TriggerEvent("esx_addoninventory:getSharedInventory", "society_ammu", function(inventory)
local item = inventory.getItem(itemName)

-- is there enough in the society?
Expand All @@ -38,43 +38,43 @@ AddEventHandler('bpt_ammujob:getStockItem', function(itemName, count)
if xPlayer.canCarryItem(itemName, count) then
inventory.removeItem(itemName, count)
xPlayer.addInventoryItem(itemName, count)
xPlayer.showNotification(_U('have_withdrawn', count, item.label))
xPlayer.showNotification(_U("have_withdrawn", count, item.label))
else
xPlayer.showNotification(_U('player_cannot_hold'))
xPlayer.showNotification(_U("player_cannot_hold"))
end
else
xPlayer.showNotification(_U('quantity_invalid'))
xPlayer.showNotification(_U("quantity_invalid"))
end
end)
else
print(('[^3WARNING^7] Player ^5%s^7 attempted ^5bpt_ammujob:getStockItem^7 (cheating)'):format(source))
print(("[^3WARNING^7] Player ^5%s^7 attempted ^5bpt_ammujob:getStockItem^7 (cheating)"):format(source))
end
end)

ESX.RegisterServerCallback('bpt_ammujob:getStockItems', function(_, cb)
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_ammu', function(inventory)
ESX.RegisterServerCallback("bpt_ammujob:getStockItems", function(_, cb)
TriggerEvent("esx_addoninventory:getSharedInventory", "society_ammu", function(inventory)
cb(inventory.items)
end)
end)

RegisterNetEvent('bpt_ammujob:putStockItems')
AddEventHandler('bpt_ammujob:putStockItems', function(itemName, count)
RegisterNetEvent("bpt_ammujob:putStockItems")
AddEventHandler("bpt_ammujob:putStockItems", function(itemName, count)
local xPlayer = ESX.GetPlayerFromId(source)
local sourceItem = xPlayer.getInventoryItem(itemName)
local sourceItem = xPlayer.getInventoryItem(itemName)

if xPlayer.job.name == 'ammu' then
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_ammu', function(inventory)
if xPlayer.job.name == "ammu" then
TriggerEvent("esx_addoninventory:getSharedInventory", "society_ammu", function(inventory)
local item = inventory.getItem(itemName)

if sourceItem.count >= count and count > 0 then
xPlayer.removeInventoryItem(itemName, count)
inventory.addItem(itemName, count)
xPlayer.showNotification(_U('have_deposited', count, item.label))
xPlayer.showNotification(_U("have_deposited", count, item.label))
else
xPlayer.showNotification(_U('quantity_invalid'))
xPlayer.showNotification(_U("quantity_invalid"))
end
end)
else
print(('[^3WARNING^7] Player ^5%s^7 attempted ^5bpt_ammujob:putStockItems^7 (cheating)'):format(source))
print(("[^3WARNING^7] Player ^5%s^7 attempted ^5bpt_ammujob:putStockItems^7 (cheating)"):format(source))
end
end)
end)
Loading
Loading