diff --git a/locales/br.lua b/locales/br.lua index d4e9add3..2e80ea9c 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -2,9 +2,10 @@ Locales ['br'] = { ['buy_license'] = 'buy weapon license?', ['yes'] = '%s', ['no'] = 'no', - ['buy'] = 'você comprou %s', + ['buy'] = 'você comprou ~y~%s~s~ for ~r~R$%s~s~', ['not_enough_black'] = 'você não tem dinheiro sujo suficiente', ['not_enough'] = 'você não tem dinheiro suficiente', + ['already_owned'] = 'you already own this weapon!', ['shop'] = 'comprar', ['shop_menu'] = 'pressione ~INPUT_CONTEXT~ para comprar armas.', ['shop_menu_item'] = 'R$%s', diff --git a/locales/de.lua b/locales/de.lua index 070f3a7e..1022cac5 100644 --- a/locales/de.lua +++ b/locales/de.lua @@ -2,9 +2,10 @@ Locales ['de'] = { ['buy_license'] = 'buy weapon license?', ['yes'] = '%s', ['no'] = 'no', - ['buy'] = 'du kaufst %s', + ['buy'] = 'du kaufst ~y~%s~s~ for ~r~%s EUR~s~', ['not_enough_black'] = 'du hast nicht genug Schwarzgeld', ['not_enough'] = 'du hast nicht genug Geld', + ['already_owned'] = 'you already own this weapon!', ['shop'] = 'geschäft', ['shop_menu'] = 'drücke ~INPUT_CONTEXT~ um auf das Geschäft zuzugreifen.', ['shop_menu_item'] = '%s EUR', diff --git a/locales/en.lua b/locales/en.lua index cd95640e..06bc7062 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -2,9 +2,10 @@ Locales ['en'] = { ['buy_license'] = 'buy weapon license?', ['yes'] = '%s', ['no'] = 'no', - ['buy'] = 'you bought %s', + ['buy'] = 'you bought ~y~%s~s~ for ~r~$%s~s~', ['not_enough_black'] = 'you do not have enough dirty money', ['not_enough'] = 'you do not have enough money', + ['already_owned'] = 'you already own this weapon!', ['shop'] = 'weapon shop', ['shop_menu'] = 'press ~INPUT_CONTEXT~ to access the ~y~weapon store~s~.', ['shop_menu_item'] = '$%s', diff --git a/locales/es.lua b/locales/es.lua index 47d20ab2..95b5e98b 100644 --- a/locales/es.lua +++ b/locales/es.lua @@ -2,9 +2,10 @@ Locales ['es'] = { ['buy_license'] = 'buy weapon license?', ['yes'] = '%s', ['no'] = 'no', - ['buy'] = 'has comprado %s', + ['buy'] = 'has comprado ~y~%s~s~ for ~r~%s EUR~s~', ['not_enough_black'] = 'usted no tiene ~r~suficiente~s~ dinero negro', ['not_enough'] = 'usted no tiene ~r~suficiente~s~ dinero', + ['already_owned'] = 'you already own this weapon!', ['shop'] = 'tienda', ['shop_menu'] = 'presione ~INPUT_CONTEXT~ para acceder a la tienda.', ['shop_menu_item'] = '%s EUR', diff --git a/locales/fi.lua b/locales/fi.lua index fa1a60f2..d549fe68 100644 --- a/locales/fi.lua +++ b/locales/fi.lua @@ -2,9 +2,10 @@ Locales ['fi'] = { ['buy_license'] = 'osta lisenssi?', ['yes'] = '%s', ['no'] = 'ei', - ['buy'] = 'sinä ostit %s', + ['buy'] = 'sinä ostit ~y~%s~s~ for ~r~%s EUR~s~', ['not_enough_black'] = 'ei tarpeeksi likaista rahaa', ['not_enough'] = 'sinulla ei ole tarpeeksi rahaa', + ['already_owned'] = 'you already own this weapon!', ['shop'] = 'kauppa', ['shop_menu'] = 'paina ~INPUT_CONTEXT~ avataksesi kauppa ikkuna.', ['shop_menu_item'] = '%s EUR', diff --git a/locales/fr.lua b/locales/fr.lua index fbdbff49..b674c5f7 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -2,9 +2,10 @@ Locales ['fr'] = { ['buy_license'] = 'acheter une license?', ['yes'] = '%s', ['no'] = 'non', - ['buy'] = 'vous avez acheté %s', + ['buy'] = 'vous avez acheté ~y~%s~s~ for ~r~%s EUR~s~', ['not_enough_black'] = 'Vous n\'avez ~r~pas assez~s~ d\'argent sale', ['not_enough'] = 'vous n\'avez ~r~pas assez~s~ d\'argent', + ['already_owned'] = 'you already own this weapon!', ['shop'] = 'magasin', ['shop_menu'] = 'appuyez sur ~INPUT_CONTEXT~ pour accéder au magasin.', ['shop_menu_item'] = '%s EUR', diff --git a/locales/pl.lua b/locales/pl.lua index d52dc9aa..e64bb7fb 100644 --- a/locales/pl.lua +++ b/locales/pl.lua @@ -2,9 +2,10 @@ Locales ['pl'] = { ['buy_license'] = 'czy chcesz kupić licencję?', ['yes'] = '%s', ['no'] = 'nie', - ['buy'] = 'kupiłeś/aś %s', + ['buy'] = 'kupiłeś/aś ~y~%s~s~ for ~r~%s PLN~s~', ['not_enough_black'] = 'nie masz wystarczająco brudnej kasy', ['not_enough'] = 'nie masz wystarczająco pieniędzy', + ['already_owned'] = 'you already own this weapon!', ['shop'] = 'sklep', ['shop_menu'] = 'Wciśnij ~INPUT_CONTEXT~ aby otworzyć sklep.', ['shop_menu_item'] = '%s PLN', diff --git a/locales/sv.lua b/locales/sv.lua new file mode 100644 index 00000000..05a4df01 --- /dev/null +++ b/locales/sv.lua @@ -0,0 +1,13 @@ +Locales ['sv'] = { + ['buy_license'] = 'vill du köpa ett vapenlicens?', + ['yes'] = '%s', + ['no'] = 'nej tack', + ['buy'] = 'du köpte ~y~%s~s~ för ~r~%s SEK~s~', + ['not_enough_black'] = 'du har inte tillräckligt med svarta pengar', + ['not_enough'] = 'du har inte råd för detta', + ['already_owned'] = 'du äger redan detta vapen!', + ['shop'] = 'vapenaffär', + ['shop_menu'] = 'tryck ~INPUT_CONTEXT~ för att komma åt ~y~vapenaffären~s~.', + ['shop_menu_item'] = '%s SEK', + ['map_blip'] = 'vapenaffär', +} diff --git a/server/main.lua b/server/main.lua index aa2978e1..54297cab 100644 --- a/server/main.lua +++ b/server/main.lua @@ -58,12 +58,17 @@ AddEventHandler('esx_weashop:buyItem', function(weaponName, zone) local xPlayer = ESX.GetPlayerFromId(_source) local price = GetPrice(weaponName, zone) + if xPlayer.hasWeapon(weaponName) then + TriggerClientEvent('esx:showNotification', _source, _U('already_owned')) + return + end + if zone == "BlackWeashop" then if xPlayer.getAccount('black_money').money >= price then xPlayer.removeAccountMoney('black_money', price) xPlayer.addWeapon(weaponName, 42) - TriggerClientEvent('esx:showNotification', _source, _U('buy', ESX.GetWeaponLabel(weaponName))) + TriggerClientEvent('esx:showNotification', _source, _U('buy', ESX.GetWeaponLabel(weaponName), price)) else TriggerClientEvent('esx:showNotification', _source, _U('not_enough_black')) end @@ -73,7 +78,7 @@ AddEventHandler('esx_weashop:buyItem', function(weaponName, zone) if xPlayer.getMoney() >= price then xPlayer.removeMoney(price) xPlayer.addWeapon(weaponName, 42) - TriggerClientEvent('esx:showNotification', _source, _U('buy', ESX.GetWeaponLabel(weaponName))) + TriggerClientEvent('esx:showNotification', _source, _U('buy', ESX.GetWeaponLabel(weaponName), price)) else TriggerClientEvent('esx:showNotification', _source, _U('not_enough')) end