├── .gitignore
├── .gitattributes
├── items.sql
├── wh.sql
├── .github
└── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
├── fxmanifest.lua
├── locales
├── br.lua
├── cs.lua
├── fi.lua
├── fr.lua
├── pl.lua
├── tr.lua
├── en.lua
├── de.lua
└── ru.lua
├── README.md
├── config.lua
├── objects.txt
├── server
└── main.lua
├── client
├── functions.lua
└── main.lua
└── LICENSE
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | *.json
3 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/items.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO `items` (`name`, `label`, `limit`) VALUES
2 | ('warehouse_key', 'Warehouse Key', 1),
3 | ('access_key', 'Access Key', 1)
4 | ;
--------------------------------------------------------------------------------
/wh.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE `wh_test` (
2 | `identifier` varchar(50) NOT NULL,
3 | `warehouse` longtext COLLATE utf8mb4_bin NOT NULL,
4 | PRIMARY KEY (`identifier`)
5 | )
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Your idea**
11 | Add any context or screenshots about the feature request here.
12 |
--------------------------------------------------------------------------------
/fxmanifest.lua:
--------------------------------------------------------------------------------
1 | fx_version 'adamant'
2 |
3 | game "gta5"
4 |
5 | server_scripts {
6 | "@mysql-async/lib/MySQL.lua",
7 | "@es_extended/locale.lua",
8 | "config.lua",
9 | "locales/en.lua",
10 | "locales/de.lua",
11 | "locales/ru.lua",
12 | "locales/tr.lua",
13 | "server/main.lua"
14 | }
15 |
16 | client_scripts {
17 | "@es_extended/locale.lua",
18 | "config.lua",
19 | "locales/en.lua",
20 | "locales/de.lua",
21 | "locales/ru.lua",
22 | "locales/tr.lua",
23 | "client/main.lua",
24 | "client/functions.lua"
25 | }
26 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots of your client log(f8) to help explain your problem.
25 |
26 | **Additional context**
27 | Add any other context about the problem here.
28 |
--------------------------------------------------------------------------------
/locales/br.lua:
--------------------------------------------------------------------------------
1 | Locales["br"] = {
2 | ["blip_p"] = "",
3 | ["blip_d"] = "",
4 | ["blip_s"] = "",
5 | ["blip_v"] = "",
6 | ["success"] = "~g~",
7 | ["delivered"] = "",
8 | ["sold"] = "",
9 | ["died"] = "",
10 | ["broken"] = "",
11 | ["locking"] = "",
12 | ["unlocking"] = "",
13 | ["locked"] = "",
14 | ["entered"] = "",
15 | ["exited"] = "",
16 | ["entering"] = "",
17 | ["enter"] = "",
18 | ["exit"] = "",
19 | ["uselaptop"] = "",
20 | ["alreadydel"] = "",
21 | ["enough_m"] = "",
22 | ["no_access"] = "",
23 | ["empty"] = "",
24 | ["pickup_s"] = "",
25 | ["pickup_f"] = "",
26 | ["busy"] = "",
27 | ["main_title"] = "",
28 | ["buy_menu"] = "",
29 | ["sell_menu"] = "",
30 | ["already_have"] = "",
31 | ["b_s1_1"] = "",
32 | ["b_s1_2"] = "",
33 | ["b_s2_1"] = "",
34 | ["b_s2_2"] = "",
35 | ["b_s3_1"] = "",
36 | ["b_s3_2"] = "",
37 | ["b_s4_1"] = "",
38 | ["b_s4_2"] = "",
39 | ["b_s5_1"] = "",
40 | ["b_s5_2"] = "",
41 | ["b_s6_1"] = "",
42 | ["b_s6_2"] = "",
43 | ["cur_price"] = "",
44 | ["info_s"] = "",
45 | ["sell"] = "",
46 | ["15min"] = "",
47 | ["10min"] = "",
48 | ["5min"] = "",
49 | ["10sec"] = "",
50 | ["failed"] = "~r~",
51 | ["timesup"] = "",
52 | ["getback_vehicle"] = "~b~~h~"
53 | }
--------------------------------------------------------------------------------
/locales/cs.lua:
--------------------------------------------------------------------------------
1 | Locales["cs"] = {
2 | ["blip_p"] = "",
3 | ["blip_d"] = "",
4 | ["blip_s"] = "",
5 | ["blip_v"] = "",
6 | ["success"] = "~g~",
7 | ["delivered"] = "",
8 | ["sold"] = "",
9 | ["died"] = "",
10 | ["broken"] = "",
11 | ["locking"] = "",
12 | ["unlocking"] = "",
13 | ["locked"] = "",
14 | ["entered"] = "",
15 | ["exited"] = "",
16 | ["entering"] = "",
17 | ["enter"] = "",
18 | ["exit"] = "",
19 | ["uselaptop"] = "",
20 | ["alreadydel"] = "",
21 | ["enough_m"] = "",
22 | ["no_access"] = "",
23 | ["empty"] = "",
24 | ["pickup_s"] = "",
25 | ["pickup_f"] = "",
26 | ["busy"] = "",
27 | ["main_title"] = "",
28 | ["buy_menu"] = "",
29 | ["sell_menu"] = "",
30 | ["already_have"] = "",
31 | ["b_s1_1"] = "",
32 | ["b_s1_2"] = "",
33 | ["b_s2_1"] = "",
34 | ["b_s2_2"] = "",
35 | ["b_s3_1"] = "",
36 | ["b_s3_2"] = "",
37 | ["b_s4_1"] = "",
38 | ["b_s4_2"] = "",
39 | ["b_s5_1"] = "",
40 | ["b_s5_2"] = "",
41 | ["b_s6_1"] = "",
42 | ["b_s6_2"] = "",
43 | ["cur_price"] = "",
44 | ["info_s"] = "",
45 | ["sell"] = "",
46 | ["15min"] = "",
47 | ["10min"] = "",
48 | ["5min"] = "",
49 | ["10sec"] = "",
50 | ["failed"] = "~r~",
51 | ["timesup"] = "",
52 | ["getback_vehicle"] = "~b~~h~"
53 | }
--------------------------------------------------------------------------------
/locales/fi.lua:
--------------------------------------------------------------------------------
1 | Locales["fi"] = {
2 | ["blip_p"] = "",
3 | ["blip_d"] = "",
4 | ["blip_s"] = "",
5 | ["blip_v"] = "",
6 | ["success"] = "~g~",
7 | ["delivered"] = "",
8 | ["sold"] = "",
9 | ["died"] = "",
10 | ["broken"] = "",
11 | ["locking"] = "",
12 | ["unlocking"] = "",
13 | ["locked"] = "",
14 | ["entered"] = "",
15 | ["exited"] = "",
16 | ["entering"] = "",
17 | ["enter"] = "",
18 | ["exit"] = "",
19 | ["uselaptop"] = "",
20 | ["alreadydel"] = "",
21 | ["enough_m"] = "",
22 | ["no_access"] = "",
23 | ["empty"] = "",
24 | ["pickup_s"] = "",
25 | ["pickup_f"] = "",
26 | ["busy"] = "",
27 | ["main_title"] = "",
28 | ["buy_menu"] = "",
29 | ["sell_menu"] = "",
30 | ["already_have"] = "",
31 | ["b_s1_1"] = "",
32 | ["b_s1_2"] = "",
33 | ["b_s2_1"] = "",
34 | ["b_s2_2"] = "",
35 | ["b_s3_1"] = "",
36 | ["b_s3_2"] = "",
37 | ["b_s4_1"] = "",
38 | ["b_s4_2"] = "",
39 | ["b_s5_1"] = "",
40 | ["b_s5_2"] = "",
41 | ["b_s6_1"] = "",
42 | ["b_s6_2"] = "",
43 | ["cur_price"] = "",
44 | ["info_s"] = "",
45 | ["sell"] = "",
46 | ["15min"] = "",
47 | ["10min"] = "",
48 | ["5min"] = "",
49 | ["10sec"] = "",
50 | ["failed"] = "~r~",
51 | ["timesup"] = "",
52 | ["getback_vehicle"] = "~b~~h~"
53 | }
--------------------------------------------------------------------------------
/locales/fr.lua:
--------------------------------------------------------------------------------
1 | Locales["fr"] = {
2 | ["blip_p"] = "",
3 | ["blip_d"] = "",
4 | ["blip_s"] = "",
5 | ["blip_v"] = "",
6 | ["success"] = "~g~",
7 | ["delivered"] = "",
8 | ["sold"] = "",
9 | ["died"] = "",
10 | ["broken"] = "",
11 | ["locking"] = "",
12 | ["unlocking"] = "",
13 | ["locked"] = "",
14 | ["entered"] = "",
15 | ["exited"] = "",
16 | ["entering"] = "",
17 | ["enter"] = "",
18 | ["exit"] = "",
19 | ["uselaptop"] = "",
20 | ["alreadydel"] = "",
21 | ["enough_m"] = "",
22 | ["no_access"] = "",
23 | ["empty"] = "",
24 | ["pickup_s"] = "",
25 | ["pickup_f"] = "",
26 | ["busy"] = "",
27 | ["main_title"] = "",
28 | ["buy_menu"] = "",
29 | ["sell_menu"] = "",
30 | ["already_have"] = "",
31 | ["b_s1_1"] = "",
32 | ["b_s1_2"] = "",
33 | ["b_s2_1"] = "",
34 | ["b_s2_2"] = "",
35 | ["b_s3_1"] = "",
36 | ["b_s3_2"] = "",
37 | ["b_s4_1"] = "",
38 | ["b_s4_2"] = "",
39 | ["b_s5_1"] = "",
40 | ["b_s5_2"] = "",
41 | ["b_s6_1"] = "",
42 | ["b_s6_2"] = "",
43 | ["cur_price"] = "",
44 | ["info_s"] = "",
45 | ["sell"] = "",
46 | ["15min"] = "",
47 | ["10min"] = "",
48 | ["5min"] = "",
49 | ["10sec"] = "",
50 | ["failed"] = "~r~",
51 | ["timesup"] = "",
52 | ["getback_vehicle"] = "~b~~h~"
53 | }
--------------------------------------------------------------------------------
/locales/pl.lua:
--------------------------------------------------------------------------------
1 | Locales["pl"] = {
2 | ["blip_p"] = "",
3 | ["blip_d"] = "",
4 | ["blip_s"] = "",
5 | ["blip_v"] = "",
6 | ["success"] = "~g~",
7 | ["delivered"] = "",
8 | ["sold"] = "",
9 | ["died"] = "",
10 | ["broken"] = "",
11 | ["locking"] = "",
12 | ["unlocking"] = "",
13 | ["locked"] = "",
14 | ["entered"] = "",
15 | ["exited"] = "",
16 | ["entering"] = "",
17 | ["enter"] = "",
18 | ["exit"] = "",
19 | ["uselaptop"] = "",
20 | ["alreadydel"] = "",
21 | ["enough_m"] = "",
22 | ["no_access"] = "",
23 | ["empty"] = "",
24 | ["pickup_s"] = "",
25 | ["pickup_f"] = "",
26 | ["busy"] = "",
27 | ["main_title"] = "",
28 | ["buy_menu"] = "",
29 | ["sell_menu"] = "",
30 | ["already_have"] = "",
31 | ["b_s1_1"] = "",
32 | ["b_s1_2"] = "",
33 | ["b_s2_1"] = "",
34 | ["b_s2_2"] = "",
35 | ["b_s3_1"] = "",
36 | ["b_s3_2"] = "",
37 | ["b_s4_1"] = "",
38 | ["b_s4_2"] = "",
39 | ["b_s5_1"] = "",
40 | ["b_s5_2"] = "",
41 | ["b_s6_1"] = "",
42 | ["b_s6_2"] = "",
43 | ["cur_price"] = "",
44 | ["info_s"] = "",
45 | ["sell"] = "",
46 | ["15min"] = "",
47 | ["10min"] = "",
48 | ["5min"] = "",
49 | ["10sec"] = "",
50 | ["failed"] = "~r~",
51 | ["timesup"] = "",
52 | ["getback_vehicle"] = "~b~~h~"
53 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # esx_warehouse
2 | Detailed smuggling job inspired by GTA: Online by utku
3 |
4 | Buying: https://streamable.com/o1qxb
5 | Selling: https://streamable.com/ziz0f
6 |
7 | Sharing (even if you edit it slightly or heavily) without my permission is strictly prohibited at this point.
8 |
9 |
10 | My Patreon for more of everything: https://www.patreon.com/utkforeva
11 |
12 | I have looked at some other scripts to write SQL side of the resource. And of course, many other resources to figure out some natives that are not well documented, if you see or feel anything you write is used here tell me, please.
13 |
14 |
15 | Code needs a lot of organization and fixing, there are a lot of useless methods right now. If you have something in your mind just request-pull. Thx for using and contributing to this resource.
16 |
17 |
18 | It registers to user steam identifier individually, so this means more than one player can use this simultaneously but in the warehouse which is not realistic and not cool. So if you are adding this to a RP server I highly recommend only make this job available for one person at this point. When I have time I will be making this warehouse based or job-based rather than player based.
19 |
20 |
21 | DO NOT FORGET TO ADD "warehouse_key" AND "access_key" TO YOUR ITEMS IN DATABASE!
22 |
23 |
24 | Using of issues are appreciated.
25 |
26 |
27 | Required resources:
28 |
29 | ESX: https://github.com/ESX-Org/es_extended
30 |
31 | mythicnotify: https://github.com/mythicrp/mythic_notify
32 |
33 | progressBars: https://github.com/torpidity/progressBars/tree/1.0
34 |
35 | you also need to enable load ipls, bob74_ipl is enough
36 |
--------------------------------------------------------------------------------
/config.lua:
--------------------------------------------------------------------------------
1 | Config = {}
2 |
3 | Config.Locale = "en"
4 |
5 | Config.rndfail = math.random(1, 500) -- Percantage of purchase fail = 1/500 (money always removed)
6 | Config.deltime = 900000 -- 15min
7 | Config.selltime = 900000 -- 15 min
8 | Config.enablenpc = true -- NPC enemies during sell
9 | Config.blackmoney = false -- set true if you want to pay with blackmoney
10 | Config.itemmultiplier = 1.5 -- set this for make items single sell price
11 | Config.bonus = 1.2 -- Higher values makes bonus sell price lower // DO NOT SET LOWER THAN 1 !!!
12 |
13 |
14 | Config.Locations = {
15 | depokapi = vector3(67.17 , -2570.20, 5.0 ),
16 | depo = vector3(1087.43, -3099.27, -40.00),
17 | laptop = vector3(1088.40, -3101.44, -39.00),
18 | deliver = vector3(58.13 , -2564.27, 5.0 )
19 | }
20 |
21 | Config.ObjLocations = {
22 | laptop = {x = 1088.40, y = -3101.44, z = -39.00},
23 | crate1_1 = {x = 1088.61, y = -3096.40, z = -39.00},
24 | crate1_2 = {x = 1091.38, y = -3096.40, z = -38.89},
25 | crate2_1 = {x = 1091.38, y = -3096.40, z = -39.00},
26 | crate2_2 = {x = 1091.38, y = -3096.40, z = -38.89},
27 | crate3_1 = {x = 1095.13, y = -3096.40, z = -39.00},
28 | crate3_2 = {x = 1095.13, y = -3096.40, z = -38.89},
29 | crate4_1 = {x = 1097.51, y = -3096.40, z = -39.00},
30 | crate4_2 = {x = 1097.51, y = -3096.40, z = -38.89},
31 | crate5_1 = {x = 1101.31, y = -3096.40, z = -39.00},
32 | crate5_2 = {x = 1101.31, y = -3096.40, z = -38.89},
33 | crate6_1 = {x = 1104.00, y = -3096.40, z = -39.00},
34 | crate6_2 = {x = 1104.00, y = -3096.40, z = -38.89}
35 | }
36 |
37 | Config.Price = {
38 | s1_1 = math.random(40000, 55000),
39 | s1_2 = math.random(75000, 90000),
40 | s2_1 = math.random(110000, 125000),
41 | s2_2 = math.random(45000, 60000),
42 | s3_1 = math.random(70000, 85000),
43 | s3_2 = math.random(55000, 70000),
44 | s4_1 = math.random(80000, 95000),
45 | s4_2 = math.random(150000, 165000),
46 | s5_1 = math.random(90000, 105000),
47 | s5_2 = math.random(85000, 100000),
48 | s6_1 = math.random(105000, 120000),
49 | s6_2 = math.random(65000, 80000),
50 | }
--------------------------------------------------------------------------------
/locales/tr.lua:
--------------------------------------------------------------------------------
1 | Locales["tr"] = {
2 | ["blip_p"] = "Kutu",
3 | ["blip_d"] = "Depo",
4 | ["blip_s"] = "Teslimat Yeri",
5 | ["blip_v"] = "Teslimat Aracı",
6 | ["success"] = "~g~BASARILI",
7 | ["delivered"] = "Teslimat tamamlandı",
8 | ["sold"] = "Satış tamamlandı",
9 | ["died"] = "Öldün",
10 | ["broken"] = "Araç bozuldu",
11 | ["locking"] = "Kapı Kilitleniyor",
12 | ["unlocking"] = "Kapı Açılıyor",
13 | ["locked"] = "Kapı kilitli.",
14 | ["entered"] = "Depoya girildi.",
15 | ["exited"] = "Depodan çıkıldı.",
16 | ["entering"] = "Depoya giriliyor",
17 | ["enter"] = "Depoya Gir",
18 | ["exit"] = "Depodan Çık",
19 | ["uselaptop"] = "Laptop Kullan",
20 | ["alreadydel"] = "Şu anda teslimat işlemindesin!",
21 | ["enough_m"] = "Yeterince paran yok!",
22 | ["no_access"] = "Laptopa erişim iznin yok.",
23 | ["empty"] = "Satacak bir şeyin yok.",
24 | ["pickup_s"] = "GPS'inde işaretlenen alma yerine git!",
25 | ["pickup_f"] = "Teslimatta bir problem oldu, paranı kaybettin!",
26 | ["busy"] = "Sistem meşgul, daha sonra tekrar deneyin.",
27 | ["main_title"] = "Depo Menüsü",
28 | ["buy_menu"] = "Alma Menüsü",
29 | ["sell_menu"] = "Satma Menüsü",
30 | ["already_have"] = "Bu mal zaten deponda var!",
31 | ["b_s1_1"] = "Medikal Mal Al: ",
32 | ["b_s1_2"] = "Kimyasal Mal Al: ",
33 | ["b_s2_1"] = "Değerli Taşlar Al: ",
34 | ["b_s2_2"] = "Elektronik Mal Al: ",
35 | ["b_s3_1"] = "Narkotik Mal Al: ",
36 | ["b_s3_2"] = "Tütün Malı Al: ",
37 | ["b_s4_1"] = "Fildişi Al:",
38 | ["b_s4_2"] = "Teçhizat Al: ",
39 | ["b_s5_1"] = "Doğu Sanat Koleksiyonu al: ",
40 | ["b_s5_2"] = "Batı Sanat Koleksiyonu al: ",
41 | ["b_s6_1"] = "Rönesans Sanat Koleksiyonu al: ",
42 | ["b_s6_2"] = "Pop Sanat Koleksiyonu al: ",
43 | ["cur_price"] = "Şu anki satış fiyatı: ",
44 | ["info_s"] = "Şu anki satış bonusu: ",
45 | ["sell"] = "Sat",
46 | ["15min"] = "Bu görevi tamamlamak için 15 dakikan var!",
47 | ["10min"] = "10 Dakika kaldı!",
48 | ["5min"] = "5 Dakika kaldı!",
49 | ["10sec"] = "10 saniye kaldı!",
50 | ["failed"] = "~r~BASARISIZ",
51 | ["timesup"] = "Zaman doldu!",
52 | ["getback_vehicle"] = "~b~~h~Araca geri dön!"
53 | }
54 |
--------------------------------------------------------------------------------
/locales/en.lua:
--------------------------------------------------------------------------------
1 | Locales["en"] = {
2 | ["blip_p"] = "Crate",
3 | ["blip_d"] = "Warehouse",
4 | ["blip_s"] = "Delivery Point",
5 | ["blip_v"] = "Delivery Vehicle",
6 | ["success"] = "~g~SUCCESS",
7 | ["delivered"] = "Delivery completed",
8 | ["sold"] = "Selling completed",
9 | ["died"] = "You died",
10 | ["broken"] = "Vehicle incapacitated",
11 | ["locking"] = "Door Locking",
12 | ["unlocking"] = "Door Unlocking",
13 | ["locked"] = "Door is locked.",
14 | ["entered"] = "Entered warehouse.",
15 | ["exited"] = "Exited warehouse.",
16 | ["entering"] = "Entering Warehouse",
17 | ["enter"] = "Enter Warehouse",
18 | ["exit"] = "Exit Warehouse",
19 | ["uselaptop"] = "Use Laptop",
20 | ["alreadydel"] = "You are currently in proccess!",
21 | ["enough_m"] = "You don't have enough money!",
22 | ["no_access"] = "You don't have access to the laptop.",
23 | ["empty"] = "You have noting to sell.",
24 | ["pickup_s"] = "Go to the pickup locaiton marked on your GPS!",
25 | ["pickup_f"] = "There was a problem in delivery, you have lost your money!",
26 | ["busy"] = "System is busy, try again later",
27 | ["main_title"] = "Warehouse Menu",
28 | ["buy_menu"] = "Buying Menu",
29 | ["sell_menu"] = "Selling Menu",
30 | ["already_have"] = "You already have this good in your warehouse!",
31 | ["b_s1_1"] = "Buy Medical Supplies: ",
32 | ["b_s1_2"] = "Buy Chemical Supplies: ",
33 | ["b_s2_1"] = "Buy Gems: ",
34 | ["b_s2_2"] = "Buy Electronics: ",
35 | ["b_s3_1"] = "Buy Narcotics: ",
36 | ["b_s3_2"] = "Buy Tobacco Supplies: ",
37 | ["b_s4_1"] = "Buy Ivory :",
38 | ["b_s4_2"] = "Buy Arsenal: ",
39 | ["b_s5_1"] = "Buy Eastern Art Collection: ",
40 | ["b_s5_2"] = "Buy Westren Art Collection: ",
41 | ["b_s6_1"] = "Buy Renaissance Art Collection: ",
42 | ["b_s6_2"] = "Buy Pop Art Collection: ",
43 | ["cur_price"] = "Current Sell Price: ",
44 | ["info_s"] = "Current Sell Bonus: ",
45 | ["sell"] = "Sell",
46 | ["15min"] = "You have 15 minutes to complete this task!",
47 | ["10min"] = "10 Minutes remaining!",
48 | ["5min"] = "5 Minutes remaining!",
49 | ["10sec"] = "10 seconds remaining!",
50 | ["failed"] = "~r~FAILED",
51 | ["timesup"] = "Time is up!",
52 | ["getback_vehicle"] = "~b~~h~Get back to the delivery vehicle!"
53 | }
--------------------------------------------------------------------------------
/locales/de.lua:
--------------------------------------------------------------------------------
1 | Locales["de"] = {
2 | ["blip_p"] = "Kiste",
3 | ["blip_d"] = "Warenhaus",
4 | ["blip_s"] = "Lieferort",
5 | ["blip_v"] = "Lieferfahrzeug",
6 | ["success"] = "~g~ERFOLGREICH",
7 | ["delivered"] = "Lieferung abgeschlossen",
8 | ["sold"] = "Verkauf abgeschlossen",
9 | ["died"] = "Du bist gestorben",
10 | ["broken"] = "Fahrzeug zerstört",
11 | ["locking"] = "Tür verschließen",
12 | ["unlocking"] = "Tür entriegeln",
13 | ["locked"] = "Tür ist verschlossen.",
14 | ["entered"] = "Betrete Lager.",
15 | ["exited"] = "Verlasse Lager.",
16 | ["entering"] = "Lager betreten",
17 | ["enter"] = "Lager betreten",
18 | ["exit"] = "Verlasse das Lager",
19 | ["uselaptop"] = "Laptop verwenden",
20 | ["alreadydel"] = "Sie befinden sich gerade im Lieferprozess!",
21 | ["enough_m"] = "Du hast nicht genug Geld!",
22 | ["no_access"] = "Sie haben keinen Zugriff auf den Laptop.",
23 | ["empty"] = "Sie haben nichts zu verkaufen.",
24 | ["pickup_s"] = "Gehen Sie zu dem auf Ihrem GPS markierten Abholort!",
25 | ["pickup_f"] = "Bei der Lieferung ist ein Problem aufgetreten, Sie haben Ihr Geld verloren!",
26 | ["busy"] = "",
27 | ["main_title"] = "Lager Menü",
28 | ["buy_menu"] = "Kaufmenü",
29 | ["sell_menu"] = "Verkaufsmenü",
30 | ["already_have"] = "Das haben Sie schon in Ihrem Lager!",
31 | ["b_s1_1"] = "Medizinische Versorgung kaufen: ",
32 | ["b_s1_2"] = "Chemiebedarf kaufen: ",
33 | ["b_s2_1"] = "Edelsteine kaufen: ",
34 | ["b_s2_2"] = "Elektronik kaufen: ",
35 | ["b_s3_1"] = "Betäubungsmittel kaufen: ",
36 | ["b_s3_2"] = "Tabakwaren kaufen: ",
37 | ["b_s4_1"] = "Elfenbein kaufen: ",
38 | ["b_s4_2"] = "Waffen kaufen: ",
39 | ["b_s5_1"] = "Östliche Kunst kaufen: ",
40 | ["b_s5_2"] = "Westliche Kunst kaufen: ",
41 | ["b_s6_1"] = "Renaissance Kunst kaufen: ",
42 | ["b_s6_2"] = "Pop Art Kunst kaufen: ",
43 | ["cur_price"] = "Aktueller Verkaufspreis: ",
44 | ["info_s"] = "Aktueller Verkaufsbonus: ",
45 | ["sell"] = "Verkaufen",
46 | ["15min"] = "Sie haben 15 Minuten Zeit, um diese Aufgabe zu erledigen!",
47 | ["10min"] = "Noch 10 Minuten!",
48 | ["5min"] = "Noch 5 Minuten!",
49 | ["10sec"] = "Noch 10 Sekunden!",
50 | ["failed"] = "~r~GESCHEITERT",
51 | ["timesup"] = "Zeit ist um!",
52 | ["getback_vehicle"] = "~b~~h~Geh zurück zum Lieferfahrzeug!"
53 | }
54 |
--------------------------------------------------------------------------------
/locales/ru.lua:
--------------------------------------------------------------------------------
1 | Locales["ru"] = {
2 | ["blip_p"] = "Деревянный ящик",
3 | ["blip_d"] = "Склад",
4 | ["blip_s"] = "Точка доставки",
5 | ["blip_v"] = "Транспорт доставки",
6 | ["success"] = "~g~УСПЕХ",
7 | ["delivered"] = "Доставка завершена",
8 | ["sold"] = "Продажа завершена",
9 | ["died"] = "Вы умерли",
10 | ["broken"] = "Транспортное сломано",
11 | ["locking"] = "Запирание дверей",
12 | ["unlocking"] = "Отпирание дверей",
13 | ["locked"] = "Дверь заперта.",
14 | ["entered"] = "Входить на Склад.",
15 | ["exited"] = "Выходить со Склада.",
16 | ["entering"] = "Заходите на Склад",
17 | ["enter"] = "Вход Склад",
18 | ["exit"] = "Выход Склад",
19 | ["uselaptop"] = "Использовать ноутбук",
20 | ["alreadydel"] = "Вы находитесь в процессе доставки!",
21 | ["enough_m"] = "Тебе не хватает денег!",
22 | ["no_access"] = "У вас нет доступа к ноутбуку.",
23 | ["empty"] = "У вас нечего продать.",
24 | ["pickup_s"] = "Перейти к местоположению пикапа, указанному на вашем GPS!",
25 | ["pickup_f"] = "Возникла проблема с доставкой, вы потеряли свои деньги!",
26 | ["busy"] = "Система занята, попробуйте позже",
27 | ["main_title"] = "Склад меню",
28 | ["buy_menu"] = "Меню покупки",
29 | ["sell_menu"] = "Меню продажи",
30 | ["already_have"] = "У тебя уже есть это добро на складе!",
31 | ["b_s1_1"] = "Купить медикаменты: ",
32 | ["b_s1_2"] = "Купить химические товары: ",
33 | ["b_s2_1"] = "Купить драгоценные камни: ",
34 | ["b_s2_2"] = "Купить электронику: ",
35 | ["b_s3_1"] = "Купить наркотики: ",
36 | ["b_s3_2"] = "Купить табачные изделия: ",
37 | ["b_s4_1"] = "Купить слоновую кость: ",
38 | ["b_s4_2"] = "Купить Арсенал: ",
39 | ["b_s5_1"] = "Купить Восточную коллекцию произведений искусства: ",
40 | ["b_s5_2"] = "Купить западную коллекцию произведений искусства: ",
41 | ["b_s6_1"] = "Купить коллекцию ренесанского арт искуства: ",
42 | ["b_s6_2"] = "Купить Поп Арт Коллекция: ",
43 | ["cur_price"] = "Текущая цена продажи: ",
44 | ["info_s"] = "Текущий бонус на продажу: ",
45 | ["sell"] = "Продать",
46 | ["15min"] = "У вас есть 15 минут, чтобы выполнить это задание!",
47 | ["10min"] = "Осталось 10 минут!",
48 | ["5min"] = "Осталось 5 мирнут!",
49 | ["10sec"] = "10 секунд осталось!",
50 | ["failed"] = "~r~ПРОВАЛ",
51 | ["timesup"] = "Время вышло!",
52 | ["getback_vehicle"] = "~b~~h~Вернитесь в транспорт!"
53 | }
--------------------------------------------------------------------------------
/objects.txt:
--------------------------------------------------------------------------------
1 | --LOCATIONS--
2 | Small WH enterance : 67.17, -2569.65, 6.00 Heading : 270.25
3 | Small WH Locaiton: 1087.43, -3099.27, -39.00 Heading : 270.29
4 | Laptop Location : 1088.40, -3101.44, -39.00 Heading: 90.20
5 |
6 | --Crate Locations--
7 | Set1: 1088.61, -3096.40, -39.00 | 1088.61, -3096.40, -36.89
8 | Set2: 1091.38, -3096.40, -39.00 | 1091.38, -3096.40, -36.89
9 | Set3: 1095.13, -3096.40, -39.00 | 1095.13, -3096.40, -36.89
10 | Set4: 1097.51, -3096.40, -39.00 | 1097.51, -3096.40, -36.89
11 | Set5: 1101.31, -3096.40, -39.00 | 1101.31, -3096.40, -36.89
12 | Set6: 1104.00, -3096.40, -39.00 | 1104.00, -3096.40, -36.89
13 |
14 | Small Object Locations [TEST]
15 | Set2: 1101.62, -3102.95, -39.00 | -38.50 | -37.00
16 | -------------------------------------------------------------
17 |
18 | --OBJECTS--
19 | --Art Crates--
20 | ex_prop_crate_art_02_bc (1 painting, 2 statue)[BIG]
21 | ex_prop_crate_art_02_sc (1 painting, stacked paintings, 1 statue) [SMALL]
22 | ex_prop_crate_art_bc (3 painting) [BIG]
23 | ex_prop_crate_art_sc (lots of painting, 2 statue) [SMALL]
24 |
25 | --Ammo Crates--
26 | ex_prop_crate_ammo_bc (rifels, ammo) [BIG]
27 | ex_prop_crate_ammo_sc (rifels, ammo) [BIG OPEN]
28 |
29 | --Other Crates--
30 | ex_prop_crate_biohazard_bc (big chemicals, closed)
31 | ex_prop_crate_biohazard_sc (big chemicals, open)
32 | ex_prop_pharma_bc (pharmacies close)
33 | ex_prop_pharma_sc (pharmacies open)
34 | ex_prop_bull_02 (silver crate)
35 | ex_prop_crate_clothing_bc (luggages)
36 | ex_prop_crate_clothing_sc (luggages open)
37 | ex_prop_crate_elec_bc (electronics closed)
38 | ex_prop_crate_elec_sc (electronics open)
39 | ex_prop_crate_expl_sc (exlposives)
40 | ex_prop_crate_furjacket_bc (furs)
41 | ex_prop_crate_furjacket_sc (furs open)
42 | ex_prop_crate_gems_bc (gems close)
43 | ex_prop_crate_gems_sc (gems open)
44 | ex_prop_crate_narc_sc (drugs)
45 | ex_prop_crate_tob_bc (tobacoo closed)
46 | ex_prop_crate_tob_sc (tobacoo open)
47 | ex_prop_crate_wlife_bc (ivory closed)
48 | ex_prop_crate_wlife_sc (ivory open)
49 |
50 | --Special Crates--
51 | ex_prop_crate_oegg (egg)
52 | ex_prop_crate_xldiam (special diamond)
53 | ex_prop_crate_minig (gold minigun)
54 |
55 | --Small Objects--
56 | ex_office_swag_med1 (medic stuff)
57 | ex_office_swag_med2 (medic stuff 2)
58 | ex_office_swag_med3 (medic stuff 3)
59 | ex_office_swag_med4 (medic stuff 4)
60 | ex_office_swag_pills2 (small pill stack)
61 | ex_office_swag_pills3 (big pill stack)
62 | ex_office_swag_jewelwatch (jewelery)
63 | ex_office_swag_jewelwatch2 (jewelery)
64 | ex_office_swag_jewelwatch3 (jewelery)
65 | ex_office_swag_ivory (single ivory)
66 | ex_office_swag_ivory2 (a lot ivory)
67 | ex_office_swag_ivory3 (some ivory)
68 | ex_office_swag_guns01 (machine gun)
69 | ex_office_swag_guns02 (ammo boxes)
70 | ex_office_swag_guns03 (vertical rifles)
71 | ex_office_swag_guns04 (rifles box)
72 | ex_office_swag_gem02 (small gem box)
73 | ex_office_swag_gem03 (big gem box)
74 | ex_office_swag_booze_cigs (alcohol and cigarettes)
75 | ex_office_swag_booze_cigs2 (vodka and cigarettes)
76 | ex_office_swag_booze_cigs3 (big)
77 | ex_swag_counterfeit1 (cash rulo)
78 | ex_swag_counterfeit2 (cash stack)
79 | ex_cash_pile_005 (cash stack big)
80 | ex_cash_pile_8 (cash pile huge)
81 | ex_office_swag_drugbag2 (bags of drug)
82 | ex_office_swag_electronic (tech stuff)
83 | ex_office_swag_electronic2
84 | ex_office_swag_electronic3
--------------------------------------------------------------------------------
/server/main.lua:
--------------------------------------------------------------------------------
1 | ESX = nil
2 |
3 | TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
4 |
5 | ESX.RegisterServerCallback("utku_wh:getWH", function(source, cb)
6 | local _source = source
7 | local xPlayer = ESX.GetPlayerFromId(_source)
8 | if xPlayer == nil then return; end
9 | local Identifier = xPlayer.identifier
10 |
11 | MySQL.Async.fetchAll("SELECT warehouse FROM wh_test WHERE identifier = @identifier", {
12 | ["@identifier"] = Identifier
13 | }, function(result)
14 | if result[1] ~= nil then
15 | local warehouselist = json.decode(result[1].warehouse)
16 | cb(warehouselist)
17 | else
18 | cb(nil)
19 | end
20 | end)
21 | end)
22 |
23 | RegisterServerEvent("utku_wh:insertWH")
24 | AddEventHandler("utku_wh:insertWH", function(warehouselist)
25 | local _source = source
26 | local xPlayer = ESX.GetPlayerFromId(_source)
27 | if xPlayer == nil then return; end
28 | local Identifier = xPlayer.identifier
29 |
30 | MySQL.Async.execute("INSERT INTO wh_test (identifier, warehouse) VALUES (@identifier, @warehouse)", {
31 | ["@identifier"] = Identifier,
32 | ["@warehouse"] = json.encode(warehouselist)
33 | })
34 | end)
35 |
36 | RegisterServerEvent("utku_wh:updateWH")
37 | AddEventHandler("utku_wh:updateWH", function(Warehouse)
38 | local _source = source
39 | local xPlayer = ESX.GetPlayerFromId(_source)
40 | if xPlayer == nil then return; end
41 | local Identifier = xPlayer.identifier
42 |
43 | MySQL.Async.execute("UPDATE wh_test SET warehouse = @warehouse WHERE identifier = @identifier", {
44 | ["@identifier"] = Identifier,
45 | ["@warehouse"] = json.encode(Warehouse)
46 | })
47 | end)
48 |
49 | RegisterServerEvent("utku_wh:checkKey")
50 | AddEventHandler("utku_wh:checkKey", function(thing)
51 | local _source = source
52 | local xPlayers = ESX.GetPlayers()
53 | local xPlayer = ESX.GetPlayerFromId(_source)
54 | local key = xPlayer.getInventoryItem("warehouse_key")["count"]
55 | local card = xPlayer.getInventoryItem("access_key")["count"]
56 |
57 | if thing == 1 then
58 | if key >= 1 then
59 | for i = 1, #xPlayers, 1 do
60 | TriggerClientEvent("utku_wh:upVar", xPlayers[i], "shouldlock", true)
61 | TriggerClientEvent("utku_wh:upVar", xPlayers[i], "locked", true)
62 | end
63 | else
64 | for i = 1, #xPlayers, 1 do
65 | TriggerClientEvent("utku_wh:upVar", xPlayers[i], "shouldlock", false)
66 | end
67 | end
68 | elseif thing == 2 then
69 | if key >= 1 then
70 | TriggerClientEvent("utku_wh:tpWH", _source, true, true)
71 | for i=1, #xPlayers, 1 do
72 | TriggerClientEvent("utku_wh:upVar", xPlayers[i], "locked", false)
73 | end
74 | else
75 | TriggerClientEvent("utku_wh:tpWH", _source, false)
76 | end
77 | elseif thing == 3 then
78 | if card >= 1 then
79 | TriggerClientEvent("utku_wh:openLaptop", _source)
80 | else
81 | TriggerClientEvent('mythic_notify:client:SendAlert', _source, {type = 'inform', text = _("no_access"), length = 3000, style = { ['background-color'] = '#FF0000', ['color'] = '#000000' } })
82 | end
83 | end
84 | end)
85 |
86 | RegisterServerEvent("utku_wh:upVar_s")
87 | AddEventHandler("utku_wh:upVar_s", function(var, status)
88 | local xPlayers = ESX.GetPlayers()
89 | for i = 1, #xPlayers, 1 do
90 | TriggerClientEvent("utku_wh:upVar", xPlayers[i], var, status)
91 | end
92 | end)
93 |
94 | RegisterServerEvent("utku_wh:checkMoney")
95 | AddEventHandler("utku_wh:checkMoney", function(amount, action)
96 | local _source = source
97 | local xPlayer = ESX.GetPlayerFromId(_source)
98 |
99 | if xPlayer.getMoney() >= amount then
100 | xPlayer.removeMoney(amount)
101 | TriggerClientEvent("utku_wh:start", _source ,action)
102 | else
103 | TriggerClientEvent('mythic_notify:client:SendAlert', _source, {type = 'inform', text = _("enough_m"), length = 3000, style = { ['background-color'] = '#FF0000', ['color'] = '#000000' } })
104 | end
105 | end)
106 |
107 | RegisterServerEvent("utku_wh:sellGoods")
108 | AddEventHandler("utku_wh:sellGoods", function(amount)
109 | local _source = source
110 | local xPlayer = ESX.GetPlayerFromId(_source)
111 |
112 | if not Config.blackmoney then
113 | xPlayer.addMoney(amount)
114 | else
115 | xPlayer.addAccountMoney("black_money", amount) -- thx for reminding me Mikolas
116 | end
117 | end)
--------------------------------------------------------------------------------
/client/functions.lua:
--------------------------------------------------------------------------------
1 | function SaveToDatabase()
2 | TriggerServerEvent("utku_wh:insertWH", Warehouse)
3 | end
4 |
5 | function CheckStatus(item)
6 | for i = 1, #Warehouse, 1 do
7 | if Warehouse[i].slot == item then
8 | if Warehouse[i].empty then
9 | return true
10 | else
11 | return false
12 | end
13 | end
14 | end
15 | end
16 |
17 | function OpenLaptop() -- Laptop Menu
18 | local ped = PlayerPedId()
19 |
20 | ESX.UI.Menu.CloseAll()
21 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'warehouse_laptop', {
22 | title = _U("main_title"),
23 | align = "top-left",
24 | elements = {
25 | {label = _U("buy_menu"), value = "buy_menu"},
26 | {label = _U("sell_menu"), value = "sell_menu"}
27 | }}, function(data, menu)
28 | if data.current.value == "buy_menu" then
29 | local elements = {
30 | {label = _U("b_s1_1")..tostring(ESX.Math.GroupDigits(Config.Price.s1_1)).."$", value = "s1_1"},
31 | {label = _U("b_s1_2")..tostring(ESX.Math.GroupDigits(Config.Price.s1_2)).."$", value = "s1_2"},
32 | {label = _U("b_s2_1")..tostring(ESX.Math.GroupDigits(Config.Price.s2_1)).."$", value = "s2_1"},
33 | {label = _U("b_s2_2")..tostring(ESX.Math.GroupDigits(Config.Price.s2_2)).."$", value = "s2_2"},
34 | {label = _U("b_s3_1")..tostring(ESX.Math.GroupDigits(Config.Price.s3_1)).."$", value = "s3_1"},
35 | {label = _U("b_s3_2")..tostring(ESX.Math.GroupDigits(Config.Price.s3_2)).."$", value = "s3_2"},
36 | {label = _U("b_s4_1")..tostring(ESX.Math.GroupDigits(Config.Price.s4_1)).."$", value = "s4_1"},
37 | {label = _U("b_s4_2")..tostring(ESX.Math.GroupDigits(Config.Price.s4_2)).."$", value = "s4_2"},
38 | {label = _U("b_s5_1")..tostring(ESX.Math.GroupDigits(Config.Price.s5_1)).."$", value = "s5_1"},
39 | {label = _U("b_s5_2")..tostring(ESX.Math.GroupDigits(Config.Price.s5_2)).."$", value = "s5_2"},
40 | {label = _U("b_s6_1")..tostring(ESX.Math.GroupDigits(Config.Price.s6_1)).."$", value = "s6_1"},
41 | {label = _U("b_s6_2")..tostring(ESX.Math.GroupDigits(Config.Price.s6_2)).."$", value = "s6_2"},
42 | }
43 |
44 | ESX.UI.Menu.Open("default", GetCurrentResourceName(), "buy_menu", {
45 | title = _U("buy_menu"),
46 | align = "top-left",
47 | elements = elements
48 | }, function(data2, menu2)
49 | local action = data2.current.value
50 | if action == "s1_1" then
51 | if CheckStatus(action) then
52 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s1_1, action)
53 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
54 | ESX.UI.Menu.CloseAll()
55 | else
56 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
57 | end
58 | elseif action == "s1_2" then
59 | if CheckStatus(action) then
60 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s1_2, action)
61 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
62 | ESX.UI.Menu.CloseAll()
63 | else
64 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
65 | end
66 | elseif action == "s2_1" then
67 | if CheckStatus(action) then
68 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s2_1, action)
69 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
70 | ESX.UI.Menu.CloseAll()
71 | else
72 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
73 | end
74 | elseif action == "s2_2" then
75 | if CheckStatus(action) then
76 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s2_2, action)
77 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
78 | ESX.UI.Menu.CloseAll()
79 | else
80 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
81 | end
82 | elseif action == "s3_1" then
83 | if CheckStatus(action) then
84 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s3_1, action)
85 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
86 | ESX.UI.Menu.CloseAll()
87 | else
88 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
89 | end
90 | elseif action == "s3_2" then
91 | if CheckStatus(action) then
92 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s3_2, action)
93 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
94 | ESX.UI.Menu.CloseAll()
95 | else
96 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
97 | end
98 | elseif action == "s4_1" then
99 | if CheckStatus(action) then
100 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s4_1, action)
101 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
102 | ESX.UI.Menu.CloseAll()
103 | else
104 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
105 | end
106 | elseif action == "s4_2" then
107 | if CheckStatus(action) then
108 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s4_2, action)
109 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
110 | ESX.UI.Menu.CloseAll()
111 | else
112 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
113 | end
114 | elseif action == "s5_1" then
115 | if CheckStatus(action) then
116 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s5_1, action)
117 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
118 | ESX.UI.Menu.CloseAll()
119 | else
120 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
121 | end
122 | elseif action == "s5_2" then
123 | if CheckStatus(action) then
124 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s5_2, action)
125 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
126 | ESX.UI.Menu.CloseAll()
127 | else
128 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
129 | end
130 | elseif action == "s6_1" then
131 | if CheckStatus(action) then
132 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s6_1, action)
133 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
134 | ESX.UI.Menu.CloseAll()
135 | else
136 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
137 | end
138 | elseif action == "s6_2" then
139 | if CheckStatus(action) then
140 | TriggerServerEvent("utku_wh:checkMoney", Config.Price.s6_2, action)
141 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
142 | ESX.UI.Menu.CloseAll()
143 | else
144 | exports['mythic_notify']:SendAlert("error", _U("already_have"))
145 | end
146 | end
147 | end, function(data2, menu2)
148 | menu2.close()
149 | end)
150 | elseif data.current.value == "sell_menu" then
151 | local worth, bonus, count = GetTotalWorth()
152 |
153 | ESX.UI.Menu.Open("default", GetCurrentResourceName(), "sell_menu", {
154 | title = _U("sell_menu"),
155 | align = "top-left",
156 | elements = {
157 | {label = _U("cur_price")..tostring(ESX.Math.GroupDigits(worth)).."$", value = "info"},
158 | {label = _U("sell"), value = "sell"}
159 | }
160 | }, function(data2, menu2)
161 | local action = data2.current.value
162 |
163 | if action == "info" then
164 | exports['mythic_notify']:SendAlert("error", _U("info_s")..tostring(ESX.Math.GroupDigits(bonus)).."$")
165 | elseif action == "sell" then
166 | if count >= 1 then
167 | TriggerEvent("utku_wh:sell", count, worth)
168 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
169 | ESX.UI.Menu.CloseAll()
170 | else
171 | exports['mythic_notify']:SendAlert("error", _U("empty"))
172 | end
173 | end
174 | end, function(data2, menu2)
175 | menu2.close()
176 | end)
177 | end
178 | end, function(data, menu)
179 | menu.close()
180 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "exit", 8.0, 8.0, 0.1, 0, 1, false, false, false)
181 | end)
182 | end
183 |
184 | function SpawnEnemyNPC(x, y, z, target) -- Works decent but not exactly how I want, still working no improving it
185 | local done, location, heading = GetClosestVehicleNodeWithHeading(x + math.random(-100, 100), y + math.random(-100, 100), z, 1, 3, 0)
186 |
187 | RequestModel(0x964D12DC)
188 | RequestModel(0x132D5A1A)
189 | if done and HasModelLoaded(0x964D12DC) and HasModelLoaded(0x132D5A1A) then
190 | Enemyveh = CreateVehicle(0x132D5A1A, location, heading, true, false)
191 |
192 | ClearAreaOfVehicles(GetEntityCoords(Enemyveh), 200, false, false, false, false, false);
193 | SetVehicleOnGroundProperly(Enemyveh)
194 | oke, Group = AddRelationshipGroup("Enemies")
195 | Driver = CreatePedInsideVehicle(Enemyveh, 12, GetHashKey("g_m_y_mexgoon_03"), -1, true, false)
196 | Passenger = CreatePedInsideVehicle(Enemyveh, 12, GetHashKey("g_m_y_mexgoon_03"), 0, true, false)
197 | Enemyblip = AddBlipForEntity(Driver)
198 | SetBlipAsFriendly(Enemyblip, false)
199 | SetBlipFlashes(Enemyblip, true)
200 | SetBlipSprite(Enemyblip, 270)
201 | SetBlipColour(Enemyblip, 1)
202 |
203 | SetPedRelationshipGroupHash(Driver, Group) SetPedRelationshipGroupHash(Passenger, Group) -- Passenger now works, but he is kinda stupid :D
204 | SetEntityCanBeDamagedByRelationshipGroup(Driver, false, Group) SetEntityCanBeDamagedByRelationshipGroup(Passenger, false, Group)
205 | GiveWeaponToPed(Driver, "WEAPON_MICROSMG", 400, false, true) GiveWeaponToPed(Passenger, "WEAPON_MICROSMG", 400, false, true)
206 | SetPedCombatAttributes(Driver, 1, true) SetPedCombatAttributes(Passenger, 1, true)
207 | SetPedCombatAttributes(Driver, 2, true) SetPedCombatAttributes(Passenger, 2, true)
208 | SetPedCombatAttributes(Driver, 5, true) SetPedCombatAttributes(Passenger, 5, true)
209 | SetPedCombatAttributes(Driver, 16, true) SetPedCombatAttributes(Passenger, 16, true)
210 | SetPedCombatAttributes(Driver, 26, true) SetPedCombatAttributes(Passenger, 26, true)
211 | SetPedCombatAttributes(Driver, 46, true) SetPedCombatAttributes(Passenger, 46, true)
212 | SetPedCombatAttributes(Driver, 52, true) SetPedCombatAttributes(Passenger, 52, true)
213 | SetPedFleeAttributes(Driver, 0, 0) SetPedFleeAttributes(Passenger, 0, 0)
214 | SetPedPathAvoidFire(Driver, 1) SetPedPathAvoidFire(Passenger, 1)
215 | SetPedAlertness(Driver,3) SetPedAlertness(Passenger,3)
216 | SetPedFiringPattern(Driver, 0xC6EE6B4C) SetPedFiringPattern(Passenger, 0xC6EE6B4C)
217 | SetPedArmour(Driver, 100) SetPedArmour(Passenger, 100)
218 | TaskCombatPed(Driver, target, 0, 16) TaskCombatPed(Driver, target, 0, 16)
219 | TaskVehicleChase(Driver, target) SetPedVehicleForcedSeatUsage(Passenger, Enemyveh, 0, 1)
220 | SetTaskVehicleChaseBehaviorFlag(Driver, 262144, true)
221 | SetDriverRacingModifier(Driver, 1.0)
222 | SetDriverAbility(Driver, 1.0)
223 | --SetPedAsEnemy(Driver, true) --SetPedAsEnemy(Passenger, true)
224 | SetPedDropsWeaponsWhenDead(Driver, false) SetPedDropsWeaponsWhenDead(Passenger, false)
225 | end
226 | end
227 |
228 | function GetTotalWorth()
229 | local count = 0
230 | local worth = 0
231 | for i = 1, #Warehouse, 1 do
232 | if Warehouse[i].empty == false then
233 | if Warehouse[i].slot == "s1_1" then
234 | count = count + 2
235 | worth = worth + Config.Price.s1_1 * Config.itemmultiplier -- also lowered this values a bit
236 | end
237 | if Warehouse[i].slot == "s1_2" then
238 | count = count + 2
239 | worth = worth + Config.Price.s1_2 * Config.itemmultiplier
240 | end
241 | if Warehouse[i].slot == "s2_1" then
242 | count = count + 2
243 | worth = worth + Config.Price.s2_1 * Config.itemmultiplier
244 | end
245 | if Warehouse[i].slot == "s2_2" then
246 | count = count + 2
247 | worth = worth + Config.Price.s2_2 * Config.itemmultiplier
248 | end
249 | if Warehouse[i].slot == "s3_1" then
250 | count = count + 2
251 | worth = worth + Config.Price.s3_1 * Config.itemmultiplier
252 | end
253 | if Warehouse[i].slot == "s3_2" then
254 | count = count + 2
255 | worth = worth + Config.Price.s3_2 * Config.itemmultiplier
256 | end
257 | if Warehouse[i].slot == "s4_1" then
258 | count = count + 2
259 | worth = worth + Config.Price.s4_1 * Config.itemmultiplier
260 | end
261 | if Warehouse[i].slot == "s4_2" then
262 | count = count + 2
263 | worth = worth + Config.Price.s4_2 * Config.itemmultiplier
264 | end
265 | if Warehouse[i].slot == "s5_1" then
266 | count = count + 2
267 | worth = worth + Config.Price.s5_1 * Config.itemmultiplier
268 | end
269 | if Warehouse[i].slot == "s5_2" then
270 | count = count + 2
271 | worth = worth + Config.Price.s5_2 * Config.itemmultiplier
272 | end
273 | if Warehouse[i].slot == "s6_1" then
274 | count = count + 2
275 | worth = worth + Config.Price.s6_1 * Config.itemmultiplier
276 | end
277 | if Warehouse[i].slot == "s6_2" then
278 | count = count + 2
279 | worth = worth + Config.Price.s6_2 * Config.itemmultiplier
280 | end
281 | end
282 | end
283 | if count > 3 then
284 | return math.floor(worth + ((worth * (count/Config.bonus)) / 10)), math.floor((worth * (count/Config.bonus)) / 10), count/2 -- Should make prices a bit lower and reasonable
285 | else
286 | return worth, 0 , count/2
287 | end
288 | end
289 |
290 | function GetCurrentInfo()
291 | local random = math.random(1, 36)
292 | local randomcar = math.random(1, 13)
293 |
294 | if random == 1 then
295 | Currentpos = Locations.c1
296 | Currentheading = Locations.h1
297 | end
298 | if random == 2 then
299 | Currentpos = Locations.c2
300 | Currentheading = Locations.h2
301 | end
302 | if random == 3 then
303 | Currentpos = Locations.c3
304 | Currentheading = Locations.h3
305 | end
306 | if random == 4 then
307 | Currentpos = Locations.c3_2
308 | Currentheading = Locations.h2
309 | end
310 | if random == 5 then
311 | Currentpos = Locations.c4
312 | Currentheading = Locations.h4
313 | end
314 | if random == 6 then
315 | Currentpos = Locations.c5
316 | Currentheading = Locations.h5
317 | end
318 | if random == 7 then
319 | Currentpos = Locations.c6
320 | Currentheading = Locations.h6
321 | end
322 | if random == 8 then
323 | Currentpos = Locations.c7
324 | Currentheading = Locations.h7
325 | end
326 | if random == 9 then
327 | Currentpos = Locations.c8
328 | Currentheading = Locations.h8
329 | end
330 | if random == 10 then
331 | Currentpos = Locations.c9
332 | Currentheading = Locations.h9
333 | end
334 | if random == 11 then
335 | Currentpos = Locations.c10
336 | Currentheading = Locations.h10
337 | end
338 | if random == 12 then
339 | Currentpos = Locations.c11
340 | Currentheading = Locations.h11
341 | end
342 | if random == 13 then
343 | Currentpos = Locations.c12
344 | Currentheading = Locations.h12
345 | end
346 | if random == 14 then
347 | Currentpos = Locations.c13
348 | Currentheading = Locations.h13
349 | end
350 | if random == 15 then
351 | Currentpos = Locations.c14
352 | Currentheading = Locations.h14
353 | end
354 | if random == 16 then
355 | Currentpos = Locations.c15
356 | Currentheading = Locations.h15
357 | end
358 | if random == 17 then
359 | Currentpos = Locations.c16
360 | Currentheading = Locations.h16
361 | end
362 | if random == 18 then
363 | Currentpos = Locations.c17
364 | Currentheading = Locations.h17
365 | end
366 | if random == 19 then
367 | Currentpos = Locations.c18
368 | Currentheading = Locations.h18
369 | end
370 | if random == 20 then
371 | Currentpos = Locations.c19
372 | Currentheading = Locations.h19
373 | end
374 | if random == 21 then
375 | Currentpos = Locations.c20
376 | Currentheading = Locations.h20
377 | end
378 | if random == 22 then
379 | Currentpos = Locations.c21
380 | Currentheading = Locations.h21
381 | end
382 | if random == 23 then
383 | Currentpos = Locations.c22
384 | Currentheading = Locations.h22
385 | end
386 | if random == 24 then
387 | Currentpos = Locations.c23
388 | Currentheading = Locations.h23
389 | end
390 | if random == 25 then
391 | Currentpos = Locations.c24
392 | Currentheading = Locations.h24
393 | end
394 | if random == 26 then
395 | Currentpos = Locations.c25
396 | Currentheading = Locations.h25
397 | end
398 | if random == 27 then
399 | Currentpos = Locations.c26
400 | Currentheading = Locations.h26
401 | end
402 | if random == 28 then
403 | Currentpos = Locations.c27
404 | Currentheading = Locations.h27
405 | end
406 | if random == 29 then
407 | Currentpos = Locations.c28
408 | Currentheading = Locations.h28
409 | end
410 | if random == 30 then
411 | Currentpos = Locations.c29
412 | Currentheading = Locations.h29
413 | end
414 | if random == 31 then
415 | Currentpos = Locations.c30
416 | Currentheading = Locations.h30
417 | end
418 | if random == 32 then
419 | Currentpos = Locations.c31
420 | Currentheading = Locations.h31
421 | end
422 | if random == 33 then
423 | Currentpos = Locations.c32
424 | Currentheading = Locations.h32
425 | end
426 | if random == 34 then
427 | Currentpos = Locations.c33
428 | Currentheading = Locations.h33
429 | end
430 | if random == 35 then
431 | Currentpos = Locations.c34
432 | Currentheading = Locations.h34
433 | end
434 | if random == 36 then
435 | Currentpos = Locations.c35
436 | Currentheading = Locations.h35
437 | end
438 | if randomcar == 1 then
439 | Currentcar = Cars.v1
440 | end
441 | if randomcar == 2 then
442 | Currentcar = Cars.v2
443 | end
444 | if randomcar == 3 then
445 | Currentcar = Cars.v3
446 | end
447 | if randomcar == 4 then
448 | Currentcar = Cars.v4
449 | end
450 | if randomcar == 5 then
451 | Currentcar = Cars.v5
452 | end
453 | if randomcar == 6 then
454 | Currentcar = Cars.v6
455 | end
456 | if randomcar == 7 then
457 | Currentcar = Cars.v7
458 | end
459 | if randomcar == 8 then
460 | Currentcar = Cars.v8
461 | end
462 | if randomcar == 9 then
463 | Currentcar = Cars.v9
464 | end
465 | if randomcar == 10 then
466 | Currentcar = Cars.v10
467 | end
468 | if randomcar == 11 then
469 | Currentcar = Cars.v11
470 | end
471 | if randomcar == 12 then
472 | Currentcar = Cars.v12
473 | end
474 | if randomcar == 13 then
475 | Currentcar = Cars.v13
476 | end
477 | end
478 |
479 | function GetSellInfo(count, amount)
480 | local rnd4 = math.random(1,4)
481 | Reward = amount
482 | if count <= 4 then
483 | Currentspawn = Sell.sp1
484 | C_heading = Sell.h1
485 | if rnd4 == 1 then
486 | Currentpos = Sell.s1
487 | Currentcar = Sell.car1
488 | elseif rnd4 == 2 then
489 | Currentpos = Sell.s2
490 | Currentcar = Sell.car2
491 | elseif rnd4 == 3 then
492 | Currentpos = Sell.s3
493 | Currentcar = Sell.car3
494 | elseif rnd4 == 4 then
495 | Currentpos = Sell.s4
496 | Currentcar = Sell.car4
497 | end
498 | end
499 | if count > 4 and count <= 8 then
500 | Currentspawn = Sell.sp2
501 | C_heading = Sell.h2
502 | if rnd4 == 1 then
503 | Currentpos = Sell.s5
504 | Currentcar = Sell.car5
505 | elseif rnd4 == 2 then
506 | Currentpos = Sell.s6
507 | Currentcar = Sell.car6
508 | elseif rnd4 == 3 then
509 | Currentpos = Sell.s7
510 | Currentcar = Sell.car7
511 | elseif rnd4 == 4 then
512 | Currentpos = Sell.s8
513 | Currentcar = Sell.car8
514 | end
515 | end
516 | if count > 8 and count <= 12 then
517 | Currentspawn = Sell.sp2
518 | C_heading = Sell.h2
519 | if rnd4 == 1 then
520 | Currentpos = Sell.s9
521 | Currentcar = Sell.car9
522 | elseif rnd4 == 2 then
523 | Currentpos = Sell.s10
524 | Currentcar = Sell.car10
525 | elseif rnd4 == 3 then
526 | Currentpos = Sell.s10
527 | Currentcar = Sell.car10
528 | elseif rnd4 == 4 then
529 | Currentpos = Sell.s10
530 | Currentcar = Sell.car10
531 | end
532 | end
533 | end
534 |
535 | function DrawText3D(x, y, z, text, scale) -- I know I stole it :D mwhwhahaha
536 | local onScreen, _x, _y = World3dToScreen2d(x, y, z)
537 | local pX, pY, pZ = table.unpack(GetGameplayCamCoords())
538 |
539 | SetTextScale(scale, scale)
540 | SetTextFont(4)
541 | SetTextProportional(1)
542 | SetTextEntry("STRING")
543 | SetTextCentre(true)
544 | SetTextColour(255, 255, 255, 215)
545 |
546 | AddTextComponentString(text)
547 | DrawText(_x, _y)
548 |
549 | local factor = (string.len(text)) / 5000
550 | DrawRect(_x, _y + 0.0150, 0.095 + factor, 0.03, 41, 11, 41, 100)
551 | end
552 |
--------------------------------------------------------------------------------
/client/main.lua:
--------------------------------------------------------------------------------
1 | ESX = nil
2 | PlayerData = {}
3 | local whstart, pickup, drawmarker, shouldlock, draw, NPCstart, Delstart, Sellstart = false, false, false, false, false, false, false, false
4 | local currentslot, currentblip, vehblip, C_heading, header, text, markerloc, Missioncar, Busy
5 | local locked = true
6 |
7 | Citizen.CreateThread(function()
8 | while ESX == nil do
9 | TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
10 | Citizen.Wait(0)
11 | end
12 | end)
13 |
14 | RegisterNetEvent('esx:playerLoaded')
15 | AddEventHandler('esx:playerLoaded', function(xPlayer)
16 | PlayerData = xPlayer
17 | local shouldSave = false
18 | ESX.TriggerServerCallback("utku_wh:getWH", function(list)
19 | if list == nil then
20 | shouldSave = true
21 | else
22 | Warehouse = list
23 | shouldSave = false
24 | end
25 | end)
26 | Citizen.Wait(500)
27 | if shouldSave then
28 | SaveToDatabase()
29 | end
30 | for i = 1, #Warehouse, 1 do -- this should ensure that objects are created for everyone (not sure tho)
31 | Warehouse[i].created = false
32 | TriggerServerEvent("utku_wh:updateWH", Warehouse)
33 | end
34 | end)
35 |
36 | RegisterNetEvent("utku_wh:upVar")
37 | AddEventHandler("utku_wh:upVar", function(var, status)
38 | if var == "locked" then
39 | locked = status
40 | end
41 | if var == "shouldlock" then
42 | shouldlock = status
43 | end
44 | if var == "busy" then
45 | Busy = status
46 | end
47 | end)
48 |
49 | Warehouse = {
50 | {slot = "s1_1", empty = true, obj = "ex_prop_crate_pharma_sc" , x = 1088.61, y = -3096.40, z = -40.0 , created = false},
51 | {slot = "s1_2", empty = true, obj = "ex_prop_crate_biohazard_sc", x = 1088.61, y = -3096.40, z = -37.82, created = false},
52 | {slot = "s2_1", empty = true, obj = "ex_prop_crate_gems_sc" , x = 1091.38, y = -3096.40, z = -40.0 , created = false},
53 | {slot = "s2_2", empty = true, obj = "ex_prop_crate_elec_sc" , x = 1091.38, y = -3096.40, z = -37.82, created = false},
54 | {slot = "s3_1", empty = true, obj = "ex_prop_crate_narc_sc" , x = 1095.13, y = -3096.40, z = -40.0 , created = false},
55 | {slot = "s3_2", empty = true, obj = "ex_prop_crate_tob_sc" , x = 1095.13, y = -3096.40, z = -37.82, created = false},
56 | {slot = "s4_1", empty = true, obj = "ex_prop_crate_wlife_sc" , x = 1097.51, y = -3096.40, z = -40.0 , created = false},
57 | {slot = "s4_2", empty = true, obj = "ex_prop_crate_ammo_sc" , x = 1097.51, y = -3096.40, z = -37.82, created = false},
58 | {slot = "s5_1", empty = true, obj = "ex_prop_crate_art_02_sc" , x = 1101.31, y = -3096.40, z = -40.0 , created = false},
59 | {slot = "s5_2", empty = true, obj = "ex_prop_crate_art_bc" , x = 1101.31, y = -3096.40, z = -37.82, created = false},
60 | {slot = "s6_1", empty = true, obj = "ex_prop_crate_art_sc" , x = 1104.00, y = -3096.40, z = -40.0 , created = false},
61 | {slot = "s6_2", empty = true, obj = "ex_prop_crate_art_02_bc" , x = 1104.00, y = -3096.40, z = -37.82, created = false}
62 | }
63 |
64 | ------------------------------------------------
65 |
66 | RegisterNetEvent("utku_wh:start")
67 | AddEventHandler("utku_wh:start", function(action)
68 | Timer = Config.deltime
69 | currentslot = action
70 | GetCurrentInfo()
71 | Citizen.Wait(500)
72 | Delstart = true
73 | Starttimer = true
74 | Busy = true
75 | TriggerServerEvent("utku_wh:upVar_s", "busy", true)
76 | exports['mythic_notify']:SendAlert("success", _U("pickup_s"))
77 | Citizen.Wait(500)
78 | exports['mythic_notify']:SendAlert("success", _U("15min"))
79 | end)
80 |
81 | RegisterNetEvent("utku_wh:sell")
82 | AddEventHandler("utku_wh:sell", function(count, amount)
83 | Timer = Config.selltime
84 | GetSellInfo(count, amount)
85 | TriggerEvent("utku_wh:startSell")
86 | Citizen.Wait(1000)
87 | Sellstart = true
88 | Starttimer = true
89 | Busy = true
90 | TriggerServerEvent("utku_wh:upVar_s", "busy", true)
91 | for i = 1, #Warehouse, 1 do -- should work now !
92 | Warehouse[i].empty = true
93 | Warehouse[i].created = false
94 | TriggerServerEvent("utku_wh:updateWH", Warehouse)
95 | end
96 | Citizen.Wait(6000)
97 | NPCstart = true
98 | Citizen.Wait(1000)
99 | TriggerEvent("utku_wh:delobj")
100 | end)
101 |
102 | RegisterNetEvent("utku_wh:itemEkle")
103 | AddEventHandler("utku_wh:itemEkle", function(currentslot)
104 | for i = 1, #Warehouse, 1 do
105 | if Warehouse[i].slot == currentslot then
106 | Warehouse[i].empty = false
107 | TriggerServerEvent("utku_wh:updateWH", Warehouse)
108 | end
109 | end
110 | end)
111 |
112 | RegisterNetEvent("utku_wh:delobj")
113 | AddEventHandler("utku_wh:delobj", function()
114 | for i = 1, #Warehouse, 1 do
115 | if Warehouse[i].empty == true then
116 | local coords = vector3(Warehouse[i].x, Warehouse[i].y, Warehouse[i].z)
117 | local obj = ESX.Game.GetClosestObject((Warehouse[i].obj), coords)
118 | DeleteEntity(obj)
119 | end
120 | end
121 | end)
122 |
123 | Citizen.CreateThread(function() -- update object
124 | while true do
125 | Citizen.Wait(1)
126 | for i = 1, #Warehouse, 1 do
127 | if Warehouse[i].empty == false then
128 | if Warehouse[i].created == false then
129 | local coords = vector3(Warehouse[i].x, Warehouse[i].y, Warehouse[i].z)
130 | local hash = GetHashKey(Warehouse[i].obj)
131 | CreateObject(hash, coords, false, false)
132 | Warehouse[i].created = true
133 | TriggerServerEvent("utku_wh:updateWH", Warehouse)
134 | end
135 | end
136 | end
137 | end
138 | end)
139 |
140 | Citizen.CreateThread(function() -- Timer
141 | while true do
142 | Citizen.Wait(1)
143 | if Starttimer then
144 | Citizen.Wait(1000)
145 | Timer = Timer - 1000
146 | end
147 | end
148 | end)
149 |
150 | Citizen.CreateThread(function() -- Countdown
151 | while true do
152 | Citizen.Wait(1)
153 | if Starttimer then
154 | if Timer == 600000 then
155 | exports['mythic_notify']:SendAlert("success", _U("10min"))
156 | Citizen.Wait(5000)
157 | end
158 | if Timer == 300000 then
159 | exports['mythic_notify']:SendAlert("success", _U("5min"))
160 | Citizen.Wait(5000)
161 | end
162 | if Timer == 60000 then
163 | exports['mythic_notify']:SendAlert("success", _U("1min"))
164 | Citizen.Wait(5000)
165 | end
166 | if Timer == 10000 then
167 | PlaySoundFrontend(-1, "10s", "MP_MISSION_COUNTDOWN_SOUNDSET", 0)
168 | exports['mythic_notify']:SendAlert('inform', _U("10sec"), 1000, { ['background-color'] = '#009ff4', ['color'] = '#000000' })
169 | Citizen.Wait(2000)
170 | end
171 | if Timer == 0 then
172 | Delstart = false
173 | drawmarker = false
174 | whstart = false
175 | NPCstart = false
176 | Sellstart = false
177 | Starttimer = false
178 | pickup = false
179 | RemoveBlip(currentblip)
180 | RemoveBlip(Enemyblip)
181 | currentblip = nil
182 | currentslot = nil
183 | Citizen.Wait(200)
184 | PlaySoundFrontend(-1, "Bed", "WastedSounds", 0)
185 | header = _U("failed")
186 | text = _U("timesup")
187 | Citizen.Wait(200)
188 | draw = true
189 | Citizen.Wait(6000)
190 | draw = false
191 | end
192 | end
193 | end
194 | end)
195 |
196 | Citizen.CreateThread(function() -- Player and vehicle status check
197 | while true do
198 | Citizen.Wait(1)
199 | while Sellstart or pickup or whstart or Delstart do
200 | Citizen.Wait(1)
201 | local ped = PlayerPedId()
202 | local currentveh = GetVehiclePedIsUsing(ped)
203 | local vehname = GetDisplayNameFromVehicleModel(GetEntityModel(currentveh))
204 | local needcar = GetDisplayNameFromVehicleModel(GetEntityModel(Missioncar))
205 | local enghealth = GetVehicleEngineHealth(Missioncar)
206 |
207 | if IsEntityDead(ped) then -- This works fine
208 | Delstart = false
209 | drawmarker = false
210 | whstart = false
211 | pickup = false
212 | Sellstart = false
213 | NPCstart = false
214 | Starttimer = false
215 | Busy = false
216 | TriggerServerEvent("utku_wh:upVar_s", "busy", false)
217 | RemoveBlip(currentblip)
218 | RemoveBlip(Enemyblip)
219 | RemoveBlip(vehblip)
220 | currentblip = nil
221 | currentslot = nil
222 | PlaySoundFrontend(-1, "Bed", "WastedSounds", 0)
223 | header = _U("failed")
224 | text = _U("died")
225 | Citizen.Wait(200)
226 | draw = true
227 | Citizen.Wait(6000)
228 | draw = false
229 | end
230 | if vehname == needcar and (enghealth <= 150) then
231 | Delstart = false
232 | drawmarker = false
233 | whstart = false
234 | pickup = false
235 | Sellstart = false
236 | NPCstart = false
237 | Starttimer = false
238 | Busy = false
239 | TriggerServerEvent("utku_wh:upVar_s", "busy", false)
240 | RemoveBlip(currentblip)
241 | RemoveBlip(Enemyblip)
242 | RemoveBlip(vehblip)
243 | currentblip = nil
244 | currentslot = nil
245 | PlaySoundFrontend(-1, "Bed", "WastedSounds", 0)
246 | header = _U("failed")
247 | text = _U("broken")
248 | Citizen.Wait(200)
249 | draw = true
250 | Citizen.Wait(6000)
251 | draw = false
252 | end
253 | end
254 | end
255 | end)
256 |
257 | --[[Citizen.CreateThread(function() SIDE BLIP COME BACK HERE
258 | while true do
259 | local veh = GetVehiclePedIsUsing(PlayerPedId())
260 | local vehname = GetDisplayNameFromVehicleModel(GetEntityModel(veh))
261 | local needcar = GetDisplayNameFromVehicleModel(GetEntityModel(Missioncar))
262 | if not Delstart then
263 | if IsPedInAnyVehicle(PlayerPedId(), false) and vehname == needcar then
264 | print(vehname)
265 | print(needcar)
266 | if not DoesBlipExist(sideblip) then
267 | Citizen.Wait(50)
268 | drawmarker = true
269 | sideblip = AddBlipForCoord(Config.Locations.deliver)
270 | SetBlipSprite(sideblip, 473)
271 | SetBlipColour(sideblip, 1)
272 | BeginTextCommandSetBlipName("STRING")
273 | AddTextComponentString(_U("blip_d"))
274 | EndTextCommandSetBlipName(sideblip)
275 | SetBlipAsShortRange(sideblip, false)
276 | SetBlipAsMissionCreatorBlip(sideblip, true)
277 | SetBlipRoute(sideblip, 1)
278 | else
279 | Citizen.Wait(100)
280 | end
281 | else
282 | RemoveBlip(sideblip)
283 | end
284 | end
285 | Citizen.Wait(100)
286 | end
287 | end)]]
288 |
289 | Citizen.CreateThread(function() -- Scaleform Wasted (IllusiveTea <3)
290 | while true do
291 | local scaleform = RequestScaleformMovie("mp_big_message_freemode")
292 |
293 | while not HasScaleformMovieLoaded(scaleform) do
294 | Citizen.Wait(0)
295 | end
296 |
297 | BeginScaleformMovieMethod(scaleform, "SHOW_SHARD_WASTED_MP_MESSAGE")
298 | PushScaleformMovieMethodParameterString(header)
299 | PushScaleformMovieMethodParameterString(text)
300 | PushScaleformMovieMethodParameterInt(5)
301 | EndScaleformMovieMethod()
302 | while draw do
303 | Citizen.Wait(0)
304 | DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255)
305 | end
306 | Citizen.Wait(1)
307 | end
308 | end)
309 |
310 | Citizen.CreateThread(function() -- Blips
311 | while true do
312 | Citizen.Wait(1)
313 | if Delstart then
314 | if not DoesBlipExist(currentblip) then
315 | Citizen.Wait(50)
316 | currentblip = AddBlipForCoord(Currentpos)
317 | SetBlipSprite(currentblip, 478)
318 | SetBlipColour(currentblip, 1)
319 | BeginTextCommandSetBlipName("STRING")
320 | AddTextComponentString(_U("blip_p"))
321 | EndTextCommandSetBlipName(currentblip)
322 | SetBlipAsShortRange(currentblip, false)
323 | SetBlipAsMissionCreatorBlip(currentblip,true)
324 | SetBlipRoute(currentblip, 1)
325 | Citizen.Wait(500)
326 | RequestModel(GetHashKey(Currentcar))
327 | while not HasModelLoaded(GetHashKey(Currentcar)) do
328 | Citizen.Wait(1)
329 | end
330 | Missioncar = CreateVehicle(GetHashKey(Currentcar), Currentpos, false, true)
331 |
332 | SetEntityHeading(Missioncar, Currentheading)
333 | SetVehicleOnGroundProperly(Missioncar)
334 | SetModelAsNoLongerNeeded(GetHashKey(Currentcar))
335 | pickup = true
336 | else
337 | Citizen.Wait(1)
338 | end
339 | end
340 | if whstart then
341 | local ped = PlayerPedId()
342 | local vehicle = IsPedInAnyVehicle(ped, false)
343 | local currentveh = GetVehiclePedIsUsing(ped)
344 | local vehname = GetDisplayNameFromVehicleModel(GetEntityModel(currentveh))
345 | local needcar = GetDisplayNameFromVehicleModel(GetEntityModel(Missioncar))
346 |
347 | if vehname == needcar and vehicle then
348 | if not DoesBlipExist(currentblip) then
349 | RemoveBlip(vehblip)
350 | Citizen.Wait(50)
351 | markerloc = Config.Locations.deliver
352 | drawmarker = true
353 | currentblip = AddBlipForCoord(Config.Locations.deliver)
354 | SetBlipSprite(currentblip, 473)
355 | SetBlipColour(currentblip, 1)
356 | BeginTextCommandSetBlipName("STRING")
357 | AddTextComponentString(_U("blip_d"))
358 | EndTextCommandSetBlipName(currentblip)
359 | SetBlipAsShortRange(currentblip, false)
360 | SetBlipAsMissionCreatorBlip(currentblip, true)
361 | SetBlipRoute(currentblip, 1)
362 | else
363 | Citizen.Wait(1)
364 | end
365 | else
366 | if not DoesBlipExist(vehblip) then
367 | RemoveBlip(currentblip)
368 | vehblip = AddBlipForEntity(Missioncar)
369 | SetBlipSprite(vehblip, 478)
370 | SetBlipColour(vehblip, 38)
371 | SetBlipFlashes(vehblip, true)
372 | BeginTextCommandSetBlipName("STRING")
373 | AddTextComponentString(_U("blip_v"))
374 | EndTextCommandSetBlipName(vehblip)
375 | SetBlipAsShortRange(vehblip, false)
376 | ESX.ShowNotification(_U("getback_vehicle"))
377 | else
378 | Citizen.Wait(1)
379 | end
380 | end
381 | end
382 | if Sellstart then
383 | local ped = PlayerPedId()
384 | local vehicle = IsPedInAnyVehicle(ped, false)
385 | local currentveh = GetVehiclePedIsUsing(ped)
386 | local vehname = GetDisplayNameFromVehicleModel(GetEntityModel(currentveh))
387 | local needcar = GetDisplayNameFromVehicleModel(GetEntityModel(Missioncar))
388 |
389 | if vehname == needcar and vehicle then
390 | if not DoesBlipExist(currentblip) then
391 | RemoveBlip(vehblip)
392 | Citizen.Wait(50)
393 | currentblip = AddBlipForCoord(Currentpos)
394 | SetBlipSprite(currentblip, 479)
395 | SetBlipColour(currentblip, 5)
396 | BeginTextCommandSetBlipName("STRING")
397 | AddTextComponentString(_U("blip_s"))
398 | EndTextCommandSetBlipName(currentblip)
399 | SetBlipAsShortRange(currentblip, false)
400 | SetBlipAsMissionCreatorBlip(currentblip, true)
401 | SetBlipRoute(currentblip, 1)
402 | else
403 | Citizen.Wait(1)
404 | end
405 | else
406 | if not DoesBlipExist(vehblip) then
407 | RemoveBlip(currentblip)
408 | vehblip = AddBlipForEntity(Missioncar)
409 | SetBlipSprite(vehblip, 478)
410 | SetBlipColour(vehblip, 38)
411 | SetBlipFlashes(vehblip, true)
412 | BeginTextCommandSetBlipName("STRING")
413 | AddTextComponentString(_U("blip_v"))
414 | EndTextCommandSetBlipName(vehblip)
415 | SetBlipAsShortRange(vehblip, false)
416 | ESX.ShowNotification(_U("getback_vehicle"))
417 | else
418 | Citizen.Wait(1)
419 | end
420 | end
421 | end
422 | end
423 | end)
424 |
425 | Citizen.CreateThread(function() -- Markers
426 | while true do
427 | Citizen.Wait(1)
428 | if drawmarker then
429 | local pedloc = GetEntityCoords(PlayerPedId())
430 | local dst = GetDistanceBetweenCoords(pedloc, markerloc, true)
431 |
432 | if dst <= 200 then
433 | DrawMarker(1, markerloc, 0, 0, 0, 0, 0, 0, 0.8, 0.8, 0.8, 236, 236, 80, 155, false, false, 2, false, 0, 0, 0, 0)
434 | end
435 | end
436 | end
437 | end)
438 |
439 | Citizen.CreateThread(function() -- Main action
440 | while true do
441 | Citizen.Wait(1)
442 | if pickup then
443 | local player = PlayerPedId()
444 | local dst = GetDistanceBetweenCoords(GetEntityCoords(player), Currentpos, true)
445 |
446 | if dst <= 2.0 then
447 | local vehicle = IsPedInAnyVehicle(player, false)
448 | local currentveh = GetVehiclePedIsUsing(player)
449 | local vehname = GetDisplayNameFromVehicleModel(GetEntityModel(currentveh))
450 | local needcar = GetDisplayNameFromVehicleModel(GetEntityModel(Missioncar))
451 |
452 | if vehname == needcar and vehicle then
453 | Delstart = false
454 | pickup = false
455 | Citizen.Wait(100)
456 | PlaySoundFrontend(-1, "Bus_Schedule_Pickup", "DLC_PRISON_BREAK_HEIST_SOUNDS", 0)
457 | RemoveBlip(currentblip)
458 | currentblip = nil
459 | Citizen.Wait(100)
460 | whstart = true
461 | end
462 | end
463 | end
464 | if whstart then
465 | local player = PlayerPedId()
466 | local dst2 = GetDistanceBetweenCoords(GetEntityCoords(player), Config.Locations.deliver, true)
467 |
468 | if dst2 <= 2.5 then
469 | local vehicle = IsPedInAnyVehicle(player, false)
470 | local currentveh = GetVehiclePedIsUsing(player)
471 | local vehname = GetDisplayNameFromVehicleModel(GetEntityModel(currentveh))
472 | local needcar = GetDisplayNameFromVehicleModel(GetEntityModel(Missioncar))
473 |
474 | if vehname == needcar and vehicle then
475 | BringVehicleToHalt(currentveh, 2.5, 1, false)
476 | Citizen.Wait(10)
477 | DoScreenFadeOut(500)
478 | Citizen.Wait(500)
479 | drawmarker = false
480 | whstart = false
481 | Busy = false
482 | TriggerServerEvent("utku_wh:upVar_s", "busy", false)
483 | Citizen.Wait(10)
484 | RemoveBlip(currentblip)
485 | currentblip = nil
486 | PlaySoundFrontend(-1, "PROPERTY_PURCHASE", "HUD_AWARDS", 0)
487 | DeleteEntity(currentveh)
488 | SetEntityCoords(player, Config.Locations.depo, 1, 0, 0, 1)
489 | Citizen.Wait(1000)
490 | DoScreenFadeIn(1000)
491 | TriggerEvent("utku_wh:itemEkle", currentslot)
492 | header = _U("success")
493 | text = _U("delivered")
494 | Citizen.Wait(200)
495 | draw = true
496 | Citizen.Wait(1000)
497 | currentslot = nil
498 | Citizen.Wait(5000)
499 | draw = false
500 | end
501 | end
502 | end
503 | if Sellstart then
504 | local player = PlayerPedId()
505 | local playercar = GetVehiclePedIsUsing(player)
506 | local vehname = GetDisplayNameFromVehicleModel(GetEntityModel(playercar))
507 | local needcar = GetDisplayNameFromVehicleModel(GetEntityModel(Missioncar))
508 |
509 | if vehname == needcar then
510 | if (GetDistanceBetweenCoords(GetEntityCoords(player), Currentpos, true) <= 2.5) then
511 | BringVehicleToHalt(playercar, 2.5, 1, false)
512 | Citizen.Wait(10)
513 | DoScreenFadeOut(500)
514 | Citizen.Wait(500)
515 | drawmarker = false
516 | Sellstart = false
517 | NPCstart = false
518 | Starttimer = false
519 | Busy = false
520 | TriggerServerEvent("utku_wh:upVar_s", "busy", false)
521 | Citizen.Wait(10)
522 | RemoveBlip(currentblip)
523 | RemoveBlip(Enemyblip)
524 | currentblip = nil
525 | PlaySoundFrontend(-1, "PROPERTY_PURCHASE", "HUD_AWARDS", 0)
526 | DeleteEntity(playercar)
527 | Citizen.Wait(1000)
528 | DoScreenFadeIn(1000)
529 | TriggerServerEvent("utku_wh:sellGoods", Reward)
530 | header = _U("success")
531 | text = _U("sold")
532 | Citizen.Wait(200)
533 | draw = true
534 | Citizen.Wait(1000)
535 | currentslot = nil
536 | Citizen.Wait(5000)
537 | draw = false
538 | end
539 | end
540 | end
541 | end
542 | end)
543 |
544 | Citizen.CreateThread(function() -- NPC actions // yay it works now!
545 | while true do
546 | Citizen.Wait(1)
547 | if Config.enablenpc then
548 | while NPCstart do
549 | local player = PlayerPedId()
550 | local playerloc = GetEntityCoords(player)
551 | local finishline = Currentpos
552 | local distance = GetDistanceBetweenCoords(playerloc, finishline, false)
553 |
554 | if distance >= 400 then
555 | Citizen.Wait(2000)
556 | if not DoesEntityExist(Driver) or IsEntityDead(Driver) then
557 | Citizen.Wait(10000)
558 | Currentloc = GetEntityCoords(player)
559 | SpawnEnemyNPC(Currentloc.x, Currentloc.y, Currentloc.x, player)
560 | end
561 | else
562 | ClearPedTasksImmediately(Driver) ClearPedTasksImmediately(Passenger)
563 | SetPedAlertness(Driver, 0) SetPedAlertness(Passenger, 0)
564 | SetPedCombatAttributes(Driver, 46, false) SetPedCombatAttributes(Passenger, 46, false)
565 | RemoveBlip(Enemyblip)
566 | RemoveRelationshipGroup(Group)
567 | Citizen.Wait(15000)
568 | DeleteEntity(Driver) DeleteEntity(Driver)
569 | DeleteEntity(Enemyveh)
570 | end
571 | Citizen.Wait(1)
572 | end
573 | Citizen.Wait(1)
574 | end
575 | end
576 | end)
577 |
578 | Citizen.CreateThread(function()
579 | while true do
580 | Citizen.Wait(1)
581 | if Config.enablenpc then
582 | if NPCstart then
583 | if IsEntityDead(Driver) then
584 | RemoveBlip(Enemyblip)
585 | end
586 | end
587 | if not NPCstart then
588 | if not IsEntityDead(Driver) and DoesEntityExist(Driver) then
589 | ClearPedTasksImmediately(Driver) ClearPedTasksImmediately(Passenger)
590 | SetPedAlertness(Driver, 0) SetPedAlertness(Passenger, 0)
591 | SetPedCombatAttributes(Driver, 46, false) SetPedCombatAttributes(Passenger, 46, false)
592 | RemoveBlip(Enemyblip)
593 | Citizen.Wait(15000)
594 | DeleteEntity(Driver) DeleteEntity(Passenger)
595 | DeleteEntity(Enemyveh)
596 | end
597 | end
598 | end
599 | end
600 | end)
601 |
602 | Citizen.CreateThread(function() -- Door thingy
603 | while true do
604 | Citizen.Wait(1)
605 | local ped = PlayerPedId()
606 | local pedcoord = GetEntityCoords(ped)
607 | local dstCheck = GetDistanceBetweenCoords(pedcoord, Config.Locations.depo, true)
608 |
609 | if dstCheck <= 2 then
610 | if IsControlJustReleased(0, 38) then
611 | DoScreenFadeOut(1000)
612 | Citizen.Wait(500)
613 | local animDict = "mp_arresting"
614 | RequestAnimDict(animDict)
615 | while not HasAnimDictLoaded(animDict) do
616 | RequestAnimDict(animDict)
617 | Citizen.Wait(10)
618 | end
619 | SetEntityCoords(ped, Config.Locations.depokapi, 1, 0, 0, 1)
620 | SetEntityHeading(ped, 270.25)
621 | Citizen.Wait(500)
622 | TriggerServerEvent("utku_wh:checkKey", 1)
623 | Citizen.Wait(200)
624 | DoScreenFadeIn(1000)
625 | if shouldlock then
626 | TaskPlayAnim(ped, animDict, "a_uncuff", 8.0, 8.0, 2000, 1, 1, 0, 0, 0)
627 | exports['progressBars']:startUI(2000, _U("locking"))
628 | else
629 | exports['mythic_notify']:SendAlert("error", _U("exited"))
630 | end
631 | end
632 | end
633 | end
634 | end)
635 |
636 | Citizen.CreateThread(function() -- Texts and another door thingy
637 | while true do
638 | Citizen.Wait(1)
639 | local pedcoord = GetEntityCoords(PlayerPedId())
640 | local coords, coords2 = Config.Locations.depo, Config.Locations.depokapi
641 | local dst = GetDistanceBetweenCoords(pedcoord, coords, true)
642 | local dst2 = GetDistanceBetweenCoords(pedcoord, coords2, true)
643 |
644 | if dst <= 6 then
645 | DrawText3D(1087.43, -3099.27, -39.00, "[~r~E~w~] ".._U("exit"), 0.40)
646 | DrawText3D(1088.40, -3101.44, -39.00, "[~r~E~w~] ".._U("uselaptop"), 0.40)
647 | end
648 | if dst2 <= 6 then
649 | DrawText3D(67.60, -2569.65, 6.00, "[~r~E~w~] ".._U("enter"), 0.40)
650 | end
651 | if dst2 <= 1.5 then
652 | if IsControlJustReleased(0, 38) and locked then
653 | TriggerServerEvent("utku_wh:checkKey", 2)
654 | elseif IsControlJustReleased(0, 38) and not locked then
655 | TriggerEvent("utku_wh:tpWH", true, false)
656 | end
657 | end
658 | end
659 | end)
660 |
661 | Citizen.CreateThread(function() -- Wooow another door , I should organize them
662 | while true do
663 | Citizen.Wait(1)
664 | local ped = PlayerPedId()
665 | local pedcoord = GetEntityCoords(ped)
666 | local laptoploc = Config.Locations.laptop
667 | local dst = GetDistanceBetweenCoords(pedcoord, laptoploc, true)
668 |
669 | if IsControlJustReleased(0, 38) and dst <= 1.5 then
670 | if not Delstart or not Sellstart then
671 | TriggerServerEvent("utku_wh:checkKey", 3)
672 | else
673 | exports['mythic_notify']:SendAlert("error", _U("alreadydel"))
674 | end
675 | end
676 | end
677 | end)
678 |
679 | RegisterNetEvent("utku_wh:startSell")
680 | AddEventHandler("utku_wh:startSell", function()
681 | local ped = PlayerPedId()
682 |
683 | RequestModel(GetHashKey(Currentcar))
684 | while not HasModelLoaded(GetHashKey(Currentcar)) do
685 | Citizen.Wait(1)
686 | end
687 | Missioncar = CreateVehicle(GetHashKey(Currentcar), Currentspawn, false, true)
688 |
689 | SetEntityHeading(Missioncar, C_heading)
690 | SetVehicleOnGroundProperly(Missioncar)
691 | SetModelAsNoLongerNeeded(GetHashKey(Currentcar))
692 | DoScreenFadeOut(500)
693 | Citizen.Wait(500)
694 | SetPedIntoVehicle(ped, Missioncar, -1)
695 | Citizen.Wait(1000)
696 | DoScreenFadeIn(500)
697 | markerloc = Currentpos
698 | drawmarker = true
699 | TriggerServerEvent("utku_wh:upVar_s", "locked", true)
700 | end)
701 |
702 | RegisterNetEvent("utku_wh:openLaptop")
703 | AddEventHandler("utku_wh:openLaptop", function()
704 | if not Busy then
705 | local ped = PlayerPedId()
706 | RequestAnimDict("anim@amb@warehouse@laptop@")
707 | while not HasAnimDictLoaded("anim@amb@warehouse@laptop@") do
708 | RequestAnimDict("anim@amb@warehouse@laptop@")
709 | Citizen.Wait(10)
710 | end
711 | SetEntityCoords(ped, 1088.45, -3101.28, -40.0, 1, 0, 0, 1)
712 | SetEntityHeading(ped, 96.45)
713 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "enter", 8.0, 8.0, 0.1, 0, 1, false, false, false)
714 | Citizen.Wait(600)
715 | TaskPlayAnim(ped, "anim@amb@warehouse@laptop@", "idle_a", 8.0, 8.0, -1, 1, 1, false, false, false)
716 | Citizen.Wait(1000)
717 | OpenLaptop()
718 | else
719 | exports['mythic_notify']:SendAlert("error", _U("busy"))
720 | end
721 | end)
722 |
723 | RegisterNetEvent("utku_wh:tpWH") --TP to warehouse
724 | AddEventHandler("utku_wh:tpWH", function(output, method)
725 | if output then
726 | local ped = PlayerPedId()
727 | local animDict = "mp_arresting"
728 |
729 | RequestAnimDict(animDict)
730 | while not HasAnimDictLoaded(animDict) do
731 | RequestAnimDict(animDict)
732 | Citizen.Wait(10)
733 | end
734 | SetEntityCoords(ped, Config.Locations.depokapi, 1, 0, 0, 1)
735 | SetEntityHeading(ped, 270.25)
736 | TaskPlayAnim(ped, animDict, "a_uncuff", 8.0, 8.0, 2000, 1, 1, 0, 0, 0)
737 | if method then
738 | exports['progressBars']:startUI(2000, _U("unlocking"))
739 | elseif not method then
740 | exports['progressBars']:startUI(2000, _U("entering"))
741 | end
742 | Citizen.Wait(1000)
743 | DoScreenFadeOut(1000)
744 | Citizen.Wait(1000)
745 | SetEntityCoords(ped, Config.Locations.depo, 1, 0, 0, 1)
746 | Citizen.Wait(500)
747 | DoScreenFadeIn(1000)
748 | exports['mythic_notify']:SendAlert("success", _U("entered"))
749 | end
750 | if output == false then
751 | exports['mythic_notify']:SendAlert("error", _U("locked"))
752 | end
753 | end)
754 |
755 | Locations = {
756 | c1 = vector3(-252.72 , 6347.42 , 31.45 ), h1 = 229.67, -- Paletobay Care Center
757 | c2 = vector3(3596.74 , 3661.80 , 32.85 ), h2 = 75.36 , -- Humane Lab Garage 1
758 | c3 = vector3(324.64 , -1474.52, 29.76 ), h3 = 232.44, -- Center Hospital
759 | c3_2 = vector3(3597.74 , 3669.79 , 33.0 ), --same heading -- Humane Lab Garage 2
760 | c4 = vector3(1356.89 , 3617.91 , 34.0 ), h4 = 289.05, -- Trevor Lab
761 | c5 = vector3(165.68 , 2284.27 , 93.51 ), h5 = 251.22, -- Online Meth Lab
762 | c6 = vector3(-575.85 , -279.66 , 35.15 ), h6 = 211.72, -- Vangelico
763 | c7 = vector3(-3158.51, 1129.05 , 20.0 ), h7 = 340.76, -- Chumhas-Barbareno Rd., some store
764 | c8 = vector3(1075.92 , -1949.32, 31.10 ), h8 = 143.46, -- Gem Factory
765 | c9 = vector3(-3166.73, 1032.56 , 20.0 ), h9 = 155.60, -- Chumhas-Barbareno Rd., some electronics store
766 | c10 = vector3(369.55 , -818.93 , 28.70 ), h10 = 181.19, -- Digital Den back alley
767 | c11 = vector3(304.85 , -904.96 , 29.29 ), h11 = 71.09 , -- Los Santos Theatre
768 | c12 = vector3(2489.48 , 4962.31 , 44.0 ), h12 = 135.06, -- Grapeseed Farm
769 | c13 = vector3(3333.35 , 5159.93 , 17.70 ), h13 = 154.27, -- Lighthouse
770 | c14 = vector3(2702.14 , 3453.09 , 55.73 ), h14 = 149.64, -- You Tool
771 | c15 = vector3(-3051.47, 596.57 , 6.60 ), h15 = 287.22, -- Ineseno Rd, supermarket
772 | c16 = vector3(-866.31 , -1123.15, 7.20 ), h16 = 118.30, -- Liquor Hole
773 | c17 = vector3(1995.38 , 3035.81 , 47.03 ), h17 = 148.03, -- Yellow Jack Inn
774 | c18 = vector3(1244.2 , -3289.29, 5.0 ), h18 = 272.84, -- Some warehose at the port
775 | c19 = vector3(1259.60 , -2568.98, 42.0 ), h19 = 292.40, -- El Burro Heights ruined warehouse
776 | c20 = vector3(1564.63 , -2162.92, 77.60 ), h20 = 356.89, -- El Burro Heights another warehouse
777 | c21 = vector3(1686.03 , 6436.29 , 32.45 ), h21 = 150.64, -- Highway Gas Station
778 | c22 = vector3(-676.49 , 5776.40 , 17.33 ), h22 = 64.76 , -- Bayview Lodge
779 | c23 = vector3(-105.52 , 6489.80 , 31.32 ), h23 = 234.07, -- Blaine County Savings Bank
780 | c24 = vector3(130.33 , 6662.76 , 31.71 ), h24 = 133.51, -- Blaine County Big Gas Station
781 | c25 = vector3(82.73 , 3750.16 , 39.90 ), h25 = 172.25, -- Stab City
782 | c26 = vector3(-1131.74, 2694.28 , 18.8 ), h26 = 136.75, -- The Paint Shop
783 | c27 = vector3(-2571.25, 2338.04 , 33.06 ), h27 = 157.13, -- Route 68 Gas Station
784 | c28 = vector3(350.09 , 4450.57 , 62.84 ), h28 = 6.37 , -- North Calafia Way near logs
785 | c29 = vector3(1715.32 , 4808.84 , 41.84 ), h29 = 90.00 , -- Grapeseed Supermarket
786 | c30 = vector3(1947.86 , 3823.04 , 32.06 ), h30 = 28.05 , -- Sandy Shores Liquor store
787 | c31 = vector3(1063.07 , 2656.37 , 39.55 ), h31 = 2.39 , -- Route 68 old cafe
788 | c32 = vector3(584.01 , 2788.04 , 42.19 ), h32 = 359.81, -- Dollar Pills back
789 | c33 = vector3(185.26 , 2775.94 , 45.80 ), h33 = 282.55, -- Some place in Harmony
790 | c34 = vector3(-53.31 , 1949.29 , 190.10), h34 = 32.89 , -- Great Chaparral Settlement
791 | c35 = vector3(-1821.21, 809.29 , 138.81), h35 = 303.20 -- Limited LTD Gas Station
792 | }
793 |
794 | Cars = {
795 | v1 = "BISON2" ,
796 | v2 = "BISON3" ,
797 | v3 = "BURRITO" ,
798 | v4 = "BURRITO2",
799 | v5 = "BURRITO3",
800 | v6 = "BURRITO4",
801 | v7 = "PARADISE",
802 | v8 = "RUMBO2" ,
803 | v9 = "SPEEDO" ,
804 | v10 = "SPEEDO4" ,
805 | v11 = "SURFER" ,
806 | v12 = "YOUGA" ,
807 | v13 = "YOUGA2"
808 | }
809 |
810 | Sell = {
811 | s1 = vector3(-3055.85, 608.66 , 6.0 ), car1 = "MULE" , -- Low item count
812 | s2 = vector3(-2298.06, 433.19 , 173.50), car2 = "MULE" ,
813 | s3 = vector3(-441.91 , 6144.82 , 30.55 ), car3 = "MULE" ,
814 | s4 = vector3(2454.29 , -369.55 , 92.15 ), car4 = "MULE" ,
815 | s5 = vector3(3480.88 , 3668.41 , 33.10 ), car5 = "POUNDER2", -- Medium item count
816 | s6 = vector3(2772.95 , 1404.07 , 24.0 ), car6 = "POUNDER2",
817 | s7 = vector3(193.06 , 2787.34 , 45.0 ), car7 = "POUNDER2",
818 | s8 = vector3(1027.39 , 2657.39 , 38.85 ), car8 = "POUNDER2",
819 | s9 = vector3(2007.52 , 4987.60 , 40.80 ), car9 = "TERBYTE" , -- High item count
820 | s10 = vector3(-600.79 , 5301.42 , 69.55 ), car10 = "TERBYTE" ,
821 | s11 = vector3(3809.66 , 4471.43 , 3.45 ), car11 = "TERBYTE" ,
822 | s12 = vector3(205.70 , 6384.08 , 30.75 ), car12 = "TERBYTE" ,
823 |
824 | sp1 = vector3(48.72 , -2566.49, 6.0 ), h1 = 359.0 ,
825 | sp2 = vector3(85.79 , -2587.42, 6.0 ), h2 = 268.17 ,
826 |
827 | method1 = 1, -- not being used right now
828 | method2 = 2,
829 | method3 = 3,
830 | method4 = 4
831 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------