From 15cab2eaf264731578fe95af2cf6790a9095b34f Mon Sep 17 00:00:00 2001 From: Fezz <43589668+FBFezz@users.noreply.github.com> Date: Tue, 22 Jun 2021 22:53:08 +0100 Subject: [PATCH] Initial Release --- LICENSE | 19 ++++ README.md | 54 +++++++++++ client/client.lua | 216 +++++++++++++++++++++++++++++++++++++++++ config.lua | 81 ++++++++++++++++ fxmanifest.lua | 27 ++++++ locales/de.lua | 7 ++ locales/en.lua | 7 ++ locales/es.lua | 7 ++ locales/fi.lua | 7 ++ locales/fr.lua | 7 ++ locales/pl.lua | 7 ++ locales/sv.lua | 7 ++ locales/tr.lua | 7 ++ server/server.lua | 138 ++++++++++++++++++++++++++ szi_vendingrobbery.sql | 6 ++ version.json | 5 + 16 files changed, 602 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 client/client.lua create mode 100644 config.lua create mode 100644 fxmanifest.lua create mode 100644 locales/de.lua create mode 100644 locales/en.lua create mode 100644 locales/es.lua create mode 100644 locales/fi.lua create mode 100644 locales/fr.lua create mode 100644 locales/pl.lua create mode 100644 locales/sv.lua create mode 100644 locales/tr.lua create mode 100644 server/server.lua create mode 100644 szi_vendingrobbery.sql create mode 100644 version.json diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8ea5455 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2021 Sub-Zero Interactive + +All rights reserved. + +Permission is hereby granted, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software with 'All rights reserved'. Even if 'All rights reserved' is very clear : + + You shall not sell and/or resell this software + The rights to use, copy, modify and merge + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..24c0fec --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# szi_vendingrobbery +This is a script that allows you to buy Soda's & rob vending machines using fivem-target. + +## Requirements +- [es_extended](https://github.com/esx-framework/es_extended/tree/legacy) +- [mhacking](https://github.com/GHMatti/FiveM-Scripts/tree/master/mhacking) +- [fivem-target](https://github.com/meta-hub/fivem-target) OR [bt-target](https://github.com/brentN5/bt-target) +- [mythic_progbar](https://github.com/HalCroves/mythic_progbar) +- [mythic_notify](https://github.com/JayMontana36/mythic_notify) + +## Download & Installation + +### Using Git +``` +cd resources +git clone https://github.com/Sub-Zero-Interactive/szi_vendingrobbery [szi]/szi_vendingrobbery +``` + +### Manually +- Download https://github.com/Sub-Zero-Interactive/szi_vendingrobbery +- Put it in the `[szi]` directory + + +## Installation +- Import `szi_vendingrobbery.sql` in your database +- Add this in your server.cfg : + +``` +ensure szi_vendingrobbery +``` + +# Legal +### License +szi_vendingrobbery - This is a script that allows you to rob vending machines using fivem-target. + +Copyright (C) 2021 Sub-Zero Interactive + +All rights reserved. + +Permission is hereby granted, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software with 'All rights reserved'. Even if 'All rights reserved' is very clear : + + You shall not sell and/or resell this software + The rights to use, copy, modify and merge + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/client/client.lua b/client/client.lua new file mode 100644 index 0000000..33151aa --- /dev/null +++ b/client/client.lua @@ -0,0 +1,216 @@ +local hasStarted, startedRobbing, cancontinue = false, false, false +local CurrentCoords, started = nil, nil +local taken = 0 + +Citizen.CreateThread(function() + while ESX == nil do + TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) + Citizen.Wait(100) + end +end) + +AddEventHandler('onClientResourceStart', function (resourceName) + if (GetCurrentResourceName() ~= resourceName) then return end + for k,v in pairs(Config.VendingMachineModels) do + if Config.FivemTarget then + exports['fivem-target']:AddTargetModel({ + name = 'robbery', + label = 'Vending Machine', + icon = 'fas fa-mug-hot', + model = GetHashKey(v.prop), + interactDist = 2.0, + onInteract = StartRobbing, + options = { + { + name = 'rob', + label = 'Rob Vending Machine' + }, + { + name = 'buy', + label = 'Buy Soda' + } + }, + vars = {} + }) + else + local machines = {} + for k,v in pairs(Config.VendingMachineModels) do + table.insert(machines,GetHashKey(v.prop)) + end + Wait(5) + exports['bt-target']:AddTargetModel(machines, { + options = { + { + event = 'szi_vendingmachine:startRobbing', + icon = 'fas fa-mug-hot', + label = 'Rob Vending Machine', + }, + { + event = 'szi_vendingmachine:buy', + icon = 'fas fa-mug-hot', + label = 'Buy Soda', + } + }, + job = {'all'}, + distance = 1.5 + }) + end + end +end) + +function OpenVendingMenu() + ESX.UI.Menu.CloseAll() + + local elements = {} + for k, v in pairs(Config.Rewards) do + table.insert(elements, {label = ('%s - %s'):format(v.name, ESX.Math.GroupDigits(v.price)), item = v.name, price = v.price, type = 'slider', value = 1, min = 1, max = 100}) + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vending', { + title = 'Vending Machine', + align = 'bottom-right', + elements = elements + }, function(data, menu) + TriggerServerEvent('szi_vendingmachine:buyItem', data.current.item, data.current.price, data.current.value) + TaskPlayAnim(PlayerPedId(),Config.VendingDict,Config.VendingAnim,1.0,1.0,-1,1,0,false,false,false) + Wait(5000) + ClearPedTasks(PlayerPedId()) + end, function(data, menu) + menu.close() + end) +end + +function FinishRobbings(success) + TriggerServerEvent('szi_vendingmachine:robSuccess', success) + FinishRobbing(success) + Cooldown(true) +end + +function FinishRobbing(success) + TriggerEvent('mhacking:hide') + if success and taken < Config.MaxTake then + ClearPedTasks(PlayerPedId()) + RequestAnimDict(Config.VendingDict) + while not HasAnimDictLoaded(Config.VendingDict) do + Wait(10) + end + TaskPlayAnim(PlayerPedId(),Config.VendingDict,Config.VendingAnim,1.0,1.0,-1,1,0,false,false,false) + cancontinue = true + ESX.ShowHelpNotification(_U('press_stop')) + exports['mythic_progbar']:Progress({ + name = 'using', + duration = Config.RobTime * 1000, + label = 'Robbing Vending Machine', + useWhileDead = false, + canCancel = true, + controlDisables = { + disableMovement = true, + disableCarMovement = true, + disableMouse = false, + disableCombat = true, + } + }, function(cancelled) + if not cancelled then + TriggerServerEvent('szi_vendingmachine:success') + taken = taken + 1 + FinishRobbing(true) + else + ClearPedTasks(PlayerPedId()) + cancontinue = false + taken = 0 + Cooldown(true) + end + end) + else + if not (taken < Config.MaxTake) then + ESX.ShowHelpNotification(_U('max_amount')) + end + ClearPedTasks(PlayerPedId()) + cancontinue = false + taken = 0 + Cooldown(true) + end +end + +function StartRobbing(targetName, optionName, vars, entityHit) + if optionName and optionName == 'rob' then + if not startedRobbing then + startedRobbing = true + ESX.TriggerServerCallback('szi_vendingmachine:canRob', function(CanRob) + if CanRob then + local chance = math.random(Config.MinChance, Config.MaxChance) + local pos = GetEntityCoords(PlayerPedId(), true) + local s1, s2 = GetStreetNameAtCoord( pos.x, pos.y, pos.z, Citizen.PointerValueInt(), Citizen.PointerValueInt() ) + local street1 = GetStreetNameFromHashKey(s1) + local street2 = GetStreetNameFromHashKey(s2) + ClearPedTasks(PlayerPedId()) + RequestAnimDict(Config.RobbingDict) + while not HasAnimDictLoaded(Config.RobbingDict) do + Wait(1) + end + TaskPlayAnim(PlayerPedId(),Config.RobbingDict,Config.RobbingAnim ,8.0,8.0,-1,1,0,false,false,false) + TriggerEvent('mhacking:show') + TriggerEvent('mhacking:start',5,30,FinishRobbings) + if chance <= Config.Chance then + TriggerServerEvent('szi_vendingmachine:notifyPolice', street1, street2, pos) + end + else + ESX.ShowHelpNotification(_U('cant_rob'), false, true, 2000) + Wait(2000) + hasStarted = false + startedRobbing = false + end + end) + end + else + OpenVendingMenu() + end +end + +RegisterNetEvent('szi_vendingmachine:startRobbing') +AddEventHandler('szi_vendingmachine:startRobbing', function() + StartRobbing(nil, 'rob') +end) + +RegisterNetEvent('szi_vendingmachine:buy') +AddEventHandler('szi_vendingmachine:buy', function() + OpenVendingMenu() +end) + +RegisterNetEvent('szi_vendingmachine:notifyPolice') +AddEventHandler('szi_vendingmachine:notifyPolice', function(msg) + exports['mythic_notify']:DoHudText('error', msg) +end) + +RegisterNetEvent('szi_vendingmachine:blip') +AddEventHandler('szi_vendingmachine:blip', function(x,y,z) + Blip = AddBlipForCoord(x,y,z) + SetBlipSprite(Blip, 587) + SetBlipColour(Blip, 1) + SetBlipAlpha(Blip, 250) + SetBlipDisplay(Blip, 4) + SetBlipScale(Blip, 1.2) + SetBlipFlashes(Blip, true) + SetBlipAsShortRange(Blip, true) + BeginTextCommandSetBlipName('STRING') + AddTextComponentString('Robbery In Progress | Vending Machine') + EndTextCommandSetBlipName(Blip) + Wait(Config.BlipTimer * 1000) + RemoveBlip(Blip) +end) + +function Cooldown(hasStarted) + local timer = Config.CooldownTime + while hasStarted == true do + Citizen.Wait(1000) + if timer > 0 then + timer = timer -1 + end + + if timer == 1 then + hasStarted = false + startedRobbing = false + break + end + end +end diff --git a/config.lua b/config.lua new file mode 100644 index 0000000..b398f0e --- /dev/null +++ b/config.lua @@ -0,0 +1,81 @@ +Config = {} + +Config.Locale = 'en' + +Config.RequiredItems = { + { + name = 'lockpick', -- Item required to rob the vending machines + quantity = 1 + } +} + + +Config.RemoveItems = { + -- { + -- name = 'lockpick' -- Uncomment these 3 lines to remove the item after robbing the vending machine + -- }--, +} + +Config.Rewards = { + { + name = 'soda', -- Choices are money, bank, black_money or an item name + amount = math.random(1, 10), -- The random amount you take per cycle (MaxTake is how many times it cycles max) + price = 5, + } +} + +Config.VendingMachineModels = { + { + prop = 'prop_vend_coffe_01' + }, + { + prop = 'prop_vend_condom_01' + }, + { + prop = 'prop_vend_fags_01' + }, + { + prop = 'prop_vend_fridge01' + }, + { + prop = 'prop_vend_snak_01' + }, + { + prop = 'prop_vend_soda_02' + }, + { + prop = 'prop_vend_water_01' + }, + { + prop = 'prop_vend_snak_01_tu' + }, + { + prop = 'v_68_broeknvend' + }, + { + prop = 'prop_vend_soda_01' + }, + { + prop = 'ch_chint10_vending_smallroom_01' + } +} + +Config.FivemTarget = true -- set to 'true' if you are using fivem-target or 'false' for bt-target + +Config.PoliceRequired = 1 -- Amount of Police required to rob a vending machine +Config.CooldownTime = 300 -- Cooldown in Seconds before someone can rob a vending machine + +Config.MaxChance = 100 -- Max number the chance can go up to (default 100) +Config.Chance = 15 -- The % Chance of notifying police when a robbery is started (25 = 25%) +Config.MinChance = 1 -- Minimum number the chance can be (Keep at 1 unless you know what you are doing) + +Config.BlipTimer = 45 -- Blip timer until removed in seconds + +Config.MaxTake = 3 -- The amount of times the "Cycle" can happen (links with reward ammount) +Config.RobTime = 10 -- How long it takes to rob the vending machine per cycle in seconds + +Config.RobbingDict = 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@' +Config.RobbingAnim = 'machinic_loop_mechandplayer' + +Config.VendingDict = 'amb@medic@standing@kneel@base' +Config.VendingAnim = 'base' \ No newline at end of file diff --git a/fxmanifest.lua b/fxmanifest.lua new file mode 100644 index 0000000..b6e97e0 --- /dev/null +++ b/fxmanifest.lua @@ -0,0 +1,27 @@ +fx_version 'cerulean' +game 'gta5' + +author 'Sub-Zero Interactive' +description 'This is a script that allows you to rob vending machines using fivem-target or bt-target.' +version '1.0' + +server_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/server.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/client.lua' +} + +dependencies { + 'es_extended', + 'mhacking', + 'mythic_progbar', + 'mythic_notify', +} diff --git a/locales/de.lua b/locales/de.lua new file mode 100644 index 0000000..f48834c --- /dev/null +++ b/locales/de.lua @@ -0,0 +1,7 @@ +Locales['de'] = { + ['cant_hack'] = '~r~Je kunt dit niet beroven', + ['press_stop'] = 'Drücken Sie [DEL] um zu stoppen', + ['max_amount'] = '~r~Maximaler Betrag erreicht', + ['min_police'] = 'Es muss mindestens ~b~%s Polizei~s~ in der Stadt geben, die ausgeraubt werden kann.', + ['no_room'] = '~r~Du kannst die Beute nicht halten', +} \ No newline at end of file diff --git a/locales/en.lua b/locales/en.lua new file mode 100644 index 0000000..5f60aa1 --- /dev/null +++ b/locales/en.lua @@ -0,0 +1,7 @@ +Locales['en'] = { + ['cant_rob'] = '~r~You cant rob this', + ['press_stop'] = 'Press [DEL] to stop', + ['max_amount'] = '~r~Reached max amount', + ['min_police'] = 'There must be at least ~b~%s police~s~ in town to rob.', + ['no_room'] = '~r~You cant hold the loot', +} \ No newline at end of file diff --git a/locales/es.lua b/locales/es.lua new file mode 100644 index 0000000..105f915 --- /dev/null +++ b/locales/es.lua @@ -0,0 +1,7 @@ +Locales['es'] = { + ['cant_hack'] = '~r~No puedes robar esto', + ['press_stop'] = 'Presione [DEL] para detener', + ['max_amount'] = '~r~Cantidad máxima alcanzada', + ['min_police'] = 'Debe haber al menos ~b~%s policía~s~ en la ciudad para robar.', + ['no_room'] = '~r~No puedes retener el botín', +} \ No newline at end of file diff --git a/locales/fi.lua b/locales/fi.lua new file mode 100644 index 0000000..552f4e3 --- /dev/null +++ b/locales/fi.lua @@ -0,0 +1,7 @@ +Locales['fi'] = { + ['cant_hack'] = '~r~Et voi ryöstää tätä', + ['press_stop'] = 'Paina [DEL] lopettaaksesi', + ['max_amount'] = '~r~Saavutettu enimmäismäärä', + ['min_police'] = 'Kaupungissa on oltava vähintään ~b~%s poliisia~s~ ryöstettäväksi.', + ['no_room'] = '~r~Et voi pitää ryöstöä', +} \ No newline at end of file diff --git a/locales/fr.lua b/locales/fr.lua new file mode 100644 index 0000000..523c8ba --- /dev/null +++ b/locales/fr.lua @@ -0,0 +1,7 @@ +Locales['fr'] = { + ['cant_hack'] = '~r~Tu ne peux pas voler ça', + ['press_stop'] = 'Appuyez sur [DEL] pour arrêter', + ['max_amount'] = '~r~Montant maximum atteint', + ['min_police'] = 'Il doit y avoir au moins ~b~%s policiers~s~ en ville pour cambrioler.', + ['no_room'] = '~r~Vous ne pouvez pas tenir le butin', +} \ No newline at end of file diff --git a/locales/pl.lua b/locales/pl.lua new file mode 100644 index 0000000..0f4361c --- /dev/null +++ b/locales/pl.lua @@ -0,0 +1,7 @@ +Locales['pl'] = { + ['cant_rob'] = '~r~Nie możesz tego obrabować', + ['press_stop'] = 'Naciśnij [DEL] aby zatrzymać', + ['max_amount'] = '~r~Osiągnięto maksymalną kwotę', + ['min_police'] = 'Musi być co najmniej ~b~%s policja~s~ w mieście, aby obrabować.', + ['no_room'] = '~r~Nie możesz zatrzymać łupu', +} \ No newline at end of file diff --git a/locales/sv.lua b/locales/sv.lua new file mode 100644 index 0000000..886aae1 --- /dev/null +++ b/locales/sv.lua @@ -0,0 +1,7 @@ +Locales['sv'] = { + ['cant_rob'] = '~r~Du kan inte råna det här', + ['press_stop'] = 'Tryck på [DEL] för att stoppa', + ['max_amount'] = '~r~Uppnått maxbelopp', + ['min_police'] = 'Det måste finnas minst ~b~%s poliser~s~ för att kunna råna.', + ['no_room'] = '~r~Du kan inte hålla bytet', +} \ No newline at end of file diff --git a/locales/tr.lua b/locales/tr.lua new file mode 100644 index 0000000..b374f18 --- /dev/null +++ b/locales/tr.lua @@ -0,0 +1,7 @@ +Locales['tr'] = { + ['cant_rob'] = '~r~bunu çalamazsın', + ['press_stop'] = 'Durdurmak için [DEL] tuşuna basın', + ['max_amount'] = '~r~Maksimum miktara ulaşıldı', + ['min_police'] = 'Kasabada soymak için en az ~b~%s polis~s~ olmalı.', + ['no_room'] = '~r~ganimeti tutamazsın', +} \ No newline at end of file diff --git a/server/server.lua b/server/server.lua new file mode 100644 index 0000000..31b70d9 --- /dev/null +++ b/server/server.lua @@ -0,0 +1,138 @@ +ESX = nil + +TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) + +ESX.RegisterServerCallback('szi_vendingmachine:canRob', function(source, cb, pos) + local xPlayer = ESX.GetPlayerFromId(source) + local xPlayers = ESX.GetPlayers() + local itemcount = 0 + local police = 0 + + for i=1, #xPlayers, 1 do + local xPlayer = ESX.GetPlayerFromId(xPlayers[i]) + if xPlayer.getJob().name == 'police' then + police = police + 1 + end + end + + for k,v in pairs(Config.RequiredItems) do + local item = xPlayer.getInventoryItem(v.name) + if (item) and (item.count >= v.quantity) then + itemcount = itemcount + 1 + end + end + + if (itemcount == #(Config.RequiredItems)) and (police >= Config.PoliceRequired) then + cb(true) + itemcount = 0 + else + cb(false) + itemcount = 0 + if police < Config.PoliceRequired then + TriggerClientEvent('esx:showNotification', source, _U('min_police', Config.PoliceRequired)) + end + end +end) + +RegisterNetEvent("szi_vendingmachine:success") +AddEventHandler('szi_vendingmachine:success', function(pos) + local xPlayer = ESX.GetPlayerFromId(source) + for k,v in pairs(Config.Rewards) do + if (v.name ~= "money") and (v.name ~= "bank") and (v.name ~= "black_money") then + if xPlayer.canCarryItem(v.name, v.amount) then + xPlayer.addInventoryItem(v.name, v.amount) + else + xPlayer.showNotification(_U('no_room')) + end + elseif (v.name == "bank") or (v.name == "black_money") then + xPlayer.addAccountMoney(v.name, v.amount) + elseif (v.name == "money") then + xPlayer.addMoney(v.amount) + end + end +end) + +RegisterNetEvent("szi_vendingmachine:robSuccess") +AddEventHandler('szi_vendingmachine:robSuccess', function(success) + local xPlayer = ESX.GetPlayerFromId(source) + if success then + for k,v in pairs(Config.RemoveItems) do + xPlayer.removeInventoryItem(v.name, 1) + end + end +end) + +RegisterNetEvent('szi_vendingmachine:notifyPolice') +AddEventHandler('szi_vendingmachine:notifyPolice', function(street1, street2, pos) + local xPlayers = ESX.GetPlayers() + local startedRobbing = true + + if startedRobbing == true then + for i=1, #xPlayers, 1 do + local xPlayer = ESX.GetPlayerFromId(xPlayers[i]) + if xPlayer.job.name == 'police' then + TriggerClientEvent('szi_vendingmachine:blip', xPlayers[i], pos.x, pos.y, pos.z) + TriggerClientEvent('szi_vendingmachine:notifyPolice', xPlayers[i], 'Robbery In Progress : Vending Machine | ' .. street1 .. " | " .. street2 .. ' ') + end + end + end +end) + +RegisterServerEvent('szi_vendingmachine:buyItem') +AddEventHandler('szi_vendingmachine:buyItem', function(itemName, price, amount) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.getMoney() >= price and xPlayer.canCarryItem(itemName, amount) then + xPlayer.addInventoryItem(itemName, amount) + xPlayer.removeMoney(price) + elseif xPlayer.getMoney() <= price then + xPlayer.showNotification('you don\'t have enough money!') + else + xPlayer.showNotification('You cannot carry anything else') + end +end) + +Citizen.CreateThread(function() + local vRaw = LoadResourceFile(GetCurrentResourceName(), 'version.json') + if vRaw then + local v = json.decode(vRaw) + PerformHttpRequest('https://raw.githubusercontent.com/Sub-Zero-Interactive/szi_vendingmachine/main/version.json', function(code, res, headers) + if code == 200 then + local rv = json.decode(res) + if rv.version == v.version then + if rv.commit ~= v.commit then + print(([[ +^1---------------------------------------------------------------------- +^1WARNING: YOUR SZI_VENDINGMACHINE IS OUTDATED! +^1COMMIT UPDATE: ^5%s AVAILABLE +^1DOWNLOAD:^5 https://github.com/Sub-Zero-Interactive/szi_vendingmachine +^1CHANGELOG:^5 %s +^1----------------------------------------------------------------------- +^0]]):format(rv.commit, rv.changelog)) + else + print(([[ +^8------------------------------------------------------- +^2Your szi_vendingmachine is the latest version! +^5Version:^0 %s +^5COMMIT:^0 %s +^5CHANGELOG:^0 %s +^8------------------------------------------------------- +^0]]):format( rv.version, rv.commit, rv.changelog)) + end + else + print(([[ +^1---------------------------------------------------------------------- +^1URGENT: YOUR SZI_VENDINGMACHINE IS OUTDATATED!!! +^1COMMIT UPDATE: ^5%s AVAILABLE +^1DOWNLOAD:^5 https://github.com/Sub-Zero-Interactive/szi_vendingmachine +^1CHANGELOG:^5 %s +^1----------------------------------------------------------------------- +^0]]):format(rv.commit, rv.changelog)) + end + else + print('[^1ERROR^0] szi_vendingmachine unable to check version!') + end + end,'GET' + ) + end +end) diff --git a/szi_vendingrobbery.sql b/szi_vendingrobbery.sql new file mode 100644 index 0000000..4f46dc8 --- /dev/null +++ b/szi_vendingrobbery.sql @@ -0,0 +1,6 @@ +USE `es_extended`; + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('lockpick', 'Lockpick', 1), + ('soda', 'Soda', 1) +; diff --git a/version.json b/version.json new file mode 100644 index 0000000..2915cdb --- /dev/null +++ b/version.json @@ -0,0 +1,5 @@ +{ + "version": "main", + "commit" : "1.0", + "changelog": "Initial Release" +}