Skip to content

Commit 5096fab

Browse files
authored
Merge pull request #39 from it-scripts/v1.3.1
v1.3.1
2 parents d74cfa2 + 104701e commit 5096fab

15 files changed

Lines changed: 265 additions & 52 deletions

File tree

client/cl_dealer.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@ RegisterNetEvent('it-drugs:client:handleDealerInteraction', function(args)
5252
local price = args.price
5353
local action = args.action
5454

55+
local _description
56+
if action == "buy" then
57+
_description = _U('INPUT__BUY__DESCRIPTION'):format(itemLabel)
58+
else
59+
_description = _U('INPUT__SELL__DESCRIPTION'):format(itemLabel)
60+
end
5561
local input = lib.inputDialog(_U('INPUT__BUY__HEADER'), {
56-
{type = 'number', label = _U('INPUT__BUY__TEXT'), description = _U('INPUT__BUY__DESCRIPTION'):format(itemLabel), required = true, min = 1}
62+
{type = 'number', label = _U('INPUT__BUY__TEXT'), description = _description, required = true, min = 1}
5763
})
5864

5965
if not input then
@@ -82,4 +88,4 @@ AddEventHandler('onResourceStop', function(resource)
8288
DeleteEntity(ped)
8389
end
8490
end
85-
end)
91+
end)

client/cl_planting.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ RegisterNetEvent('it-drugs:client:useItem', function (args)
457457
end)
458458

459459
RegisterNetEvent('it-drugs:client:destroyPlant', function(args)
460-
if not it.hasItem(Config.DestroyItemName, 1) and Config.ItemToDestroyPlant then
460+
if Config.ItemToDestroyPlant and not it.hasItem(Config.DestroyItemName, 1) then
461461
ShowNotification(nil, _U('NOTIFICATION__NEED_LIGHTER'), "error")
462462
TriggerEvent('it-drugs:client:syncRestLoop', false)
463463
return

client/cl_selling.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@ CreateThread(function()
4545
if zone:contains(pedCoords) then
4646
if currentZone ~= k then
4747
zone:onEnter()
48+
if Config.Debug then lib.print.info("Entered Zone ["..k.."]") end
4849
end
4950
if Config.Debug then lib.print.info("Inside Zone ["..k.."]") end
51+
elseif currentZone == k then
52+
zone:onExit()
53+
currentZone = nil
54+
if Config.Debug then lib.print.info("Exited Zone ["..k.."]") end
5055
end
5156
end
5257
end
@@ -176,4 +181,4 @@ RegisterNetEvent('it-drugs:client:salesInitiate', function(cad)
176181
TriggerServerEvent('it-drugs:server:initiatedrug', cad)
177182
SetPedAsNoLongerNeeded(cad.tped)
178183
end
179-
end)
184+
end)

fxmanifest.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ game 'gta5'
33

44
author '@allroundjonu'
55
description 'Advanced Drug System for FiveM'
6-
version 'v1.3.0'
6+
version 'v1.3.1'
77

88
identifier 'it-drugs'
99

@@ -123,4 +123,4 @@ dependencies {
123123
'oxmysql'
124124
}
125125

126-
lua54 'yes'
126+
lua54 'yes'

locales/de.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ Locales['de'] = {
9999
['MENU__TABLE__DESTROY'] = 'Tisch zerstören',
100100
['MENU__TABLE__DESTROY__DESC'] = 'Zerstöre diesen Tisch',
101101

102-
['NOTIFICATION__NO__MONEY'] = 'Du hast nicht genug Geld dabei!',
103-
['NOTIFICATION__BUY__SUCCESS'] = 'Du hast erfolgreich etwas %s gekauft.',
104-
105102
['NOTIFICATION__IN__VEHICLE'] = 'Das geht nicht mit einem Fahrzeug',
106103
['NOTIFICATION__MAX__PLANTS'] = 'Bitte kümmere dich ersteinmal um deinen aktuellen Pflanzen',
107104
['NOTIFICATION__CANT__PLACE'] = 'Das kannst du hier nicht tun',
@@ -118,6 +115,9 @@ Locales['de'] = {
118115

119116
['NOTIFICATION__DEALER__SELL__SUCCESS'] = 'Du hast erflogreich %gx %s für %g verkauft',
120117
['NOTIFICATION__DEALER__BUY__SUCCESS'] = 'Du hast erflogreich %gx %s für %g gekauft',
118+
['NOTIFICATION__BUY__SUCCESS'] = 'Du hast erfolgreich etwas %s gekauft.',
119+
['NOTIFICATION__NO__MONEY'] = 'Du hast nicht genug Geld dabei!',
120+
['NOTIFICATION__DEALER__NO__ITEM'] = 'Du hast nicht genug Items zum verkaufen!',
121121

122122
['NOTIFICATION__CALLING__COPS'] = 'Der Käufer ruft die Polizei!',
123123
['NOTIFICATION__NOT__INTERESTED'] = 'Der Käufer ist gerade nicht interessiert!',
@@ -166,6 +166,7 @@ Locales['de'] = {
166166
['INPUT__BUY__HEADER'] = 'Kaufen',
167167
['INPUT__BUY__TEXT'] = 'Anzahl',
168168
['INPUT__BUY__DESCRIPTION'] = 'Wie viel %s möchtest du Kaufen?',
169+
['INPUT__SELL__DESCRIPTION'] = 'Wie viel %s möchtest du Verkaufen?',
169170

170171
['INPUT__AMOUNT__HEADER'] = 'Verarbeiten',
171172
['INPUT__AMOUNT__TEXT'] = 'Menge',

locales/en.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Locales['en'] = {
2727
['MENU__ITEM'] = 'Items',
2828
['MENU__ITEM__DESC'] = 'Use this item to take care of your plant',
2929

30-
31-
3230
['MENU__PROCESSING'] = 'Proccessing',
3331
['MENU__RECIPE__DESC'] = 'Process your drugs with this recipe',
3432

@@ -116,8 +114,9 @@ Locales['en'] = {
116114

117115
['NOTIFICATION__DEALER__SELL__SUCCESS'] = 'You have successfully sold %gx %s for $%g',
118116
['NOTIFICATION__DEALER__BUY__SUCCESS'] = 'You have successfully bought %gx %s for $%g',
119-
['NOTIFICATION__NO__MONEY'] = 'You don´t have enought money on you',
120-
['NOTIFICATION__BUY__SUCCESS'] = 'You successfuly bought some %s',
117+
['NOTIFICATION__NO__MONEY'] = 'You don`t have enough money on you',
118+
['NOTIFICATION__BUY__SUCCESS'] = 'You successfully bought some %s',
119+
['NOTIFICATION__DEALER__NO__ITEM'] = 'You don`t have enough items to sell',
121120

122121
['NOTIFICATION__IN__VEHICLE'] = 'You can´t do this in a Vehicle',
123122
['NOTIFICATION__CANT__PLACE'] = 'You can´t do this here',
@@ -185,6 +184,7 @@ Locales['en'] = {
185184
['INPUT__BUY__HEADER'] = 'Buying',
186185
['INPUT__BUY__TEXT'] = 'Amount',
187186
['INPUT__BUY__DESCRIPTION'] = 'How many %s do you want to buy?',
187+
['INPUT__SELL__DESCRIPTION'] = 'How many %s do you want to sell?',
188188

189189
['TARGET__DEALER__LABLE'] = 'Check Dealer',
190190
['TARGET__PLANT__LABEL'] = 'Check Plant',

locales/es.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Locales['es'] = {
104104
['NOTIFICATION__DEALER__SELL__SUCCESS'] = 'Has vendido con éxito %gx %s por $%g',
105105
['NOTIFICATION__DEALER__BUY__SUCCESS'] = 'Has comprado %gx %s por $%g',
106106
['NOTIFICATION__BUY__SUCCESS'] = 'Has comprado con éxito algunos %s',
107+
['NOTIFICATION__DEALER__NO__ITEM'] = 'No tiene suficientes artículos para vender',
107108

108109
['NOTIFICATION__IN__VEHICLE'] = 'No puedes hacer esto en un vehículo.',
109110
['NOTIFICATION__CANT__PLACE'] = 'No puedes hacer esto aquí.',
@@ -169,6 +170,7 @@ Locales['es'] = {
169170
['INPUT__BUY__HEADER'] = 'Compra',
170171
['INPUT__BUY__TEXT'] = 'Cantidad',
171172
['INPUT__BUY__DESCRIPTION'] = '¿Cuántos %s quieres comprar?',
173+
['INPUT__SELL__DESCRIPTION'] = '¿Cuántos %s quiere vender?',
172174

173175
['TARGET__PLANT__LABEL'] = 'Ver Planta',
174176
['TARGET__TABLE__LABEL'] = 'Usar Mesa',

locales/fr.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ Locales['fr'] = {
112112

113113
['NOTIFICATION__NO__MONEY'] = 'Vous n\'avez pas assez d\'argent sur vous',
114114
['NOTIFICATION__DEALER__SELL__SUCCESS'] = 'Vous avez vendu %gx %s avec succès pour $%g',
115-
['NOTIFICATION__DEALER__BUY__SUCCESS'] = 'Vous avez acheté %gx %s avec succès pour $%g',
115+
['NOTIFICATION__DEALER__BUY__SUCCESS'] = 'Vous avez acheté %gx %s avec succès pour $%g',
116116
['NOTIFICATION__BUY__SUCCESS'] = 'Vous avez acheté avec succès du %s',
117+
['NOTIFICATION__DEALER__NO__ITEM'] = 'Vous n´avez pas assez d´articles à vendre',
117118

118119
['NOTIFICATION__IN__VEHICLE'] = 'Vous ne pouvez pas faire cela dans un véhicule',
119120
['NOTIFICATION__CANT__PLACE'] = 'Vous ne pouvez pas faire cela ici',
@@ -179,7 +180,8 @@ Locales['fr'] = {
179180

180181
['INPUT__BUY__HEADER'] = 'Achat',
181182
['INPUT__BUY__TEXT'] = 'Quantité',
182-
['INPUT__BUY__DESCRIPTION'] = 'Combien de %s voulez-vous acheter ?',
183+
['INPUT__BUY__DESCRIPTION'] = 'Combien de %s voulez-vous acheter?',
184+
['INPUT__SELL__DESCRIPTION'] = 'Combien de %s voulez-vous vendre?',
183185

184186
['TARGET__DEALER__LABLE'] = 'Vérifier le dealer',
185187
['TARGET__PLANT__LABEL'] = 'Vérifier la plante',

locales/he.lua

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,17 @@ Locales['he'] = {
110110
['MENU__TABLE__DESTROY'] = 'השמד שולחן',
111111
['MENU__TABLE__DESTROY__DESC'] = 'השמד את השולחן הזה',
112112

113+
['NOTIFICATION__DEALER__SELL__SUCCESS'] = 'מכרת בהצלחה %gx %s תמורת $%g',
114+
['NOTIFICATION__DEALER__BUY__SUCCESS'] = 'קנית בהצלחה %gx %s עבור $%g',
115+
['NOTIFICATION__NO__MONEY'] = 'אין לך מספיק כסף עליך',
116+
['NOTIFICATION__BUY__SUCCESS'] = 'קנית בהצלחה כמה %s',
117+
['NOTIFICATION__DEALER__NO__ITEM'] = 'אין לך מספיק פריטים למכור',
118+
113119
['NOTIFICATION__IN__VEHICLE'] = 'אתה לא יכול לעשות את זה ברכב',
114120
['NOTIFICATION__CANT__PLACE'] = 'אתה לא יכול לעשות את זה כאן',
115121
['NOTIFICATION__TO__NEAR'] = 'אתה לא יכול לשתול את זה ליד צמח אחר',
116122
['NOTIFICATION__CANCELED'] = '...בוטל',
117123
['NOTIFICATION__NO__ITEMS'] = 'אין לך פריטים לטפל בצמח הזה',
118-
['NOTIFICATION__NO__MONEY'] = 'אין לך מספיק כסף עליך',
119-
['NOTIFICATION__BUY__SUCCESS'] = 'רכשת בהצלחה קצת %s',
120124
['NOTIFICATION__DRUG__COOLDOWN'] = 'עליך להמתין לפני שתוכל לקחת שוב את הסם הזה',
121125
['NOTIFICATION__NO__AMOUNT'] = 'אתה צריך להזין סכום',
122126

@@ -170,9 +174,11 @@ Locales['he'] = {
170174
['INPUT__AMOUNT__HEADER'] = 'מעבד',
171175
['INPUT__AMOUNT__TEXT'] = 'כמות',
172176
['INPUT__AMOUNT__DESCRIPTION'] = '?כמה אתה רוצה לעבד',
177+
173178
['INPUT__BUY__HEADER'] = 'רכישה',
174179
['INPUT__BUY__TEXT'] = 'כמות',
175180
['INPUT__BUY__DESCRIPTION'] = '?כמה %s אתה רוצה לקנות',
181+
['INPUT__SELL__DESCRIPTION'] = 'כמה %s אתה רוצה למכור?',
176182

177183
['TARGET__PLANT__LABEL'] = 'בדוק צמח',
178184
['TARGET__TABLE__LABEL'] = 'השתמש בשולחן',
@@ -184,13 +190,3 @@ Locales['he'] = {
184190

185191
['COMMAND__GROUNDHASH__HELP'] = 'קבל את ה-hash הקרקע הנוכחי'
186192
}
187-
188-
function _U(string)
189-
if Locales[Config.Language] == nil then
190-
return "Language not found"
191-
end
192-
if Locales[Config.Language][string] == nil then
193-
return string
194-
end
195-
return Locales[Config.Language][string]
196-
end

0 commit comments

Comments
 (0)