├── img ├── mining_pan.png ├── mining_stone.png ├── mining_goldbar.png ├── mining_ironbar.png ├── mining_pickaxe.png ├── mining_copperbar.png ├── mining_goldnugget.png ├── mining_ironfragment.png ├── mining_washedstone.png └── mining_copperfragment.png ├── fxmanifest.lua ├── client ├── peds.lua ├── blips.lua └── main.lua ├── README.md ├── config.lua ├── server └── main.lua └── LICENSE /img/mining_pan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trclassic92/tr-mining/HEAD/img/mining_pan.png -------------------------------------------------------------------------------- /img/mining_stone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trclassic92/tr-mining/HEAD/img/mining_stone.png -------------------------------------------------------------------------------- /img/mining_goldbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trclassic92/tr-mining/HEAD/img/mining_goldbar.png -------------------------------------------------------------------------------- /img/mining_ironbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trclassic92/tr-mining/HEAD/img/mining_ironbar.png -------------------------------------------------------------------------------- /img/mining_pickaxe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trclassic92/tr-mining/HEAD/img/mining_pickaxe.png -------------------------------------------------------------------------------- /img/mining_copperbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trclassic92/tr-mining/HEAD/img/mining_copperbar.png -------------------------------------------------------------------------------- /img/mining_goldnugget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trclassic92/tr-mining/HEAD/img/mining_goldnugget.png -------------------------------------------------------------------------------- /img/mining_ironfragment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trclassic92/tr-mining/HEAD/img/mining_ironfragment.png -------------------------------------------------------------------------------- /img/mining_washedstone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trclassic92/tr-mining/HEAD/img/mining_washedstone.png -------------------------------------------------------------------------------- /img/mining_copperfragment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trclassic92/tr-mining/HEAD/img/mining_copperfragment.png -------------------------------------------------------------------------------- /fxmanifest.lua: -------------------------------------------------------------------------------- 1 | fx_version 'cerulean' 2 | game 'gta5' 3 | 4 | author 'TRClassic#0001' 5 | description 'Mining script for QBCore' 6 | version '1.0.1' 7 | 8 | client_script { 9 | '@PolyZone/client.lua', 10 | '@PolyZone/BoxZone.lua', 11 | 'client/*.lua' 12 | } 13 | 14 | server_scripts {'server/*.lua'} 15 | 16 | shared_scripts {'config.lua'} 17 | 18 | dependencies { 19 | 'PolyZone', 20 | 'qb-menu', 21 | 'qb-target' 22 | } 23 | 24 | this_is_a_map 'yes' -------------------------------------------------------------------------------- /client/peds.lua: -------------------------------------------------------------------------------- 1 | local QBCore = exports['qb-core']:GetCoreObject() 2 | local ClassicMiner = MiningLocation.coords 3 | local ClassicPed = MiningJob.Miner 4 | local ClassicMHash = MiningJob.MinerHash 5 | local ClasWashericPed = MiningJob.Washer 6 | local notClasHashsic = MiningJob.WasherHash 7 | local TRonTop = WashLocation.coords 8 | local ClassicSeller = SellLocation.coords 9 | 10 | CreateThread(function() 11 | RequestModel( GetHashKey( ClassicPed ) ) 12 | while ( not HasModelLoaded( GetHashKey( ClassicPed ) ) ) do 13 | Wait(1) 14 | end 15 | RequestModel( GetHashKey( ClasWashericPed ) ) 16 | while ( not HasModelLoaded( GetHashKey( ClasWashericPed ) ) ) do 17 | Wait(1) 18 | end 19 | Miner1 = CreatePed(1, ClassicMHash, ClassicMiner, false, true) 20 | Miner2 = CreatePed(1, notClasHashsic, TRonTop, false, true) 21 | Miner3 = CreatePed(1, ClassicMHash, ClassicSeller, false, true) 22 | SetEntityInvincible(Miner1, true) 23 | SetBlockingOfNonTemporaryEvents(Miner1, true) 24 | FreezeEntityPosition(Miner1, true) 25 | SetEntityInvincible(Miner2, true) 26 | SetBlockingOfNonTemporaryEvents(Miner2, true) 27 | FreezeEntityPosition(Miner2, true) 28 | SetEntityInvincible(Miner3, true) 29 | SetBlockingOfNonTemporaryEvents(Miner3, true) 30 | FreezeEntityPosition(Miner3, true) 31 | end) -------------------------------------------------------------------------------- /client/blips.lua: -------------------------------------------------------------------------------- 1 | local QBCore = exports['qb-core']:GetCoreObject() 2 | 3 | if Config.UseBlips then 4 | CreateThread(function() 5 | MineShaftBlip = AddBlipForCoord(MiningLocation.coords) 6 | SetBlipSprite (MineShaftBlip, MiningLocation.SetBlipSprite) 7 | SetBlipDisplay(MineShaftBlip, MiningLocation.SetBlipDisplay) 8 | SetBlipScale (MineShaftBlip, MiningLocation.SetBlipScale) 9 | SetBlipAsShortRange(MineShaftBlip, true) 10 | SetBlipColour(MineShaftBlip, MiningLocation.SetBlipColour) 11 | BeginTextCommandSetBlipName("STRING") 12 | AddTextComponentSubstringPlayerName(MiningLocation.BlipLabel) 13 | EndTextCommandSetBlipName(MineShaftBlip) 14 | 15 | WashBlip = AddBlipForCoord(WashLocation.coords) 16 | SetBlipSprite (WashBlip, WashLocation.SetBlipSprite) 17 | SetBlipDisplay(WashBlip, WashLocation.SetBlipDisplay) 18 | SetBlipScale (WashBlip, WashLocation.SetBlipScale) 19 | SetBlipAsShortRange(WashBlip, true) 20 | SetBlipColour(WashBlip, WashLocation.SetBlipColour) 21 | BeginTextCommandSetBlipName("STRING") 22 | AddTextComponentSubstringPlayerName(WashLocation.BlipLabel) 23 | EndTextCommandSetBlipName(WashBlip) 24 | 25 | SmeltBlip = AddBlipForCoord(SmeltLocation.coords) 26 | SetBlipSprite (SmeltBlip, SmeltLocation.SetBlipSprite) 27 | SetBlipDisplay(SmeltBlip, SmeltLocation.SetBlipDisplay) 28 | SetBlipScale (SmeltBlip, SmeltLocation.SetBlipScale) 29 | SetBlipAsShortRange(SmeltBlip, true) 30 | SetBlipColour(SmeltBlip, SmeltLocation.SetBlipColour) 31 | BeginTextCommandSetBlipName("STRING") 32 | AddTextComponentSubstringPlayerName(SmeltLocation.BlipLabel) 33 | EndTextCommandSetBlipName(SmeltBlip) 34 | 35 | SellerBlip = AddBlipForCoord(SellLocation.coords) 36 | SetBlipSprite (SellerBlip, SellLocation.SetBlipSprite) 37 | SetBlipDisplay(SellerBlip, SellLocation.SetBlipDisplay) 38 | SetBlipScale (SellerBlip, SellLocation.SetBlipScale) 39 | SetBlipAsShortRange(SellerBlip, true) 40 | SetBlipColour(SellerBlip, SellLocation.SetBlipColour) 41 | BeginTextCommandSetBlipName("STRING") 42 | AddTextComponentSubstringPlayerName(SellLocation.BlipLabel) 43 | EndTextCommandSetBlipName(SellerBlip) 44 | end) 45 | end 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 2 | International License][cc-by-nc-sa]. 3 | 4 | [![CC BY-NC-SA 4.0][cc-by-nc-sa-image]][cc-by-nc-sa] 5 | 6 | [cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/ 7 | [cc-by-nc-sa-image]: https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png 8 | [cc-by-nc-sa-shield]: https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg 9 | 10 | # tr-mining 11 | Mining Script for QBCore 12 | 13 | ## Whats included 14 | - Easy to use config 15 | - 100 x 100 Images 16 | - Turn on and off blips 17 | - 15x Mining Locations 18 | - 3 different mining ore rewards 19 | - DrawtextUi & Target Combined 20 | 21 | ## Dependencies 22 | - [qb-core](https://github.com/qbcore-framework/qb-core) **Lastest Core with DrawtextUI** 23 | - [qb-target](https://github.com/BerkieBb/qb-target) 24 | - [qb-menu](https://github.com/qbcore-framework/qb-menu) 25 | - [PolyZone](https://github.com/mkafrin/PolyZone) 26 | - [nw-mine](https://github.com/Nowimps8/nw_mine) 27 | 28 | ## Installation 29 | 30 | Add the item to your **qb-core/shared/item.lua** 31 | ``` 32 | -- Mining 33 | ['mining_pickaxe'] = {['name'] = 'mining_pickaxe', ['label'] = 'Mining Pickaxe', ['weight'] = 500, ['type'] = 'item', ['image'] = 'mining_pickaxe.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Classic\'s pickaxe for mining'}, 34 | ['mining_pan'] = {['name'] = 'mining_pan', ['label'] = 'Washing Pan', ['weight'] = 500, ['type'] = 'item', ['image'] = 'mining_pan.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Classic\'s washing pan'}, 35 | ['mining_stone'] = {['name'] = 'mining_stone', ['label'] = 'Mined Stone', ['weight'] = 500, ['type'] = 'item', ['image'] = 'mining_stone.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Mined Stone'}, 36 | ['mining_washedstone'] = {['name'] = 'mining_washedstone', ['label'] = 'Washed Stone', ['weight'] = 500, ['type'] = 'item', ['image'] = 'mining_washedstone.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Wasted Stone'}, 37 | ['mining_ironfragment'] = {['name'] = 'mining_ironfragment', ['label'] = 'Iron Fragment', ['weight'] = 500, ['type'] = 'item', ['image'] = 'mining_ironfragment.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Iron fragment from mining'}, 38 | ['mining_ironbar'] = {['name'] = 'mining_ironbar', ['label'] = 'Iron Bar', ['weight'] = 500, ['type'] = 'item', ['image'] = 'mining_ironbar.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Iron Bar'}, 39 | ['mining_goldnugget'] = {['name'] = 'mining_goldnugget', ['label'] = 'Golden Nugget', ['weight'] = 500, ['type'] = 'item', ['image'] = 'mining_goldnugget.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Golden nugget from mining'}, 40 | ['mining_goldbar'] = {['name'] = 'mining_goldbar', ['label'] = 'Gold Bar', ['weight'] = 500, ['type'] = 'item', ['image'] = 'mining_goldbar.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Gold Bar'}, 41 | ['mining_copperfragment'] = {['name'] = 'mining_copperfragment', ['label'] = 'Copper Fragment', ['weight'] = 500, ['type'] = 'item', ['image'] = 'mining_copperfragment.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Copper fragment from mining'}, 42 | ['mining_copperbar'] = {['name'] = 'mining_copperbar', ['label'] = 'Copper Bar', ['weight'] = 500, ['type'] = 'item', ['image'] = 'mining_copperbar.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Copper Bar'}, 43 | 44 | ``` 45 | For images move the images from the img folder to your inventory image folder **qb-inventory/html/images** 46 | 47 | If you use another Drawtext like cd_drawtextui for example change the following in the **client/main.lua 287 - 296** 48 | 49 | **Before** DRAWTEXT 50 | ``` 51 | exports['qb-core']:DrawText(Config.Text['MiningAlert'], 'left') 52 | 53 | exports['qb-core']:DrawText(Config.Text['StartMining'],'left') 54 | ``` 55 | 56 | **After** 57 | ``` 58 | TriggerEvent('cd_drawtextui:ShowUI', 'show', Config.Text['MiningAlert']) 59 | 60 | TriggerEvent('cd_drawtextui:ShowUI', 'show', Config.Text['StartMining']) 61 | ``` 62 | 63 | **Before** HIDETEXT 64 | ``` 65 | exports['qb-core']:HideText() 66 | ``` 67 | 68 | **After** 69 | ``` 70 | TriggerEvent('cd_drawtextui:HideUI') 71 | ``` 72 | 73 | **You will also need to remove this line if you are using CD_Drawtextui** 74 | **Line 160** 75 | ``` 76 | exports['qb-core']:KeyPressed() 77 | ``` 78 | 79 | ## **Drawtext Ui Files will be provided if you don't have it installed in your core** 80 | - [QBCore_Drawtext](https://github.com/trclassic92/QBCore_Drawtext) **Only add if you dont have the lastest core update** 81 | 82 | 83 | ## Preview Pictures 84 | - [Youtube Video](https://youtu.be/9VXjTrUdjfc) 85 | ![Preview Screenshot](https://i.imgur.com/jIJ9SOU.png) 86 | ![Preview Screenshot](https://i.imgur.com/mu0gNQC.jpeg) 87 | ![Preview Screenshot](https://i.imgur.com/7gKe9wE.jpeg) 88 | ![Preview Screenshot](https://i.imgur.com/cGaTg3V.jpeg) 89 | ![Preview Screenshot](https://i.imgur.com/my22yZL.jpeg) 90 | ![Preview Screenshot](https://i.imgur.com/fUQ61Bl.jpeg) 91 | ![Preview Screenshot](https://i.imgur.com/S382wMf.jpeg) 92 | ![Preview Screenshot](https://i.imgur.com/VJCk6cx.jpeg) 93 | 94 | ## Discord 95 | - [Join Discord](https://discord.gg/T2xX5WwmEX) 96 | 97 | ## Support The Script 98 | - [Ko-fi Link](https://ko-fi.com/trclassic) 99 | -------------------------------------------------------------------------------- /config.lua: -------------------------------------------------------------------------------- 1 | Config = Config or {} 2 | 3 | Config.UseBlips = true -- True / false option for toggling farm blips 4 | Config.Timeout = 20 * (60 * 1000) -- 20 minutes 5 | 6 | --Blips Config 7 | MiningLocation = { 8 | targetZone = vector3(-600.57, 2092.49, 130.33), -- qb-target vector 9 | targetHeading = 273.47, -- qb-target box zone 10 | coords = vector4(-600.57, 2092.49, 130.33, 339.52), -- Move Location (Ped and blip) 11 | SetBlipSprite = 414, -- Blip Icon (https://docs.fivem.net/docs/game-references/blips/) 12 | SetBlipDisplay = 6, -- Blip Behavior (https://docs.fivem.net/natives/?_0x9029B2F3DA924928) 13 | SetBlipScale = 0.85, -- Blip Size 14 | SetBlipColour = 21, -- Blip Color 15 | BlipLabel = "Mine Shaft", -- Blip Label 16 | minZ = 129.42, -- Max Z 17 | maxZ = 132.42, -- Max Z 18 | } 19 | WashLocation = { 20 | targetZone = vector3(77.17, 3150.86, 28.79), 21 | targetHeading = 80.46, 22 | coords = vector4(77.17, 3150.86, 28.79, 80.46), 23 | SetBlipSprite = 162, 24 | SetBlipDisplay = 6, 25 | SetBlipScale = 0.85, 26 | SetBlipColour = 26, 27 | BlipLabel = "Mine Washing Location", 28 | minZ = 27, 29 | maxZ = 31, 30 | } 31 | SmeltLocation = { 32 | coords = vector4(1090.11, -1991.51, 32.27, 56.22), 33 | SetBlipSprite = 162, 34 | SetBlipDisplay = 6, 35 | SetBlipScale = 0.85, 36 | SetBlipColour = 36, 37 | BlipLabel = "Smelt Factory", 38 | } 39 | SellLocation = { 40 | targetZone = vector3(579.11, -2804.96, 5.06), 41 | targetHeading = 242.63, 42 | coords = vector4(579.11, -2804.96, 5.06, 242.63), 43 | SetBlipSprite = 431, 44 | SetBlipDisplay = 6, 45 | SetBlipScale = 0.85, 46 | SetBlipColour = 28, 47 | BlipLabel = "Material Seller", 48 | minZ = 3, 49 | maxZ = 7, 50 | } 51 | --Job Config 52 | MiningJob = { 53 | Miner = "s_m_y_construct_02", -- Ped model https://wiki.rage.mp/index.php?title=Peds 54 | MinerHash = 0xC5FEFADE, -- Hash numbers for ped model 55 | 56 | Washer = "ig_cletus", 57 | WasherHash = 0xE6631195, 58 | 59 | MiningTimer = 20 * 1000, -- 20 second timer 60 | WashingTimer = 15 * 1000, -- 15 second timer 61 | IronTimer = 25 * 1000, -- 25 seconds 62 | CopperTimer = 30 * 1000, -- 30 seconds 63 | GoldTimer = 35 * 1000, -- 35 seconds 64 | 65 | PickAxePrice = 75, -- PickAxe Price ($75) 66 | WashPanPrice = 5, -- Washing Pan Price ($5) 67 | 68 | StoneMin = 3, -- Min amount from mining 69 | StoneMax = 6, -- Max amount from mining 70 | 71 | -- Washing Min And Max 72 | IronFragMin = 3, 73 | IronFragMax = 6, 74 | GoldNugMin = 1, 75 | GoldNugMax = 3, 76 | CopperFragMin = 4, 77 | CopperFragMax = 7, 78 | 79 | -- Smelting Min and Max 80 | SmeltIronMin = 7, 81 | SmeltIronMax = 10, 82 | SmeltCopperMin = 4, 83 | SmeltCooperMax = 7, 84 | SmeltGoldMin = 7, 85 | SmeltGoldMax = 10, 86 | 87 | -- Bars Received 88 | IronBarsMin = 1, 89 | IronBarsMax = 2, 90 | CopperBarsMin = 1, 91 | CopperBarsMax = 2, 92 | GoldBarsMin = 1, 93 | GoldBarsMax = 2, 94 | } 95 | 96 | 97 | vector4(77.17, 3150.86, 29.79, 80.46) 98 | Config.MiningLocation = { 99 | [1] = { 100 | ["coords"] = vector3(-590.57, 2073.85, 131.3), 101 | ["isMined"] = false, 102 | ["isOccupied"] = false, 103 | }, 104 | [2] = { 105 | ["coords"] = vector3(-591.0, 2063.64, 130.08), 106 | ["isMined"] = false, 107 | ["isOccupied"] = false, 108 | }, 109 | [3] = { 110 | ["coords"] = vector3(-587.13, 2054.63, 130.33), 111 | ["isMined"] = false, 112 | ["isOccupied"] = false, 113 | }, 114 | [4] = { 115 | ["coords"] = vector3(-587.07, 2043.96, 129.63), 116 | ["isMined"] = false, 117 | ["isOccupied"] = false, 118 | }, 119 | [5] = { 120 | ["coords"] = vector3(-577.74, 2032.72, 128.58), 121 | ["isMined"] = false, 122 | ["isOccupied"] = false, 123 | }, 124 | [6] = { 125 | ["coords"] = vector3(-573.13, 2023.77, 127.85), 126 | ["isMined"] = false, 127 | ["isOccupied"] = false, 128 | }, 129 | [7] = { 130 | ["coords"] = vector3(-565.44, 2015.6, 127.49), 131 | ["isMined"] = false, 132 | ["isOccupied"] = false, 133 | }, 134 | [8] = { 135 | ["coords"] = vector3(-554.67, 1999.82, 127.26), 136 | ["isMined"] = false, 137 | ["isOccupied"] = false, 138 | }, 139 | [9] = { 140 | ["coords"] = vector3(-549.8, 1996.89, 127.06), 141 | ["isMined"] = false, 142 | ["isOccupied"] = false, 143 | }, 144 | [10] = { 145 | ["coords"] = vector3(-544.97, 1988.73, 127.0), 146 | ["isMined"] = false, 147 | ["isOccupied"] = false, 148 | }, 149 | [11] = { 150 | ["coords"] = vector3(-532.22, 1979.47, 126.99), 151 | ["isMined"] = false, 152 | ["isOccupied"] = false, 153 | }, 154 | [12] = { 155 | ["coords"] = vector3(-517.84, 1980.41, 126.47), 156 | ["isMined"] = false, 157 | ["isOccupied"] = false, 158 | }, 159 | [13] = { 160 | ["coords"] = vector3(-541.67, 1974.28, 126.98), 161 | ["isMined"] = false, 162 | ["isOccupied"] = false, 163 | }, 164 | [14] = { 165 | ["coords"] = vector3(-542.82, 1961.31, 126.82), 166 | ["isMined"] = false, 167 | ["isOccupied"] = false, 168 | }, 169 | [15] = { 170 | ["coords"] = vector3(-538.38, 1951.48, 126.19), 171 | ["isMined"] = false, 172 | ["isOccupied"] = false, 173 | }, 174 | } 175 | 176 | Config.Sell = { 177 | ["mining_washedstone"] = { 178 | ["price"] = math.random(5, 10) -- Seller Price 179 | }, 180 | ["mining_stone"] = { 181 | ["price"] = 2 182 | }, 183 | ["mining_ironfragment"] = { 184 | ["price"] = math.random(35, 45) 185 | }, 186 | ["mining_ironbar"] = { 187 | ["price"] = math.random(75, 90) 188 | }, 189 | ["mining_goldnugget"] = { 190 | ["price"] = math.random(75, 80) 191 | }, 192 | ["mining_goldbar"] = { 193 | ["price"] = math.random(110, 125) 194 | }, 195 | ["mining_copperfragment"] = { 196 | ["price"] = math.random(25, 35) 197 | }, 198 | ["mining_copperbar"] = { 199 | ["price"] = math.random(50, 65) 200 | }, 201 | } 202 | 203 | --- Config Alerts 204 | Config.Text = { 205 | ['itemamount'] = 'You are trying to process a amount that is invalid try again!', 206 | 207 | ['MenuHeading'] = 'Miner Boss', 208 | ['MenuPickAxe'] = 'Buy a pickaxe', 209 | ['PickAxeText'] = 'This item is used for mining Price $'..MiningJob.PickAxePrice, 210 | 211 | ["MenuTarget"] = 'Talk to miner boss', 212 | ["goback"] = '<- Go Back!', 213 | 214 | ['WashHeading'] = 'Pan Seller', 215 | ['MenuWashPan'] = 'Buy a pan', 216 | ['PanText'] = 'This item is used for washing stones Price $' ..MiningJob.WashPanPrice, 217 | ['Menu_pTarget'] = 'Talk to pan handler', 218 | 219 | ['SmethHeading'] = 'Smelt Options', 220 | ['Semlt_Iron'] = 'Smelt Iron Fragments', 221 | ['smelt_IText'] = 'Smelt Fragments into Iron Bars', 222 | ['Semlt_Copper'] = 'Smelt Copper Fragments', 223 | ['smelt_CText'] = 'Smelt Fragments into Copper Bars', 224 | ['Smelt_Gold'] = 'Smelt Gold Nuggets', 225 | ['smelt_GText'] = 'Smelt Nuggets into golden bars', 226 | 227 | ['Pickaxe_Bought'] = 'You have bought a pickaxe for $' ..MiningJob.PickAxePrice.. ' ... Good luck!', 228 | ['Pickaxe_Check'] = 'It looks like you already have a pickaxe', 229 | ['MiningAlert'] = 'My eye just caught something shiny', 230 | ['StartMining'] = '[E] Start Mining', 231 | 232 | ['error_mining'] = 'You dont have a pickaxe to start mining', 233 | ['Pan_Bought'] = 'You have bought a pan for $' ..MiningJob.WashPanPrice, 234 | ['Pan_check'] = 'You already have a pan', 235 | ['error_pan'] = 'You don\'t have a pan to do this', 236 | 237 | ['Mining_ProgressBar'] = 'Mining For ores', 238 | 239 | ['Washing_Target'] = 'Wash Stones', 240 | 241 | ['error_minerstone'] = 'You do not have any stones to wash', 242 | ['error_washpan'] = 'You need a washing pan to do this!', 243 | 244 | ['Washing_Rocks'] = 'Washing Stones', 245 | 246 | ['Smeth_Rocks'] = 'Smelt Rocks', 247 | 248 | ['smelt_iron'] = 'Smelting Iron Fragments', 249 | ['smelt_copper'] = 'Smelting Copper Fragments', 250 | ['smelt_gold'] = 'Smelting Gold Nuggets', 251 | 252 | ['cancel'] = 'You Cancelled the process', 253 | 254 | ['error_ironCheck'] = 'You don\'t have any Iron fragments to smelt', 255 | ['error_goldCheck'] = 'You don\'t have any Gold Nuggets to smelt', 256 | ['error_copperCheck'] = 'You don\'t have any Copper fragments to smelt', 257 | 258 | ['ironSmelted'] = 'You have smelted ', 259 | ['ironSmeltedMiddle'] = ' Amount of Iron Fragments for ', 260 | ['ironSmeltedEnd'] = ' Iron Bars', 261 | 262 | ['CopperSmelted'] = 'You have smelted ', 263 | ['CopperSmeltedMiddle'] = ' Amount of Copper Fragments for ', 264 | ['CopperSmeltedEnd'] = ' Copper Bars', 265 | 266 | ['GoldSmelted'] = 'You have smelted ', 267 | ['GoldSmeltedMiddle'] = ' Amount of Gold Nugget for ', 268 | ['GoldSmeltedEnd'] = ' Gold Bars', 269 | 270 | ['error_alreadymined'] = 'This has already been mined', 271 | 272 | ['Seller'] = 'Talk to buyer', 273 | ['successfully_sold'] = 'The buyer has bought the marterials', 274 | 275 | } 276 | 277 | -------------------------------------------------------------------------------- /server/main.lua: -------------------------------------------------------------------------------- 1 | local QBCore = exports['qb-core']:GetCoreObject() 2 | local mining = false 3 | 4 | MiningMaterial = { 5 | {'mining_washedstone', 1}, -- Common 6 | {'mining_copperfragment', math.random(MiningJob.CopperFragMin, MiningJob.CopperFragMax)}, -- Common 7 | {'mining_ironfragment', math.random(MiningJob.IronFragMin, MiningJob.IronFragMax)}, -- Semi-Rare 8 | {'mining_goldnugget', math.random(MiningJob.GoldNugMin, MiningJob.GoldNugMax)}, -- Rare 9 | } 10 | 11 | RegisterNetEvent('tr-mining:Seller', function() 12 | local source = source 13 | local price = 0 14 | local Player = QBCore.Functions.GetPlayer(source) 15 | if Player.PlayerData.items ~= nil and next(Player.PlayerData.items) ~= nil then 16 | for k, v in pairs(Player.PlayerData.items) do 17 | if Player.PlayerData.items[k] ~= nil then 18 | if Config.Sell[Player.PlayerData.items[k].name] ~= nil then 19 | price = price + (Config.Sell[Player.PlayerData.items[k].name].price * Player.PlayerData.items[k].amount) 20 | Player.Functions.RemoveItem(Player.PlayerData.items[k].name, Player.PlayerData.items[k].amount, k) 21 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items[Player.PlayerData.items[k].name], "remove") 22 | end 23 | end 24 | end 25 | Player.Functions.AddMoney("cash", price) 26 | TriggerClientEvent('QBCore:Notify', source, Config.Text["successfully_sold"]) 27 | end 28 | end) 29 | 30 | RegisterNetEvent('tr-mining:BuyPickaxe', function() 31 | local source = source 32 | local Player = QBCore.Functions.GetPlayer(tonumber(source)) 33 | local TRClassicPickaxe = MiningJob.PickAxePrice 34 | local pickaxe = Player.Functions.GetItemByName('mining_pickaxe') 35 | if not pickaxe then 36 | Player.Functions.AddItem('mining_pickaxe', 1) 37 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['mining_pickaxe'], "add") 38 | Player.Functions.RemoveMoney("cash", TRClassicPickaxe) 39 | TriggerClientEvent('QBCore:Notify', source, Config.Text["Pickaxe_Bought"]) 40 | elseif pickaxe then 41 | TriggerClientEvent('QBCore:Notify', source, Config.Text["Pickaxe_Check"], 'error') 42 | end 43 | end) 44 | 45 | QBCore.Functions.CreateCallback('tr-mining:pickaxe', function(source, cb) 46 | local Player = QBCore.Functions.GetPlayer(source) 47 | if Player ~= nil then 48 | if Player.Functions.GetItemByName("mining_pickaxe") ~= nil then 49 | cb(true) 50 | else 51 | cb(false) 52 | end 53 | end 54 | end) 55 | 56 | RegisterNetEvent('tr-mining:BuyWash', function() 57 | local source = source 58 | local Player = QBCore.Functions.GetPlayer(tonumber(source)) 59 | local TRClassicPan = MiningJob.WashPanPrice 60 | local pan = Player.Functions.GetItemByName('mining_pan') 61 | if not pan then 62 | Player.Functions.AddItem('mining_pan', 1) 63 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['mining_pan'], "add") 64 | Player.Functions.RemoveMoney("cash", TRClassicPan) 65 | TriggerClientEvent('QBCore:Notify', source, Config.Text["Pan_Bought"]) 66 | elseif pan then 67 | TriggerClientEvent('QBCore:Notify', source, Config.Text["Pan_check"], 'error') 68 | end 69 | end) 70 | 71 | QBCore.Functions.CreateCallback('tr-mining:washpan', function(source, cb) 72 | local Player = QBCore.Functions.GetPlayer(source) 73 | if Player ~= nil then 74 | if Player.Functions.GetItemByName("mining_pan") ~= nil then 75 | cb(true) 76 | else 77 | cb(false) 78 | end 79 | end 80 | end) 81 | 82 | RegisterServerEvent('tr-mining:receivedStone', function() 83 | local source = source 84 | local Player = QBCore.Functions.GetPlayer(tonumber(source)) 85 | local mineStone = math.random(MiningJob.StoneMin, MiningJob.StoneMax) 86 | Player.Functions.AddItem('mining_stone', mineStone) 87 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['mining_stone'], "add") 88 | end) 89 | 90 | RegisterNetEvent('tr-mining:receivedReward', function() 91 | local source = source 92 | local Player = QBCore.Functions.GetPlayer(tonumber(source)) 93 | local minerstone = Player.Functions.GetItemByName('mining_stone') 94 | local ChanceItem = MiningMaterial[math.random(1, #MiningMaterial)] 95 | if not minerstone then 96 | TriggerClientEvent('QBCore:Notify', source, Config.Text['error_minerstone']) 97 | end 98 | local amount = minerstone.amount 99 | if amount >= 1 then 100 | amount = 1 101 | else 102 | return false 103 | end 104 | if not Player.Functions.RemoveItem('mining_stone', amount) then 105 | TriggerClientEvent('QBCore:Notify', source, Config.Text['error_minerstone']) 106 | end 107 | TriggerClientEvent('invenotry:client:ItemBox', source, QBCore.Shared.Items['error_minerstone'], "remove") 108 | Wait(1000) 109 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items[ChanceItem[1]], "add") 110 | Player.Functions.AddItem(ChanceItem[1], ChanceItem[2] ) 111 | 112 | end) 113 | 114 | RegisterNetEvent('tr-mining:setMiningStage', function(stage, state, k) 115 | Config.MiningLocation[k][stage] = state 116 | TriggerClientEvent('tr-mining:getMiningstage', -1, stage, state, k) 117 | end) 118 | 119 | QBCore.Functions.CreateCallback('tr-mining:stonesbruf', function(source, cb) 120 | local Player = QBCore.Functions.GetPlayer(source) 121 | if Player ~= nil then 122 | if Player.Functions.GetItemByName("mining_stone") ~= nil then 123 | cb(true) 124 | else 125 | cb(false) 126 | end 127 | end 128 | end) 129 | 130 | 131 | RegisterNetEvent('tr-mining:setMiningTimer', function() 132 | if not mining then 133 | mining = true 134 | CreateThread(function() 135 | Wait(Config.Timeout) 136 | for k, v in pairs(Config.MiningLocation) do 137 | Config.MiningLocation[k]["isMined"] = false 138 | TriggerClientEvent('tr-mining:getMiningstage', -1, 'isMined', false, k) 139 | end 140 | mining = false 141 | end) 142 | end 143 | end) 144 | 145 | RegisterServerEvent('tr-mining:IronBar', function() 146 | local source = source 147 | local Player = QBCore.Functions.GetPlayer(tonumber(source)) 148 | local TRIronCheck = Player.Functions.GetItemByName('mining_ironfragment') 149 | local IronSmeltAmount = math.random(MiningJob.SmeltIronMin, MiningJob.SmeltIronMax) 150 | local IronBarsReceived = math.random(MiningJob.IronBarsMin, MiningJob.IronBarsMax) 151 | if not TRIronCheck then 152 | TriggerClientEvent('QBCore:Notify', source, Config.Text['error_ironCheck']) 153 | return false 154 | end 155 | 156 | local amount = TRIronCheck.amount 157 | if amount >= 1 then 158 | amount = IronSmeltAmount 159 | else 160 | return false 161 | end 162 | 163 | if not Player.Functions.RemoveItem('mining_ironfragment', amount) then 164 | TriggerClientEvent('QBCore:Notify', source, Config.Text['itemamount']) 165 | return false 166 | end 167 | 168 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['mining_ironfragment'], "remove") 169 | TriggerClientEvent('QBCore:Notify', source, Config.Text["ironSmelted"] ..IronSmeltAmount.. Config.Text["ironSmeltedMiddle"] ..IronBarsReceived.. Config.Text["ironSmeltedEnd"]) 170 | Wait(750) 171 | Player.Functions.AddItem('mining_ironbar', IronBarsReceived) 172 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['mining_ironbar'], "add") 173 | end) 174 | 175 | QBCore.Functions.CreateCallback('tr-mining:IronCheck', function(source, cb) 176 | local Player = QBCore.Functions.GetPlayer(source) 177 | if Player ~= nil then 178 | if Player.Functions.GetItemByName("mining_ironfragment") ~= nil then 179 | cb(true) 180 | else 181 | cb(false) 182 | end 183 | end 184 | end) 185 | 186 | RegisterServerEvent('tr-mining:CopperBar', function() 187 | local source = source 188 | local Player = QBCore.Functions.GetPlayer(tonumber(source)) 189 | local TRCopperBars = Player.Functions.GetItemByName('mining_copperfragment') 190 | local CopperSmeltAmount = math.random(MiningJob.SmeltCopperMin, MiningJob.SmeltCopperMin) 191 | local CopperBarsReceived = math.random(MiningJob.CopperBarsMin, MiningJob.CopperBarsMax) 192 | if not TRCopperBars then 193 | TriggerClientEvent('QBCore:Notify', source, Config.Text['error_copperCheck']) 194 | return false 195 | end 196 | 197 | local amount = TRCopperBars.amount 198 | if amount >= 1 then 199 | amount = CopperSmeltAmount 200 | else 201 | return false 202 | end 203 | 204 | if not Player.Functions.RemoveItem('mining_copperfragment', amount) then 205 | TriggerClientEvent('QBCore:Notify', source, Config.Text['itemamount']) 206 | return false 207 | end 208 | 209 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['mining_copperfragment'], "remove") 210 | TriggerClientEvent('QBCore:Notify', source, Config.Text["CopperSmelted"] ..CopperSmeltAmount.. Config.Text["CopperSmeltedMiddle"] ..CopperBarsReceived.. Config.Text["CopperSmeltedEnd"]) 211 | Wait(750) 212 | Player.Functions.AddItem('mining_copperbar', CopperBarsReceived) 213 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['mining_copperbar'], "add") 214 | end) 215 | 216 | RegisterServerEvent('tr-mining:GoldBar', function() 217 | local source = source 218 | local Player = QBCore.Functions.GetPlayer(tonumber(source)) 219 | local TRGoldenTicket = Player.Functions.GetItemByName('mining_goldnugget') 220 | local GoldSmeltAmount = math.random(MiningJob.SmeltGoldMin, MiningJob.SmeltGoldMax) 221 | local GoldBarRecevied = math.random(MiningJob.GoldBarsMin, MiningJob.GoldBarsMax) 222 | if not TRGoldenTicket then 223 | TriggerClientEvent('QBCore:Notify', source, Config.Text['error_copperCheck']) 224 | return false 225 | end 226 | 227 | local amount = TRGoldenTicket.amount 228 | if amount >= 1 then 229 | amount = GoldSmeltAmount 230 | else 231 | return false 232 | end 233 | 234 | if not Player.Functions.RemoveItem('mining_goldnugget', amount) then 235 | TriggerClientEvent('QBCore:Notify', source, Config.Text['itemamount']) 236 | return false 237 | end 238 | 239 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['mining_goldnugget'], "remove") 240 | TriggerClientEvent('QBCore:Notify', source, Config.Text["GoldSmelted"] ..GoldSmeltAmount.. Config.Text["GoldSmeltedMiddle"] ..GoldBarRecevied.. Config.Text["GoldSmeltedEnd"]) 241 | Wait(750) 242 | Player.Functions.AddItem('mining_goldbar', GoldBarRecevied) 243 | TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['mining_goldbar'], "add") 244 | end) 245 | 246 | QBCore.Functions.CreateCallback('tr-mining:IronCheck', function(source, cb) 247 | local Player = QBCore.Functions.GetPlayer(source) 248 | if Player ~= nil then 249 | if Player.Functions.GetItemByName("mining_ironfragment") ~= nil then 250 | cb(true) 251 | else 252 | cb(false) 253 | end 254 | end 255 | end) 256 | 257 | QBCore.Functions.CreateCallback('tr-mining:GoldCheck', function(source, cb) 258 | local Player = QBCore.Functions.GetPlayer(source) 259 | if Player ~= nil then 260 | if Player.Functions.GetItemByName("mining_goldnugget") ~= nil then 261 | cb(true) 262 | else 263 | cb(false) 264 | end 265 | end 266 | end) 267 | QBCore.Functions.CreateCallback('tr-mining:CopperCheck', function(source, cb) 268 | local Player = QBCore.Functions.GetPlayer(source) 269 | if Player ~= nil then 270 | if Player.Functions.GetItemByName("mining_copperfragment") ~= nil then 271 | cb(true) 272 | else 273 | cb(false) 274 | end 275 | end 276 | end) 277 | 278 | AddEventHandler('onResourceStart', function(resourceName) 279 | if (GetCurrentResourceName() ~= resourceName) then 280 | return 281 | end 282 | print("^0\n ------------------------------------------------------------------------------------------------------------------------------\n ^1\n ████████╗██████╗ ███╗ ███╗██╗███╗ ██╗██╗███╗ ██╗ ██████╗ \t \n ╚══██╔══╝██╔══██╗ ████╗ ████║██║████╗ ██║██║████╗ ██║██╔════╝ \t \n ██║ ██████╔╝█████╗██╔████╔██║██║██╔██╗ ██║██║██╔██╗ ██║██║ ███╗\t \n ██║ ██╔══██╗╚════╝██║╚██╔╝██║██║██║╚██╗██║██║██║╚██╗██║██║ ██║ \t \n ██║ ██║ ██║ ██║ ╚═╝ ██║██║██║ ╚████║██║██║ ╚████║╚██████╔╝\t \n ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═══╝ ╚═════╝ \t \n \n \n ^1Discord ^5 --> ^0https://discord.gg/vTCUWCnQSD ^1Author^5: ^0TRClassic#0001 \n \n------------------------------------------------------------------------------------------------------------------------------ \n ") 283 | end) 284 | -------------------------------------------------------------------------------- /client/main.lua: -------------------------------------------------------------------------------- 1 | local QBCore = exports['qb-core']:GetCoreObject() 2 | local miningZone = false 3 | local isMining = false 4 | 5 | RegisterNetEvent('tr-mining:getMiningstage', function(stage, state, k) 6 | Config.MiningLocation[k][stage] = state 7 | end) 8 | 9 | local function loadAnimDict(dict) 10 | while (not HasAnimDictLoaded(dict)) do 11 | RequestAnimDict(dict) 12 | Wait(3) 13 | end 14 | end 15 | 16 | local function StartMining(mining) 17 | local animDict = "melee@hatchet@streamed_core" 18 | local animName = "plyr_rear_takedown_b" 19 | local trClassic = PlayerPedId() 20 | local miningtimer = MiningJob.MiningTimer 21 | isMining = true 22 | TriggerEvent('tr-mining:miningwithaxe') 23 | FreezeEntityPosition(trClassic, true) 24 | QBCore.Functions.Progressbar("Mining....", Config.Text['Mining_ProgressBar'], miningtimer, false, true, { 25 | disableMovement = true, 26 | disableCarMovement = true, 27 | disableMouse = false, 28 | disableCombat = true, 29 | }, {}, {}, {}, function() 30 | TriggerServerEvent('tr-mining:setMiningStage', "isMined", true, mining) 31 | TriggerServerEvent('tr-mining:setMiningStage', "isOccupied", false, mining) 32 | TriggerServerEvent('tr-mining:receivedStone') 33 | TriggerServerEvent('tr-mining:setMiningTimer') 34 | isMining = false 35 | TaskPlayAnim(trClassic, animDict, "exit", 3.0, 3.0, -1, 2, 0, 0, 0, 0) 36 | DetachEntity(pickaxeprop, 1, true) 37 | DeleteEntity(pickaxeprop) 38 | DeleteObject(pickaxeprop) 39 | FreezeEntityPosition(trClassic, false) 40 | end, function() 41 | ClearPedTasks(trClassic) 42 | TriggerServerEvent('tr-mining:setMiningStage', "isOccupied", false, mining) 43 | isMining = false 44 | TaskPlayAnim(trClassic, animDict, "exit", 3.0, 3.0, -1, 2, 0, 0, 0, 0) 45 | FreezeEntityPosition(trClassic, false) 46 | DetachEntity(pickaxeprop, 1, true) 47 | DeleteEntity(pickaxeprop) 48 | DeleteObject(pickaxeprop) 49 | end) 50 | TriggerServerEvent('tr-mining:setMiningStage', "isOccupied", true, mining) 51 | CreateThread(function() 52 | while isMining do 53 | loadAnimDict(animDict) 54 | TaskPlayAnim(trClassic, animDict, animName, 3.0, 3.0, -1, 2, 0, 0, 0, 0 ) 55 | Wait(3000) 56 | end 57 | end) 58 | end 59 | 60 | RegisterNetEvent('tr-mining:miningwithaxe', function() 61 | local ped = PlayerPedId() 62 | trpickaxeprop = CreateObject(GetHashKey("prop_tool_pickaxe"), 0, 0, 0, true, true, true) 63 | AttachEntityToEntity(trpickaxeprop, ped, GetPedBoneIndex(ped, 57005), 0.17, -0.04, -0.04, 180, 100.00, 120.0, true, true, false, true, 1, true) 64 | Wait(MiningJob.MiningTimer) 65 | DetachEntity(trpickaxeprop, 1, true) 66 | DeleteEntity(trpickaxeprop) 67 | DeleteObject(trpickaxeprop) 68 | end) 69 | 70 | RegisterNetEvent('tr-mining:getpickaxe', function() 71 | TriggerServerEvent('tr-mining:BuyPickaxe') 72 | end) 73 | 74 | RegisterNetEvent('tr-mining:getPan', function() 75 | TriggerServerEvent('tr-mining:BuyWash') 76 | end) 77 | 78 | RegisterNetEvent('tr-mining:minermenu', function() 79 | local minermenu = { 80 | { 81 | header = Config.Text["MenuHeading"], 82 | isMenuHeader = true, 83 | }, 84 | { 85 | header = Config.Text["MenuPickAxe"], 86 | txt = Config.Text["PickAxeText"], 87 | params = { 88 | event = 'tr-mining:getpickaxe', 89 | } 90 | }, 91 | { 92 | header = Config.Text["goback"], 93 | }, 94 | } 95 | exports['qb-menu']:openMenu(minermenu) 96 | end) 97 | 98 | RegisterNetEvent('tr-mining:panmenu', function() 99 | local panmenu = { 100 | { 101 | header = Config.Text["WashHeading"], 102 | isMenuHeader = true, 103 | }, 104 | { 105 | header = Config.Text["MenuWashPan"], 106 | txt = Config.Text["PanText"], 107 | params = { 108 | event = 'tr-mining:getPan', 109 | } 110 | }, 111 | { 112 | header = Config.Text["goback"], 113 | }, 114 | } 115 | exports['qb-menu']:openMenu(panmenu) 116 | end) 117 | 118 | RegisterNetEvent('tr-mining:smeltmenu', function() 119 | local smeltMenu = { 120 | { 121 | header = Config.Text["SmethHeading"], 122 | isMenuHeader = true, 123 | }, 124 | { 125 | header = Config.Text["Semlt_Iron"], 126 | txt = Config.Text["smelt_IText"], 127 | params = { 128 | event = 'tr-mining:SmeltIron', 129 | } 130 | }, 131 | { 132 | header = Config.Text["Semlt_Copper"], 133 | txt = Config.Text["smelt_CText"], 134 | params = { 135 | event = 'tr-mining:SmeltCopper', 136 | } 137 | }, 138 | { 139 | header = Config.Text["Smelt_Gold"], 140 | txt = Config.Text["smelt_GText"], 141 | params = { 142 | event = 'tr-mining:SmeltGold', 143 | } 144 | }, 145 | { 146 | header = Config.Text["goback"], 147 | }, 148 | } 149 | exports['qb-menu']:openMenu(smeltMenu) 150 | end) 151 | 152 | local listen = false 153 | local function MiningKeyBind(mining) 154 | listen = true 155 | CreateThread(function() 156 | while listen do 157 | if IsControlJustPressed(0, 38) then 158 | listen = false 159 | if not Config.MiningLocation[mining]["isMined"] and not Config.MiningLocation[mining]["isOccupied"] then 160 | exports['qb-core']:KeyPressed() 161 | QBCore.Functions.TriggerCallback('tr-mining:pickaxe', function(PickAxe) 162 | if PickAxe then 163 | StartMining(mining) 164 | elseif not PickAxe then 165 | QBCore.Functions.Notify(Config.Text['error_mining'], 'error') 166 | end 167 | end) 168 | else 169 | exports['qb-core']:DrawText(Config.Text['error_alreadymined'], 'left') 170 | end 171 | end 172 | Wait(0) 173 | end 174 | end) 175 | end 176 | 177 | RegisterNetEvent('tr-mining:washingrocks', function() 178 | QBCore.Functions.TriggerCallback('tr-mining:washpan', function(washingpancheck) 179 | if washingpancheck then 180 | QBCore.Functions.TriggerCallback('tr-mining:stonesbruf', function(stonesbruf) 181 | if stonesbruf then 182 | local playerPed = PlayerPedId() 183 | local coords = GetEntityCoords(playerPed) 184 | local rockwash = MiningJob.WashingTimer 185 | TaskStartScenarioInPlace(playerPed, 'WORLD_HUMAN_BUM_WASH', 0, false) 186 | QBCore.Functions.Progressbar('Washing Stones', Config.Text['Washing_Rocks'], rockwash, false, true, { -- Name | Label | Time | useWhileDead | canCancel 187 | disableMovement = true, 188 | disableCarMovement = true, 189 | disableMouse = false, 190 | disableCombat = true, 191 | }, { 192 | }, {}, {}, function() 193 | ClearPedTasks(PlayerPedId()) 194 | TriggerServerEvent("tr-mining:receivedReward") 195 | end, function() 196 | QBCore.Functions.Notify(Config.Text['cancel'], "error") 197 | end) 198 | elseif not stonesbruf then 199 | QBCore.Functions.Notify(Config.Text['error_minerstone'], "error") 200 | end 201 | end) 202 | elseif not washingpancheck then 203 | Wait(500) 204 | QBCore.Functions.Notify(Config.Text['error_washpan'], "error", 3000) 205 | end 206 | end) 207 | end) 208 | 209 | RegisterNetEvent('tr-mining:SmeltIron', function() 210 | QBCore.Functions.TriggerCallback('tr-mining:IronCheck', function(IronCheck) 211 | if IronCheck then 212 | local iron = MiningJob.IronTimer 213 | TriggerEvent('animations:client:EmoteCommandStart', {"Warmth"}) 214 | QBCore.Functions.Progressbar("smeltIron", Config.Text['smelt_iron'], iron, false, true, { 215 | disableMovement = true, 216 | disableCarMovement = true, 217 | disableMouse = false, 218 | disableCombat = true, 219 | disableInventory = true, 220 | }, {}, {}, {}, function() 221 | TriggerEvent('animations:client:EmoteCommandStart', {"c"}) 222 | TriggerServerEvent('tr-mining:IronBar') 223 | end, function() 224 | ClearPedTasks(PlayerPedId()) 225 | QBCore.Functions.Notify(Config.Text['cancel'], "error") 226 | end) 227 | elseif not IronCheck then 228 | QBCore.Functions.Notify(Config.Text['error_ironCheck'], "error", 3000) 229 | end 230 | end) 231 | end) 232 | 233 | RegisterNetEvent('tr-mining:SmeltCopper', function() 234 | QBCore.Functions.TriggerCallback('tr-mining:CopperCheck', function(CopperCheck) 235 | if CopperCheck then 236 | local copper = MiningJob.CopperTimer 237 | TriggerEvent('animations:client:EmoteCommandStart', {"Warmth"}) 238 | QBCore.Functions.Progressbar("SmeltCopper", Config.Text['smelt_copper'], copper, false, true, { 239 | disableMovement = true, 240 | disableCarMovement = true, 241 | disableMouse = false, 242 | disableCombat = true, 243 | disableInventory = true, 244 | }, {}, {}, {}, function() 245 | TriggerEvent('animations:client:EmoteCommandStart', {"c"}) 246 | TriggerServerEvent('tr-mining:CopperBar') 247 | end, function() 248 | ClearPedTasks(PlayerPedId()) 249 | QBCore.Functions.Notify(Config.Text['cancel'], "error") 250 | end) 251 | elseif not CopperCheck then 252 | QBCore.Functions.Notify(Config.Text['error_goldCheck'], "error", 3000) 253 | end 254 | end) 255 | end) 256 | 257 | RegisterNetEvent('tr-mining:SmeltGold', function() 258 | QBCore.Functions.TriggerCallback('tr-mining:GoldCheck', function(GoldCheck) 259 | if GoldCheck then 260 | local gold = MiningJob.GoldTimer 261 | TriggerEvent('animations:client:EmoteCommandStart', {"Warmth"}) 262 | QBCore.Functions.Progressbar("smeltGold", Config.Text['smelt_gold'], gold, false, true, { 263 | disableMovement = true, 264 | disableCarMovement = true, 265 | disableMouse = false, 266 | disableCombat = true, 267 | disableInventory = true, 268 | }, {}, {}, {}, function() 269 | TriggerEvent('animations:client:EmoteCommandStart', {"c"}) 270 | TriggerServerEvent('tr-mining:GoldBar') 271 | end, function() 272 | ClearPedTasks(PlayerPedId()) 273 | QBCore.Functions.Notify(Config.Text['cancel'], "error") 274 | end) 275 | elseif not GoldCheck then 276 | QBCore.Functions.Notify(Config.Text['error_goldCheck'], "error", 3000) 277 | end 278 | end) 279 | end) 280 | 281 | CreateThread(function() 282 | for k, v in pairs(Config.MiningLocation) do 283 | local shaftZones = BoxZone:Create(v.coords, 3.5, 3, { 284 | name = "mineshaft"..k, 285 | heading = 15, 286 | minZ = v.coords - 1, 287 | maxZ = v.coords + 1, 288 | debugPoly = false 289 | }) 290 | shaftZones:onPlayerInOut(function(isPointInside) 291 | if isPointInside then 292 | exports['qb-core']:DrawText(Config.Text['MiningAlert'], 'left') 293 | Wait(1500) 294 | exports['qb-core']:HideText() 295 | Wait(1000) 296 | exports['qb-core']:DrawText(Config.Text['StartMining'],'left') 297 | MiningKeyBind(k) 298 | else 299 | listen = false 300 | exports['qb-core']:HideText() 301 | end 302 | end) 303 | end 304 | exports['qb-target']:AddBoxZone("MinerBoss", MiningLocation.targetZone, 1, 1, { 305 | name = "MinerBoss", 306 | heading = MiningLocation.targetHeading, 307 | debugPoly = false, 308 | minZ = MiningLocation.minZ, 309 | maxZ = MiningLocation.maxZ, 310 | }, { 311 | options = { 312 | { 313 | type = "client", 314 | event = "tr-mining:minermenu", 315 | icon = "Fas Fa-hands", 316 | label = Config.Text['MenuTarget'], 317 | }, 318 | }, 319 | distance = 1.5 320 | }) 321 | exports['qb-target']:AddBoxZone("PanWasher", WashLocation.targetZone, 1, 1, { 322 | name = "PanWasher", 323 | heading = WashLocation.targetHeading, 324 | debugPoly = false, 325 | minZ = WashLocation.minZ, 326 | maxZ = WashLocation.maxZ, 327 | }, { 328 | options = { 329 | { 330 | type = "client", 331 | event = "tr-mining:panmenu", 332 | icon = "Fas Fa-hands", 333 | label = Config.Text['Menu_pTarget'], 334 | }, 335 | }, 336 | distance = 1.5 337 | }) 338 | exports['qb-target']:AddBoxZone("Water", vector3(54.77, 3160.31, 25.62), 38.2, 8, { 339 | name = "Water", 340 | heading = 155, 341 | debugPoly = false, 342 | minZ=22.82, 343 | maxZ=26.62 344 | }, { 345 | options = { 346 | { 347 | type = "client", 348 | event = "tr-mining:washingrocks", 349 | icon = "Fas Fa-hands", 350 | label = Config.Text['Washing_Target'], 351 | }, 352 | }, 353 | distance = 3.0 354 | }) 355 | exports['qb-target']:AddBoxZone("smelt", vector3(1086.38, -2003.69, 31.42), 3.8, 3, { 356 | name = "smelt", 357 | heading = 319, 358 | debugPoly = false, 359 | minZ = 31.42, 360 | maxZ = 32.22 361 | }, { 362 | options = { 363 | { 364 | type = "client", 365 | event = "tr-mining:smeltmenu", 366 | icon = "Fas Fa-hands", 367 | label = Config.Text['Smeth_Rocks'], 368 | }, 369 | }, 370 | distance = 1.5 371 | }) 372 | exports['qb-target']:AddBoxZone("Seller", SellLocation.targetZone, 1, 1, { 373 | name = "Seller", 374 | heading = SellLocation.targetHeading, 375 | debugPoly = false, 376 | minZ = SellLocation.minZ, 377 | maxZ = SellLocation.maxZ, 378 | }, { 379 | options = { 380 | { 381 | type = "server", 382 | event = "tr-mining:Seller", 383 | icon = "Fas Fa-hands", 384 | label = Config.Text['Seller'], 385 | }, 386 | }, 387 | distance = 1.5 388 | }) 389 | end) 390 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution-NonCommercial-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International 58 | Public License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-NonCommercial-ShareAlike 4.0 International Public License 63 | ("Public License"). To the extent this Public License may be 64 | interpreted as a contract, You are granted the Licensed Rights in 65 | consideration of Your acceptance of these terms and conditions, and the 66 | Licensor grants You such rights in consideration of benefits the 67 | Licensor receives from making the Licensed Material available under 68 | these terms and conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-NC-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution, NonCommercial, and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. NonCommercial means not primarily intended for or directed towards 126 | commercial advantage or monetary compensation. For purposes of 127 | this Public License, the exchange of the Licensed Material for 128 | other material subject to Copyright and Similar Rights by digital 129 | file-sharing or similar means is NonCommercial provided there is 130 | no payment of monetary compensation in connection with the 131 | exchange. 132 | 133 | l. Share means to provide material to the public by any means or 134 | process that requires permission under the Licensed Rights, such 135 | as reproduction, public display, public performance, distribution, 136 | dissemination, communication, or importation, and to make material 137 | available to the public including in ways that members of the 138 | public may access the material from a place and at a time 139 | individually chosen by them. 140 | 141 | m. Sui Generis Database Rights means rights other than copyright 142 | resulting from Directive 96/9/EC of the European Parliament and of 143 | the Council of 11 March 1996 on the legal protection of databases, 144 | as amended and/or succeeded, as well as other essentially 145 | equivalent rights anywhere in the world. 146 | 147 | n. You means the individual or entity exercising the Licensed Rights 148 | under this Public License. Your has a corresponding meaning. 149 | 150 | 151 | Section 2 -- Scope. 152 | 153 | a. License grant. 154 | 155 | 1. Subject to the terms and conditions of this Public License, 156 | the Licensor hereby grants You a worldwide, royalty-free, 157 | non-sublicensable, non-exclusive, irrevocable license to 158 | exercise the Licensed Rights in the Licensed Material to: 159 | 160 | a. reproduce and Share the Licensed Material, in whole or 161 | in part, for NonCommercial purposes only; and 162 | 163 | b. produce, reproduce, and Share Adapted Material for 164 | NonCommercial purposes only. 165 | 166 | 2. Exceptions and Limitations. For the avoidance of doubt, where 167 | Exceptions and Limitations apply to Your use, this Public 168 | License does not apply, and You do not need to comply with 169 | its terms and conditions. 170 | 171 | 3. Term. The term of this Public License is specified in Section 172 | 6(a). 173 | 174 | 4. Media and formats; technical modifications allowed. The 175 | Licensor authorizes You to exercise the Licensed Rights in 176 | all media and formats whether now known or hereafter created, 177 | and to make technical modifications necessary to do so. The 178 | Licensor waives and/or agrees not to assert any right or 179 | authority to forbid You from making technical modifications 180 | necessary to exercise the Licensed Rights, including 181 | technical modifications necessary to circumvent Effective 182 | Technological Measures. For purposes of this Public License, 183 | simply making modifications authorized by this Section 2(a) 184 | (4) never produces Adapted Material. 185 | 186 | 5. Downstream recipients. 187 | 188 | a. Offer from the Licensor -- Licensed Material. Every 189 | recipient of the Licensed Material automatically 190 | receives an offer from the Licensor to exercise the 191 | Licensed Rights under the terms and conditions of this 192 | Public License. 193 | 194 | b. Additional offer from the Licensor -- Adapted Material. 195 | Every recipient of Adapted Material from You 196 | automatically receives an offer from the Licensor to 197 | exercise the Licensed Rights in the Adapted Material 198 | under the conditions of the Adapter's License You apply. 199 | 200 | c. No downstream restrictions. You may not offer or impose 201 | any additional or different terms or conditions on, or 202 | apply any Effective Technological Measures to, the 203 | Licensed Material if doing so restricts exercise of the 204 | Licensed Rights by any recipient of the Licensed 205 | Material. 206 | 207 | 6. No endorsement. Nothing in this Public License constitutes or 208 | may be construed as permission to assert or imply that You 209 | are, or that Your use of the Licensed Material is, connected 210 | with, or sponsored, endorsed, or granted official status by, 211 | the Licensor or others designated to receive attribution as 212 | provided in Section 3(a)(1)(A)(i). 213 | 214 | b. Other rights. 215 | 216 | 1. Moral rights, such as the right of integrity, are not 217 | licensed under this Public License, nor are publicity, 218 | privacy, and/or other similar personality rights; however, to 219 | the extent possible, the Licensor waives and/or agrees not to 220 | assert any such rights held by the Licensor to the limited 221 | extent necessary to allow You to exercise the Licensed 222 | Rights, but not otherwise. 223 | 224 | 2. Patent and trademark rights are not licensed under this 225 | Public License. 226 | 227 | 3. To the extent possible, the Licensor waives any right to 228 | collect royalties from You for the exercise of the Licensed 229 | Rights, whether directly or through a collecting society 230 | under any voluntary or waivable statutory or compulsory 231 | licensing scheme. In all other cases the Licensor expressly 232 | reserves any right to collect such royalties, including when 233 | the Licensed Material is used other than for NonCommercial 234 | purposes. 235 | 236 | 237 | Section 3 -- License Conditions. 238 | 239 | Your exercise of the Licensed Rights is expressly made subject to the 240 | following conditions. 241 | 242 | a. Attribution. 243 | 244 | 1. If You Share the Licensed Material (including in modified 245 | form), You must: 246 | 247 | a. retain the following if it is supplied by the Licensor 248 | with the Licensed Material: 249 | 250 | i. identification of the creator(s) of the Licensed 251 | Material and any others designated to receive 252 | attribution, in any reasonable manner requested by 253 | the Licensor (including by pseudonym if 254 | designated); 255 | 256 | ii. a copyright notice; 257 | 258 | iii. a notice that refers to this Public License; 259 | 260 | iv. a notice that refers to the disclaimer of 261 | warranties; 262 | 263 | v. a URI or hyperlink to the Licensed Material to the 264 | extent reasonably practicable; 265 | 266 | b. indicate if You modified the Licensed Material and 267 | retain an indication of any previous modifications; and 268 | 269 | c. indicate the Licensed Material is licensed under this 270 | Public License, and include the text of, or the URI or 271 | hyperlink to, this Public License. 272 | 273 | 2. You may satisfy the conditions in Section 3(a)(1) in any 274 | reasonable manner based on the medium, means, and context in 275 | which You Share the Licensed Material. For example, it may be 276 | reasonable to satisfy the conditions by providing a URI or 277 | hyperlink to a resource that includes the required 278 | information. 279 | 3. If requested by the Licensor, You must remove any of the 280 | information required by Section 3(a)(1)(A) to the extent 281 | reasonably practicable. 282 | 283 | b. ShareAlike. 284 | 285 | In addition to the conditions in Section 3(a), if You Share 286 | Adapted Material You produce, the following conditions also apply. 287 | 288 | 1. The Adapter's License You apply must be a Creative Commons 289 | license with the same License Elements, this version or 290 | later, or a BY-NC-SA Compatible License. 291 | 292 | 2. You must include the text of, or the URI or hyperlink to, the 293 | Adapter's License You apply. You may satisfy this condition 294 | in any reasonable manner based on the medium, means, and 295 | context in which You Share Adapted Material. 296 | 297 | 3. You may not offer or impose any additional or different terms 298 | or conditions on, or apply any Effective Technological 299 | Measures to, Adapted Material that restrict exercise of the 300 | rights granted under the Adapter's License You apply. 301 | 302 | 303 | Section 4 -- Sui Generis Database Rights. 304 | 305 | Where the Licensed Rights include Sui Generis Database Rights that 306 | apply to Your use of the Licensed Material: 307 | 308 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 309 | to extract, reuse, reproduce, and Share all or a substantial 310 | portion of the contents of the database for NonCommercial purposes 311 | only; 312 | 313 | b. if You include all or a substantial portion of the database 314 | contents in a database in which You have Sui Generis Database 315 | Rights, then the database in which You have Sui Generis Database 316 | Rights (but not its individual contents) is Adapted Material, 317 | including for purposes of Section 3(b); and 318 | 319 | c. You must comply with the conditions in Section 3(a) if You Share 320 | all or a substantial portion of the contents of the database. 321 | 322 | For the avoidance of doubt, this Section 4 supplements and does not 323 | replace Your obligations under this Public License where the Licensed 324 | Rights include other Copyright and Similar Rights. 325 | 326 | 327 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 328 | 329 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 330 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 331 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 332 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 333 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 334 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 335 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 336 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 337 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 338 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 339 | 340 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 341 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 342 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 343 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 344 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 345 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 346 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 347 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 348 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 349 | 350 | c. The disclaimer of warranties and limitation of liability provided 351 | above shall be interpreted in a manner that, to the extent 352 | possible, most closely approximates an absolute disclaimer and 353 | waiver of all liability. 354 | 355 | 356 | Section 6 -- Term and Termination. 357 | 358 | a. This Public License applies for the term of the Copyright and 359 | Similar Rights licensed here. However, if You fail to comply with 360 | this Public License, then Your rights under this Public License 361 | terminate automatically. 362 | 363 | b. Where Your right to use the Licensed Material has terminated under 364 | Section 6(a), it reinstates: 365 | 366 | 1. automatically as of the date the violation is cured, provided 367 | it is cured within 30 days of Your discovery of the 368 | violation; or 369 | 370 | 2. upon express reinstatement by the Licensor. 371 | 372 | For the avoidance of doubt, this Section 6(b) does not affect any 373 | right the Licensor may have to seek remedies for Your violations 374 | of this Public License. 375 | 376 | c. For the avoidance of doubt, the Licensor may also offer the 377 | Licensed Material under separate terms or conditions or stop 378 | distributing the Licensed Material at any time; however, doing so 379 | will not terminate this Public License. 380 | 381 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 382 | License. 383 | 384 | 385 | Section 7 -- Other Terms and Conditions. 386 | 387 | a. The Licensor shall not be bound by any additional or different 388 | terms or conditions communicated by You unless expressly agreed. 389 | 390 | b. Any arrangements, understandings, or agreements regarding the 391 | Licensed Material not stated herein are separate from and 392 | independent of the terms and conditions of this Public License. 393 | 394 | 395 | Section 8 -- Interpretation. 396 | 397 | a. For the avoidance of doubt, this Public License does not, and 398 | shall not be interpreted to, reduce, limit, restrict, or impose 399 | conditions on any use of the Licensed Material that could lawfully 400 | be made without permission under this Public License. 401 | 402 | b. To the extent possible, if any provision of this Public License is 403 | deemed unenforceable, it shall be automatically reformed to the 404 | minimum extent necessary to make it enforceable. If the provision 405 | cannot be reformed, it shall be severed from this Public License 406 | without affecting the enforceability of the remaining terms and 407 | conditions. 408 | 409 | c. No term or condition of this Public License will be waived and no 410 | failure to comply consented to unless expressly agreed to by the 411 | Licensor. 412 | 413 | d. Nothing in this Public License constitutes or may be interpreted 414 | as a limitation upon, or waiver of, any privileges and immunities 415 | that apply to the Licensor or You, including from the legal 416 | processes of any jurisdiction or authority. 417 | 418 | ======================================================================= 419 | 420 | Creative Commons is not a party to its public 421 | licenses. Notwithstanding, Creative Commons may elect to apply one of 422 | its public licenses to material it publishes and in those instances 423 | will be considered the “Licensor.” The text of the Creative Commons 424 | public licenses is dedicated to the public domain under the CC0 Public 425 | Domain Dedication. Except for the limited purpose of indicating that 426 | material is shared under a Creative Commons public license or as 427 | otherwise permitted by the Creative Commons policies published at 428 | creativecommons.org/policies, Creative Commons does not authorize the 429 | use of the trademark "Creative Commons" or any other trademark or logo 430 | of Creative Commons without its prior written consent including, 431 | without limitation, in connection with any unauthorized modifications 432 | to any of its public licenses or any other arrangements, 433 | understandings, or agreements concerning use of licensed material. For 434 | the avoidance of doubt, this paragraph does not form part of the 435 | public licenses. 436 | 437 | Creative Commons may be contacted at creativecommons.org. --------------------------------------------------------------------------------