-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef9a008
commit 6c5eb45
Showing
5 changed files
with
164 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 32 additions & 32 deletions
64
server-data/resources/[bpt_addons]/bpt_ammujob/locales/en.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
} |
64 changes: 32 additions & 32 deletions
64
server-data/resources/[bpt_addons]/bpt_ammujob/locales/it.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
} |
116 changes: 56 additions & 60 deletions
116
server-data/resources/[bpt_addons]/bpt_ammujob/server/main.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,80 @@ | ||
TriggerEvent("esx_society:registerSociety", "ammu", "Ammu", "society_ammu", "society_ammu", "society_ammu", { | ||
type = "public", | ||
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) | ||
local xPlayer = ESX.GetPlayerFromId(source) | ||
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)) | ||
return | ||
end | ||
local SpawnPoint = vector3( | ||
Config.Zones.VehicleSpawnPoint.Pos.x, | ||
Config.Zones.VehicleSpawnPoint.Pos.y, | ||
Config.Zones.VehicleSpawnPoint.Pos.z | ||
) | ||
ESX.OneSync.SpawnVehicle(joaat(model), SpawnPoint, Config.Zones.VehicleSpawnPoint.Heading, props, function() | ||
local vehicle = NetworkGetEntityFromNetworkId() | ||
while GetVehicleNumberPlateText(vehicle) ~= props.plate do | ||
Wait(0) | ||
end | ||
TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle, -1) | ||
end) | ||
cb() | ||
if xPlayer.job.name ~= "ammu" then | ||
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) | ||
ESX.OneSync.SpawnVehicle(joaat(model), SpawnPoint, Config.Zones.VehicleSpawnPoint.Heading, props, function() | ||
local vehicle = NetworkGetEntityFromNetworkId() | ||
while GetVehicleNumberPlateText(vehicle) ~= props.plate do | ||
Wait(0) | ||
end | ||
TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle, -1) | ||
end) | ||
cb() | ||
end) | ||
|
||
RegisterNetEvent("bpt_ammujob:getStockItem") | ||
AddEventHandler("bpt_ammujob:getStockItem", function(itemName, count) | ||
local xPlayer = ESX.GetPlayerFromId(source) | ||
local xPlayer = ESX.GetPlayerFromId(source) | ||
|
||
if xPlayer.job.name == "ammu" then | ||
TriggerEvent("bpt_addoninventory:getSharedInventory", "society_ammu", function(inventory) | ||
local item = inventory.getItem(itemName) | ||
if xPlayer.job.name == "ammu" then | ||
TriggerEvent("bpt_addoninventory:getSharedInventory", "society_ammu", function(inventory) | ||
local item = inventory.getItem(itemName) | ||
|
||
-- is there enough in the society? | ||
if count > 0 and item.count >= count then | ||
-- can the player carry the said amount of x item? | ||
if xPlayer.canCarryItem(itemName, count) then | ||
inventory.removeItem(itemName, count) | ||
xPlayer.addInventoryItem(itemName, count) | ||
xPlayer.showNotification(TranslateCap("have_withdrawn", count, item.label)) | ||
else | ||
xPlayer.showNotification(TranslateCap("player_cannot_hold")) | ||
end | ||
else | ||
xPlayer.showNotification(TranslateCap("quantity_invalid")) | ||
end | ||
end) | ||
else | ||
print(("[^3WARNING^7] Player ^5%s^7 attempted ^5bpt_ammujob:getStockItem^7 (cheating)"):format(source)) | ||
end | ||
-- is there enough in the society? | ||
if count > 0 and item.count >= count then | ||
-- can the player carry the said amount of x item? | ||
if xPlayer.canCarryItem(itemName, count) then | ||
inventory.removeItem(itemName, count) | ||
xPlayer.addInventoryItem(itemName, count) | ||
xPlayer.showNotification(TranslateCap("have_withdrawn", count, item.label)) | ||
else | ||
xPlayer.showNotification(TranslateCap("player_cannot_hold")) | ||
end | ||
else | ||
xPlayer.showNotification(TranslateCap("quantity_invalid")) | ||
end | ||
end) | ||
else | ||
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("bpt_addoninventory:getSharedInventory", "society_ammu", function(inventory) | ||
cb(inventory.items) | ||
end) | ||
TriggerEvent("bpt_addoninventory:getSharedInventory", "society_ammu", function(inventory) | ||
cb(inventory.items) | ||
end) | ||
end) | ||
|
||
RegisterNetEvent("bpt_ammujob:putStockItems") | ||
AddEventHandler("bpt_ammujob:putStockItems", function(itemName, count) | ||
local xPlayer = ESX.GetPlayerFromId(source) | ||
local sourceItem = xPlayer.getInventoryItem(itemName) | ||
local xPlayer = ESX.GetPlayerFromId(source) | ||
local sourceItem = xPlayer.getInventoryItem(itemName) | ||
|
||
if xPlayer.job.name == "ammu" then | ||
TriggerEvent("bpt_addoninventory:getSharedInventory", "society_ammu", function(inventory) | ||
local item = inventory.getItem(itemName) | ||
if xPlayer.job.name == "ammu" then | ||
TriggerEvent("bpt_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(TranslateCap("have_deposited", count, item.label)) | ||
else | ||
xPlayer.showNotification(TranslateCap("quantity_invalid")) | ||
end | ||
end) | ||
else | ||
print(("[^3WARNING^7] Player ^5%s^7 attempted ^5bpt_ammujob:putStockItems^7 (cheating)"):format(source)) | ||
end | ||
if sourceItem.count >= count and count > 0 then | ||
xPlayer.removeInventoryItem(itemName, count) | ||
inventory.addItem(itemName, count) | ||
xPlayer.showNotification(TranslateCap("have_deposited", count, item.label)) | ||
else | ||
xPlayer.showNotification(TranslateCap("quantity_invalid")) | ||
end | ||
end) | ||
else | ||
print(("[^3WARNING^7] Player ^5%s^7 attempted ^5bpt_ammujob:putStockItems^7 (cheating)"):format(source)) | ||
end | ||
end) |