diff --git a/client/main.lua b/client/main.lua index aadd5b23..81ba51a1 100644 --- a/client/main.lua +++ b/client/main.lua @@ -365,6 +365,7 @@ function OpenShopMenu() table.insert(LastVehicles, vehicle) TaskWarpPedIntoVehicle(playerPed, vehicle, -1) FreezeEntityPosition(vehicle, true) + SetModelAsNoLongerNeeded(vehicleData.model) end) end) @@ -375,6 +376,7 @@ function OpenShopMenu() table.insert(LastVehicles, vehicle) TaskWarpPedIntoVehicle(playerPed, vehicle, -1) FreezeEntityPosition(vehicle, true) + SetModelAsNoLongerNeeded(firstVehicleData.model) end) end @@ -385,18 +387,16 @@ function WaitForVehicleToLoad(modelHash) if not HasModelLoaded(modelHash) then RequestModel(modelHash) + BeginTextCommandBusyString('STRING') + AddTextComponentSubstringPlayerName(_U('shop_awaiting_model')) + EndTextCommandBusyString(4) + while not HasModelLoaded(modelHash) do Citizen.Wait(1) - - DisableControlAction(0, Keys['TOP'], true) - DisableControlAction(0, Keys['DOWN'], true) - DisableControlAction(0, Keys['LEFT'], true) - DisableControlAction(0, Keys['RIGHT'], true) - DisableControlAction(0, 176, true) -- ENTER key - DisableControlAction(0, Keys['BACKSPACE'], true) - - drawLoadingText(_U('shop_awaiting_model'), 255, 255, 255, 255) + DisableAllControlActions(0) end + + RemoveLoadingPrompt() end end @@ -999,19 +999,4 @@ Citizen.CreateThread(function() LoadInterior(interiorID) EnableInteriorProp(interiorID, 'csr_beforeMission') -- Load large window RefreshInterior(interiorID) -end) - -function drawLoadingText(text, red, green, blue, alpha) - SetTextFont(4) - SetTextScale(0.0, 0.5) - SetTextColour(red, green, blue, alpha) - SetTextDropshadow(0, 0, 0, 0, 255) - SetTextEdge(1, 0, 0, 0, 255) - SetTextDropShadow() - SetTextOutline() - SetTextCentre(true) - - BeginTextCommandDisplayText("STRING") - AddTextComponentSubstringPlayerName(text) - EndTextCommandDisplayText(0.5, 0.5) -end \ No newline at end of file +end) \ No newline at end of file diff --git a/locales/br.lua b/locales/br.lua index eb72cf15..9001a2e2 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -11,7 +11,7 @@ Locales['br'] = { ['buy_vehicle_shop'] = 'comprar %s por $%s?', ['buy_vehicle'] = 'comprar veículo', ['car_dealer'] = 'Concessionária de carros', - ['shop_awaiting_model'] = 'the vehicle is currently ~g~DOWNLOADING & LOADING~s~ please wait', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', ['create_bill'] = 'criar recibo', ['dealer_boss'] = 'Concessionária de carros - Chefe', ['delivered'] = 'veículo ~g~entregue~s~ para o revendedor', diff --git a/locales/en.lua b/locales/en.lua index 02078493..69197a9c 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -11,7 +11,7 @@ Locales['en'] = { ['buy_vehicle_shop'] = 'do you want to purchase %s for $%s?', ['buy_vehicle'] = 'buy vehicle', ['car_dealer'] = 'car Dealership', - ['shop_awaiting_model'] = 'the vehicle is currently ~g~DOWNLOADING & LOADING~s~ please wait', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', ['create_bill'] = 'create bill', ['dealer_boss'] = 'car Dealer - Boss', ['delivered'] = 'the vehicle has been ~g~delivered~s~ to the dealer', diff --git a/locales/fi.lua b/locales/fi.lua index 3af97356..3eff6100 100644 --- a/locales/fi.lua +++ b/locales/fi.lua @@ -11,7 +11,7 @@ Locales['fi'] = { ['buy_vehicle_shop'] = 'haluatko ostaa ajoneuvon %s hintaan $%s?', ['buy_vehicle'] = 'osta ajoneuvo', ['car_dealer'] = 'autokauppa', - ['shop_awaiting_model'] = 'the vehicle is currently ~g~DOWNLOADING & LOADING~s~ please wait', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', ['create_bill'] = 'tee lasku', ['dealer_boss'] = 'autokauppa - Pomo', ['delivered'] = 'ajoneuvo on ~g~kuljetettu~s~ myyjälle', diff --git a/locales/fr.lua b/locales/fr.lua index 6b5bb8d5..4c53116f 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -11,7 +11,7 @@ Locales['fr'] = { ['buy_vehicle_shop'] = 'acheter %s pour $%s?', ['buy_vehicle'] = 'acheter véhicule', ['car_dealer'] = 'concessionnaire', - ['shop_awaiting_model'] = 'the vehicle is currently ~g~DOWNLOADING & LOADING~s~ please wait', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', ['create_bill'] = 'créer facture', ['dealer_boss'] = 'concessionnaire - Patron', ['delivered'] = 'véhicule ~g~rendu~s~ au concessionnaire', diff --git a/locales/pl.lua b/locales/pl.lua index bbc6f76e..c0b19aa7 100644 --- a/locales/pl.lua +++ b/locales/pl.lua @@ -11,7 +11,7 @@ Locales['pl'] = { ['buy_vehicle_shop'] = 'czy chcesz kupić %s za $%s?', ['buy_vehicle'] = 'kup pojazd', ['car_dealer'] = 'sprzedawca Aut', - ['shop_awaiting_model'] = 'the vehicle is currently ~g~DOWNLOADING & LOADING~s~ please wait', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', ['create_bill'] = 'stwórz fakture', ['dealer_boss'] = 'salon samochodowy - Szef', ['delivered'] = 'pojazd został ~g~dostarczony~s~ do salonu', diff --git a/locales/sv.lua b/locales/sv.lua index 2d7e6a1e..15618054 100644 --- a/locales/sv.lua +++ b/locales/sv.lua @@ -11,7 +11,7 @@ Locales['sv'] = { ['buy_vehicle_shop'] = 'vill du köpa in %s för %s SEK?', ['buy_vehicle'] = 'Köp in fordon', ['car_dealer'] = 'bilförsäljare', - ['shop_awaiting_model'] = 'ditt fordon håller på att ~g~LADDA NER & LÄSA IN~s~ vänta tills det är klart', + ['shop_awaiting_model'] = 'fordon laddas in, vänligen vänta', ['create_bill'] = 'ge faktura', ['dealer_boss'] = 'chefmeny', ['delivered'] = 'fordonet har ~g~lämnats tillbaka~s~ till bilförsäljaren',