-
Notifications
You must be signed in to change notification settings - Fork 0
/
GhettoMate.lua
4356 lines (4160 loc) · 179 KB
/
GhettoMate.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
script_name("GhettoMate")
script_author("Oleg_Cutov aka bier aka Vladanus")
script_version('24/07/2020')
script_version_number(15)
script_url("https://vlaek.github.io/GhettoMate/")
script.update = false
local sampev, inicfg, imgui, encoding, keys, rkeys = require 'lib.samp.events', require 'inicfg', require 'imgui', require 'encoding', require "vkeys", require 'rkeys'
local as_action = require 'moonloader'.audiostream_state
imgui.HotKey = require('imgui_addons').HotKey
require "reload_all"
require "lib.sampfuncs"
require "lib.moonloader"
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local ini = {}
local ini2 = {}
local ini3 = {}
local ini4 = {}
local main_window_state = imgui.ImBool(false)
local larek_window_state = imgui.ImBool(false)
local mo_window_state = imgui.ImBool(false)
local ug_window_state = imgui.ImBool(false)
local resX, resY = getScreenResolution()
local main_color = 0x323232
local Magaz1 = false
local Magaz2 = false
local Magaz3 = false
local Magaz4 = false
local Magaz5 = false
local Magaz6 = false
local Magaz7 = false
local Magaz8 = false
local Magaz9 = false
local Magaz10 = false
local Magaz11 = false
local Magaz12 = false
local Magaz13 = false
local Magaz14 = false
local Magaz15 = false
local Magaz16 = false
local timerMagaz = {u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно", }
local oneHour = 3600
local ServerHour = 0
local hour = 0
local hour2 = 0
local minute = 0
local second = 0
local totalSeconds = 0
local InterfacePosition = true
local InterfacePositionMO = true
local timerM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
local hourM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
local minuteM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
local secondsM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
local color = {"{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}", "{808080}"}
local MagazTime = {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}
local timer = false
local sideTimer = false
local CalibrationA = false
--AutoGetGuns--
local GetGuns = false
local NickSklad = 0
--Sucher--
local Find = false
local NotFound = false
local Found = false
local WasFound = false
local TargetId = nil
local TargetDead = false
local TargetLeave = false
--MO--
local MOtimer = false
local MOsideTimer = false
local MOLS = false
local MOSF = false
local MOLV = false
local timerMagazO = {u8:decode"Неизвестно", u8:decode"Неизвестно", u8:decode"Неизвестно"}
local timerMO = {0, 0, 0}
local hourMO = {0, 0, 0}
local minuteMO = {0, 0, 0}
local secondsMO = {0, 0, 0}
local colorMO = {"{808080}", "{808080}", "{808080}"}
local MOTime = {false, false, false}
--UGONYALA--
local ugontimer = 0
local ugtimer = 0
local ugdistance = 0
local mark, ugcheckpoint = nil, nil
local marks, ugcheckpoints = {}, {}
local vehlist = {}
local search = false
local thiefPos = ""
--DRUGS
local DrugsCount = 0
local Use = true
local DrugsTimer = 0
local UseDrugsTimer = 0
--sellgun
local price_gun = 0
local text_buffer_pt1 = imgui.ImBuffer(256)
local text_buffer_id1 = imgui.ImBuffer(256)
local text_buffer_pt2 = imgui.ImBuffer(256)
local text_buffer_id2 = imgui.ImBuffer(256)
local text_buffer_pt3 = imgui.ImBuffer(256)
local text_buffer_id3 = imgui.ImBuffer(256)
local text_buffer_pt4 = imgui.ImBuffer(256)
local text_buffer_id4 = imgui.ImBuffer(256)
local text_buffer_pt5 = imgui.ImBuffer(256)
local text_buffer_id5 = imgui.ImBuffer(256)
local text_buffer_pt6 = imgui.ImBuffer(256)
local text_buffer_id6 = imgui.ImBuffer(256)
local text_buffer_pt7 = imgui.ImBuffer(256)
local text_buffer_id7 = imgui.ImBuffer(256)
local text_buffer_pt8 = imgui.ImBuffer(256)
local text_buffer_id8 = imgui.ImBuffer(256)
local text_buffer_nick = imgui.ImBuffer(256)
local text_buffer_car = imgui.ImBuffer(256)
local vehnames = {
"Landstalker","Bravura","Buffalo","1","Perenniel","Sentinel","1","1","1","1","1","Infernus",
"Voodoo","1","1","Cheetah","1","Leviathan","Moonbeam","Esperanto","1","Washington","Bobcat","1","BF Injection",
"Hunter","Premier","1","1","Banshee","1","1","1","1","Hotknife","1","Previon","1","1",
"Stallion","1","1","1","1","1","Admiral","1","1","1","1","1","Turismo","1",
"1","1","1","1","1","Solair","1","1","PCJ-600","1","Freeway","1","1",
"Glendale","Oceanic","Sanchez","1","1","Quad","1","1","Hermes","Sabre","1","ZR-350","Walton","Regina",
"Comet","1","1","1","1","1","1","1","1","Rancher","1","Virgo","Greenwood",
"1","Hotring Racer","Sandking","Blista Compact","1","1","1","1","1","Hotring Racer A","Hotring Racer B",
"1","Rancher","Super GT","Elegant","Journey","1","1","1","1","1","1","1",
"Nebula","Majestic","Buccaneer","1","1","FCR-900","NRG-500","1","1","1","Fortune","Cadrona","1",
"Willard","1","1","1","Feltzer","Remington","Slamvan","Blade","1","1","1","Vincent","Bullet","Clover",
"Sadler","1","Hustler","Intruder","Primo","1","Tampa","Sunrise","Merit","1","1","Yosemite","Windsor","1",
"1","Uranus","Jester","Sultan","Stratum","Elegy","1","1","Flash","Tahoma","Savanna","1","1","1",
"1","1","1","1","Broadway","Tornado","1","1","Huntley","Stafford","BF-400","1","1","1","Emperor",
"Wayfarer","Euros","1","Club","1","1","1","1","1","1","1","1",
"1","1","Picador","1","Alpha","Phoenix","Glendale","Sadler","1","1",
"1","1","1","1"
}
local vehclasses= {
["Landstalker"] = "N", ["Perenniel"] = "N", ["Previon"] = "N", ["Stallion"] = "N", ["Solair"] = "N", ["Glendale"] = "N",
["Sabre"] = "N", ["Walton"] = "N", ["Regina"] = "N", ["Greenwood"] = "N", ["Nebula"] = "N", ["Majestic"] = "N",
["Buccaneer"] = "N", ["Fortune"] = "N", ["Cadrona"] = "N", ["Clover"] = "N", ["Sadler"] = "N", ["Intruder"] = "N",
["Primo"] = "N", ["Tampa"] = "N", ["Savanna"] = "N", ["Bravura"] = "D", ["Sentinel"] = "D", ["Voodoo"] = "D",
["Bobcat"] = "D", ["Premier"] = "D", ["Oceanic"] = "D", ["Hermes"] = "D", ["Blista Compact"] = "D",
["Elegant"] = "D", ["Willard"] = "D", ["Blade"] = "D", ["Vincent"] = "D", ["Sunrise"] = "D", ["Merit"] = "D",
["Tahoma"] = "D", ["Broadway"] = "D", ["Tornado"] = "D", ["Emperor"] = "D", ["Picador"] = "D",
["Moonbeam"] = "C", ["Esperanto"] = "C", ["Washington"] = "C", ["Admiral"] = "C", ["Rancher"] = "C", ["Virgo"] = "C",
["Feltzer"] = "C", ["Remington"] = "C", ["Yosemite"] = "C", ["Windsor"] = "C", ["Stratum"] = "C", ["Huntley"] = "C",
["Stafford"] = "C", ["Phoenix"] = "C", ["PCJ-600"] = "C", ["BF-400"] = "C", ["Wayfarer"] = "C", ["ZR-350"] = "B",
["Comet"] = "B", ["Slamvan"] = "B", ["Hustler"] = "B", ["Uranus"] = "B", ["Jester"] = "B", ["Sultan"] = "B",
["Elegy"] = "B", ["Flash"] = "B", ["Euros"] = "B", ["Alpha"] = "B", ["FCR-900"] = "B", ["Freeway"] = "B", ["Sanchez"] = "B",
["Quad"] = "B", ["Buffalo"] = "A", ["Infernus"] = "A", ["Cheetah"] = "A", ["Banshee"] = "A", ["Turismo"] = "A",
["Super GT"] = "A", ["Bullet"] = "A", ["NRG-500"] = "A", ["Hotknife"] = "A", ["BF Injection"] = "A", ["Sandking"] = "A",
["Hotring Racer"] = "A", ["Hotring Racer A"] = "A", ["Hotring Racer B"] = "A"
}
local coord = {
[u8:decode'возле Russian Mafia.'] = { x = 1048.270020, y = 2111.360107, z = 10.820000 },
[u8:decode'в Montgomery.'] = { x = 1336.939941, y = 287.940002, z = 19.559999 },
[u8:decode'в San-Fierro'] = { x = -2437.260010, y = 1035.900024, z = 50.389999 },
[u8:decode'возле Фермы 3.'] = { x = 253.089996, y = 8.980000, z = 2.450000 },
[u8:decode'рядом с Дальнобоем.'] = { x = 2121.6999511719, y = 2719.1398925781, z = 10.819999694824 }
} -- by Serhiy_Rubin
local zone = {
[u8:decode"Мэрия"] = { x = 1481.229248, y = -1749.487305, z = 15.445300},
[u8:decode"Автошкола"] = { x = -2026.514404, y = -95.752701, z = 34.729801},
[u8:decode"Автовокзал [LS]"] = { x = 1143.750122, y = -1746.589111, z = 13.135900},
[u8:decode"ЖД вокзал [LS]"] = { x = 1808.494507, y = -1896.349854, z = 13.068900},
[u8:decode"Авто/ЖД вокзал [SF]"] = { x = -1985.027222, y = 113.767799, z = 27.256201},
[u8:decode"Авто/ЖД вокзал [LV]"] = { x = 2843.035156, y = 1343.983032, z = 10.352100},
[u8:decode"Fort Carson"] = { x = 61.247101, y = 1189.191040, z = 18.397301},
[u8:decode"Прием металла"] = { x = 2263.516846, y = -2537.962158, z = 8.374100},
[u8:decode"Наркопритон"] = { x = 2182.824707, y = -1669.634644, z = 14.134600},
[u8:decode"Аэропорт [LS]"] = { x = 1967.201050, y = -2173.359375, z = 13.056900},
[u8:decode"Аэропорт [SF]"] = { x = -1551.542847, y = -436.707214, z = 5.571300},
[u8:decode"Аэропорт [LV]"] = { x = 1726.291260, y = 1610.033325, z = 9.659000},
[u8:decode"Причал"] = { x = -2704.270996, y = 2367.194824, z = 70.221397},
[u8:decode"Vinewood"] = { x = 1380.432251, y = -897.429016, z = 36.463100},
[u8:decode"Пляж Santa Maria"] = { x = 331.410309, y = -1802.567505, z = 4.184100},
[u8:decode"Стадион [SF]"] = { x = -2133.911133, y = -444.985199, z = 35.335800},
[u8:decode"Спортзал [LV]"] = { x = 2098.566895, y = 2480.085938, z = 10.820300},
[u8:decode"Пейнтбол"] = { x = 2488.860107, y = 2776.471191, z = 10.787000},
[u8:decode"Церковь"] = { x = -1981.333252, y = 1117.466675, z = 53.123600},
[u8:decode"Военкомат"] = { x = -551.301514, y = 2593.905029, z = 53.928398},
[u8:decode"Перегон машин. Получение"] = { x = 2476.624756, y = -2596.437256, z = 13.648400},
[u8:decode"Перегон машин. Сдача"] = { x = -1705.791138, y = 12.411100, z = 3.554700},
[u8:decode"Торговая площадка"] = { x = -1939.609131, y = 555.069824, z = 35.171902},
[u8:decode"Черный рынок"] = { x = 2519.776367, y = -1272.694214, z = 34.883598},
[u8:decode"Кладбище"] = { x = 815.756226, y = -1103.168091, z = 25.790300},
[u8:decode"Банк ЛС"] = { x = 1411.718750, y = -1699.705566, z = 13.539500},
[u8:decode"Банк СФ"] = { x = -2226.506348, y = 251.924103, z = 35.320301},
[u8:decode"Банк ЛВ"] = { x = 2412.576660, y = 1123.766235, z = 10.820300},
[u8:decode"Склад с алкоголем"] = { x = -49.508301, y = -297.973602, z = 4.979400},
[u8:decode"Нефтезавод"] = { x = -1029.870972, y = -590.956909, z = 32.012501},
[u8:decode"Склад продуктов"] = { x = -502.780609, y = -553.796204, z = 25.087400},
[u8:decode"Склад для урожая с ферм"] = { x = 1629.969971, y = 2326.031494, z = 10.820300},
[u8:decode"Автобусный парк"] = { x = 1638.358643, y = -1148.711914, z = 23.479000},
[u8:decode"Стоянка машин Хот догов"] = { x = -2407.622803, y = 741.159424, z = 34.924900},
[u8:decode"Стоянка Инкассаторов"] = { x = -2206.516113, y = 312.605194, z = 35.443501},
[u8:decode"Работа грузчика"] = { x = 2230.001709, y = -2211.310547, z = 13.546800},
[u8:decode"Склад с наркотиками"] = { x = 2182.824707, y = -1669.634644, z = 14.134600},
[u8:decode"Спортзал [LV]"] = { x = 2098.566895, y = 2480.085938, z = 10.820300},
[u8:decode"Автоугонщики"] = { x = 2494.080078, y = -1464.709961, z = 24.020000},
[u8:decode"Стоянка грабителей ЛЭП"] = { x = 2285.899658, y = -2339.326904, z = 13.546900},
[u8:decode"Стоянка электриков"] = { x = -84.297798, y = -1125.867188, z = 0.655700},
[u8:decode"Клуб Alhambra"] = { x = 1827.609253, y = -1682.122070, z = 13.118200},
[u8:decode"Клуб Jizzy"] = { x = -2593.454834, y = 1362.782349, z = 6.657800},
[u8:decode"Клуб Pig Pen"] = { x = 2417.153076, y = -1244.189941, z = 23.380501},
[u8:decode"Бар Grove street"] = { x = 2306.214355, y = -1651.560547, z = 14.055600},
[u8:decode"Бар Misty"] = { x = -2246.219482, y = -90.975998, z = 34.886700},
[u8:decode"Клуб Amnesia"] = { x = 2507.358398, y = 1242.260132, z = 10.826900},
[u8:decode"Бар Big Spread Ranch"] = { x = 693.625305, y = 1967.683716, z = 5.539100},
[u8:decode"Бар Lil Probe Inn"] = { x = -89.612503, y = 1378.249268, z = 10.469700},
[u8:decode"Бар Tierra Robada"] = { x = -2501.242920, y = 2318.692627, z = 4.984300},
[u8:decode"Comedy club"] = { x = 1879.190918, y = 2339.538330, z = 11.979900},
[u8:decode"4 Дракона"] = { x = 2019.318115, y = 1007.755920, z = 10.820300},
[u8:decode"Калигула"] = { x = 2196.960693, y = 1677.085815, z = 12.367100},
[u8:decode"Склад бара 4Драконов"] = { x = 1908.672607, y = 965.244629, z = 10.820300},
[u8:decode"Склад бара Калигулы"] = { x = 2314.892822, y = 1733.299561, z = 10.820300},
[u8:decode"Belagio"] = { x = 1658.526611, y = 2250.043457, z = 12.070100},
[u8:decode"Sobrino de Botin"] = { x = 2269.751465, y = -74.159599, z = 27.772400},
[u8:decode"Автосалон: Nope"] = { x = 557.109619, y = -1285.791626, z = 16.809401},
[u8:decode"Автосалон: D and C"] = { x = -1987.325806, y = 288.925507, z = 33.982700},
[u8:decode"Автосалон: B and A"] = { x = -1638.351440, y = 1202.657227, z = 6.762800},
[u8:decode"Автосалон [LV]: B and A"] = { x = 2159.575195, y = 1385.734131, z = 10.386600},
[u8:decode"Магазин одежды [LS]"] = { x = 461.512390, y = -1500.866211, z = 31.059700},
[u8:decode"Магазин одежды [SF]"] = { x = -1694.672119, y = 951.845581, z = 24.890600},
[u8:decode"Магазин одежды [LV]"] = { x = 2802.930664, y = 2430.718018, z = 11.062500},
[u8:decode"Оружейный магазин [LS]"] = { x = 1363.999512, y = -1288.826660, z = 13.108200},
[u8:decode"Оружейный магазин [SF]"] = { x = -2611.327393, y = 213.002808, z = 5.190800},
[u8:decode"Оружейный магазин [LV]"] = { x = 2154.377686, y = 935.150208, z = 10.391700},
[u8:decode"Аренда вертолета [LS]"] = { x = 1571.372192, y = -1335.252197, z = 16.484400},
[u8:decode"Аренда вертолета [SF]"] = { x = -2241.166992, y = 2322.205566, z = 7.545400},
[u8:decode"Аренда вертолета [LV]"] = { x = 2614.588379, y = 2735.326416, z = 36.538601},
[u8:decode"Мэрия"] = { x = 1481.229248, y = -1749.487305, z = 15.445300},
[u8:decode"Автошкола"] = { x = -2026.514404, y = -95.752701, z = 34.729801},
[u8:decode"Медики"] = { x = -2658.259766, y = 627.981018, z = 14.453100},
[u8:decode"Полиция [LS]"] = { x = 1548.657715, y = -1675.475220, z = 14.620200},
[u8:decode"Полиция [SF]"] = { x = -1607.410034, y = 723.037170, z = 11.895400},
[u8:decode"Полиция [LV]"] = { x = 2283.758789, y = 2420.525146, z = 10.381600},
[u8:decode"ФБР"] = { x = -2418.072754, y = 497.657501, z = 29.606501},
[u8:decode"Военная база [Авианосец]"] = { x = -1554.953613, y = 500.124207, z = 6.745500},
[u8:decode"Военная база [Зона 51]"] = { x = 133.322205, y = 1994.773560, z = 19.049900},
[u8:decode"Новости [LS]"] = { x = 1632.979248, y = -1712.134644, z = 12.878200},
[u8:decode"Новости [SF]"] = { x = -2013.973755, y = 469.190094, z = 34.742901},
[u8:decode"Новости [LV]"] = { x = 2617.339600, y = 1179.765137, z = 10.388400},
[u8:decode"Особняк Yakuza"] = { x = 1538.844360, y = 2761.891602, z = 10.388200},
[u8:decode"Особняк Русской мафии"] = { x = 1001.480103, y = 1690.514526, z = 10.486100},
[u8:decode"Особняк La Cosa Nostra"] = { x = 1461.381958, y = 659.340027, z = 10.387200},
[u8:decode"Район Grove street"] = { x = 2491.886963, y = -1666.881348, z = 12.910300},
[u8:decode"Район Vagos"] = { x = 2803.555420, y = -1585.062500, z = 10.492400},
[u8:decode"Район Ballas"] = { x = 2702.399414, y = -2003.425903, z = 12.972800},
[u8:decode"Район Rifa"] = { x = 2184.550537, y = -1765.587158, z = 12.948300},
[u8:decode"Район Aztecas"] = { x = 1723.966553, y = -2112.802734, z = 12.949000},
[u8:decode"Ферма номер: 0"] = { x = -381.502808, y = -1438.979248, z = 25.726601},
[u8:decode"Ферма номер: 1"] = { x = -112.575401, y = -10.423600, z = 3.109400},
[u8:decode"Ферма номер: 2"] = { x = -1060.398560, y = -1205.524048, z = 129.218704},
[u8:decode"Ферма номер: 3"] = { x = -5.595900, y = 67.837303, z = 3.117100},
[u8:decode"Ферма номер: 4"] = { x = 1925.693237, y = 170.401703, z = 37.281200},
[u8:decode"Порт ЛС"] = { x = 2507.131348, y = -2234.151855, z = 13.546900},
[u8:decode"Порт СФ"] = { x = -1731.500000, y = 118.919899, z = 3.549900},
[u8:decode"Нефтезавод №1"] = { x = 256.260010, y = 1414.930054, z = 10.699900},
[u8:decode"Нефтезавод №2"] = { x = -1046.780029, y = -670.650024, z = 32.349899},
[u8:decode"Склад угля №1"] = { x = 832.456787, y = 863.901611, z = 12.665400},
[u8:decode"Склад угля №2"] = { x = -1872.910034, y = -1720.079956, z = 21.750000},
[u8:decode"Лесопилка №1"] = { x = -449.269897, y = -65.660004, z = 59.409901},
[u8:decode"Лесопилка №2"] = { x = -1978.709961, y = -2435.139893, z = 30.620001},
[u8:decode"Аренда машин"] = { x = 2236.611816, y = 2770.693848, z = 10.302900},
[u8:decode"Hell’s Angels MC"] = { x = 681.496521, y = -475.403198, z = 16.335800},
[u8:decode"Mongols MC"] = { x = -1265.713867, y = 2716.588623, z = 50.266300},
[u8:decode"Pagans MC"] = { x = -2104.451904, y = -2481.883057, z = 30.625000},
[u8:decode"Outlaws MC"] = { x = -309.605103, y = 1303.436035, z = 53.664200},
[u8:decode"Sons of Silence MC"] = { x = 1243.829102, y = 203.576202, z = 19.554701},
[u8:decode"Warlocks MC"] = { x = 661.681824, y = 1717.991211, z = 7.187500},
[u8:decode"Highwaymen MC"] = { x = 22.934000, y = -2646.949219, z = 40.465599},
[u8:decode"Bandidos MC"] = { x = -1940.291016, y = 2380.227783, z = 49.695301},
[u8:decode"Free Souls MC"] = { x = -253.842606, y = 2603.138184, z = 62.858200},
[u8:decode"Vagos MC"] = { x = -315.249115, y = 1773.921875, z = 43.640499},
[u8:decode"Idlewood"] = { x = 1940.922241, y = -1772.977905, z = 13.640600},
[u8:decode"Mulholland"] = { x = 1003.979614, y = -937.547302, z = 42.327900},
[u8:decode"Flint"] = { x = -90.936501, y = -1169.390747, z = 2.417000},
[u8:decode"Whetstone"] = { x = -1605.548340, y = -2714.580322, z = 48.533501},
[u8:decode"Doherty"] = { x = -2026.463135, y = 156.733704, z = 29.039101},
[u8:decode"Easter"] = { x = -1675.596558, y = 413.487213, z = 7.179500},
[u8:decode"Juniper"] = { x = -2410.803467, y = 975.240906, z = 45.460800},
[u8:decode"ElGuebrabos"] = { x = -1328.197510, y = 2677.596924, z = 50.062500},
[u8:decode"BoneCounty"] = { x = 614.468323, y = 1692.853638, z = 7.187500},
[u8:decode"FortCarson"] = { x = 70.458099, y = 1218.595947, z = 18.812201},
[u8:decode"Come-A-Lot"] = { x = 2115.459717, y = 920.206421, z = 10.820300},
[u8:decode"PricklePine"] = { x = 2147.674561, y = 2747.945313, z = 10.820300},
[u8:decode"Montgomery"] = { x = 1381.814453, y = 459.148010, z = 20.345100},
[u8:decode"Dillimore"] = { x = 655.649109, y = -564.918518, z = 16.335800},
[u8:decode"AngelPine"] = { x = -2243.743896, y = -2560.555420, z = 31.921801},
[u8:decode"Julius"] = { x = 2640.000244, y = 1106.087646, z = 11.820300},
[u8:decode"Emerald Isle"] = { x = 2202.513672, y = 2474.136230, z = 11.820300},
[u8:decode"Redsands"] = { x = 1596.309814, y = 2199.004639, z = 11.820300},
[u8:decode"Tierra Robada"] = { x = -1471.741943, y = 1863.972412, z = 33.632801},
[u8:decode"Flats"] = { x = -2718.883301, y = 50.532200, z = 5.335900},
[u8:decode"Palomino Creek"] = { x = 2250.245117, y = 52.701401, z = 23.667101},
[u8:decode"Financial"] = { x = -1807.485352, y = 944.666626, z = 25.890600},
[u8:decode"Garcia"] = { x = -2335.718750, y = -166.687805, z = 36.554501},
[u8:decode"Esplanade"] = { x = -1721.592529, y = 1360.345215, z = 8.185100},
[u8:decode"Marina Cluck"] = { x = 928.539917, y = -1352.939331, z = 14.343700},
[u8:decode"Willowfield"] = { x = 2397.851563, y = -1899.040039, z = 14.546600},
[u8:decode"East"] = { x = 2419.725586, y = -1509.026245, z = 25.000000},
[u8:decode"Marina Burger"] = { x = 810.510010, y = -1616.193848, z = 14.546600},
[u8:decode"Redsands West"] = { x = 1157.925537, y = 2072.282227, z = 12.062500},
[u8:decode"Redsands East"] = { x = 1872.255249, y = 2071.863037, z = 12.062500},
[u8:decode"Strip"] = { x = 2083.269775, y = 2224.697510, z = 12.023400},
[u8:decode"Creek"] = { x = 2838.201660, y = 2407.693848, z = 12.069000},
[u8:decode"Old Venturas Strip"] = { x = 2472.861816, y = 2034.192627, z = 12.062500},
[u8:decode"Old Venturas Strip"] = { x = 2393.200684, y = 2041.559448, z = 11.820300},
[u8:decode"Spinybed"] = { x = 2169.407715, y = 2795.919189, z = 11.820300},
[u8:decode"Angel Pine"] = { x = -2155.095215, y = -2460.377930, z = 30.851601},
[u8:decode"СТО [LS]"] = { x = 854.575928, y = -605.205322, z = 18.421801},
[u8:decode"СТО [SF]"] = { x = -1799.868042, y = 1200.299316, z = 25.119400},
[u8:decode"СТО [LV]"] = { x = 1658.380371, y = 2200.350342, z = 10.820300},
[u8:decode"Гараж ЛС"] = { x = 1636.659180, y = -1525.564209, z = 13.306700},
[u8:decode"Гараж СФ"] = { x = -1979.227905, y = 436.112000, z = 25.910801},
[u8:decode"Гараж ЛВ"] = { x = 1447.295410, y = 2370.614990, z = 10.528000},
[u8:decode"Соревнования Гонки"] = { x = 1286.696167, y = -1329.237183, z = 13.554400},
[u8:decode"Соревнования Страйкбол"] = { x = 2704.779053, y = -1701.145874, z = 11.843800},
} -- by Serhiy_Rubin
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
repeat wait(0) until sampGetCurrentServerName() ~= 'SA-MP'
repeat
wait(0)
for id = 0, 2303 do
if sampTextdrawIsExists(id) and sampTextdrawGetString(id):find('Samp%-Rp.Ru') then
samp_rp = true
end
end
until samp_rp ~= nil
_, my_id = sampGetPlayerIdByCharHandle(PLAYER_PED)
my_name = sampGetPlayerNickname(my_id)
server = sampGetCurrentServerName():gsub('|', '')
server = (server:find('02') and 'Two' or (server:find('Revolution') and 'Revolution' or (server:find('Legacy') and 'Legacy' or (server:find('Classic') and 'Classic' or ''))))
if server == '' then thisScript():unload() end
AdressConfig = string.format("%s\\moonloader\\config" , getGameDirectory())
AdressFolder = string.format("%s\\moonloader\\config\\GhettoMate\\%s\\%s", getGameDirectory(), server, my_name)
if not doesDirectoryExist(AdressConfig) then createDirectory(AdressConfig) end
if not doesDirectoryExist(AdressFolder) then createDirectory(AdressFolder) end
directIni = string.format("GhettoMate\\%s\\%s\\GhettoMate.ini", server, my_name)
directIni2 = string.format("GhettoMate\\%s\\%s\\GhettoMateMoney.ini", server, my_name)
directIni3 = string.format("GhettoMate\\%s\\GhettoMateTime.ini", server)
directIni4 = string.format("GhettoMate\\%s\\%s\\GhettoMateSettings.ini", server, my_name)
sampRegisterChatCommand("lhud", cmd_hud)
sampRegisterChatCommand("gm", cmd_menu)
sampRegisterChatCommand("mohud", cmd_MOhud)
sampRegisterChatCommand("gfind", cmd_sucher)
sampRegisterChatCommand("drugs", cmd_usedrugs)
Wait = lua_thread.create_suspended(Waiting)
MOWait = lua_thread.create_suspended(MOWaiting)
Wait2 = lua_thread.create_suspended(Waiting2)
MOWait2 = lua_thread.create_suspended(MOWaiting2)
DrugsWait = lua_thread.create_suspended(DrugsWaiting)
UseDrugsWait = lua_thread.create_suspended(UseDrugsWaiting)
MONotifyWait = lua_thread.create_suspended(MONotifyWaiting)
GunWait = lua_thread.create_suspended(GunWaiting)
soundManager.loadSound("message_sms")
soundManager.loadSound("message_news")
soundManager.loadSound("message_tip")
soundManager.loadSound("message_alarm")
soundManager.loadSound("message_sos")
GhettoMateName = string.format('LarekName')
if ini[GhettoMateName] == nil then
ini = inicfg.load({
[GhettoMateName] = {
Name1 = u8:decode"Деревня 1",
Name2 = u8:decode"Деревня 2",
Name3 = u8:decode"Вайнвуд",
Name4 = u8:decode"Гетто",
Name5 = u8:decode"Чиллиад",
Name6 = u8:decode"Квартиры СФ",
Name7 = u8:decode"СФ Топ",
Name8 = u8:decode"Около фермы",
Name9 = u8:decode"СФа",
Name10 = u8:decode"СФ Бот",
Name11 = u8:decode"Форт Карсон",
Name12 = u8:decode"СТО ЛВ",
Name13 = u8:decode"ЛВПД",
Name14 = u8:decode"МО ЛВ",
Name15 = u8:decode"ЛВ Ньюс",
Name16 = u8:decode"АММО ЛВ"
}
}, directIni)
inicfg.save(ini, directIni)
end
GhettoMateConfig = string.format('Config')
if ini[GhettoMateConfig] == nil then
ini = inicfg.load({
[GhettoMateConfig] = {
time = tonumber(0),
X = tonumber(resX/2),
Y = tonumber(resY/2),
X_MO = tonumber(resX/2),
Y_MO = tonumber(resX/2),
timeCalibration = false,
price_Deagle = tonumber(200),
price_M4 = tonumber(200),
price_Shotgun = tonumber(200),
price_SDpistol = tonumber(100),
price_AK47 = tonumber(200),
price_SMG = tonumber(150),
price_Rifle = tonumber(300),
price_Drugs = tonumber(30),
my_mats = tonumber(0),
my_drugs = tonumber(0)
}
}, directIni)
inicfg.save(ini, directIni)
end
GunList = string.format('GunList')
if ini[GunList] == nil then
ini = inicfg.load({
[GunList] = {
gun1 = tonumber(0),
pt1 = tonumber(30),
gun2 = tonumber(1),
pt2 = tonumber(160),
gun3 = tonumber(2),
pt3 = tonumber(10)
}
}, directIni)
inicfg.save(ini, directIni)
end
GhettoMateMoney = string.format('Larek')
if ini2[GhettoMateMoney] == nil then
ini2 = inicfg.load({
[GhettoMateMoney] = {
money = tonumber(0),
count = tonumber(0),
count1 = tonumber(0),
count2 = tonumber(0),
count3 = tonumber(0),
count4 = tonumber(0)
}
}, directIni2)
inicfg.save(ini2, directIni2)
end
GhettoMateMO = string.format('MO')
if ini2[GhettoMateMO] == nil then
ini2 = inicfg.load({
[GhettoMateMO] = {
mats = tonumber(0),
cars = tonumber(0)
}
}, directIni2)
inicfg.save(ini2, directIni2)
end
GhettoMateCapture = string.format('Capture')
if ini2[GhettoMateCapture] == nil then
ini2 = inicfg.load({
[GhettoMateCapture] = {
kill = tonumber(0),
death = tonumber(0),
grove_kill = tonumber(0),
ballas_kill = tonumber(0),
aztecas_kill = tonumber(0),
vagos_kill = tonumber(0),
rifa_kill = tonumber(0),
gun_fist = tonumber(0),
gun_m4 = tonumber(0),
gun_deagle = tonumber(0),
gun_ak47 = tonumber(0),
gun_sdpistol = tonumber(0),
gun_shotgun = tonumber(0),
gun_rifle = tonumber(0),
gun_bat = tonumber(0),
gun_ost = tonumber(0),
CaptureKill = tonumber(0),
CaptureDeath = tonumber(0)
}
}, directIni2)
inicfg.save(ini2, directIni2)
end
GhettoMateTime = string.format('LarekTime')
if ini3[GhettoMateTime] == nil then
ini3 = inicfg.load({
[GhettoMateTime] = {
time1 = u8:decode"Неизвестно",
time2 = u8:decode"Неизвестно",
time3 = u8:decode"Неизвестно",
time4 = u8:decode"Неизвестно",
time5 = u8:decode"Неизвестно",
time6 = u8:decode"Неизвестно",
time7 = u8:decode"Неизвестно",
time8 = u8:decode"Неизвестно",
time9 = u8:decode"Неизвестно",
time10 = u8:decode"Неизвестно",
time11 = u8:decode"Неизвестно",
time12 = u8:decode"Неизвестно",
time13 = u8:decode"Неизвестно",
time14 = u8:decode"Неизвестно",
time15 = u8:decode"Неизвестно",
time16 = u8:decode"Неизвестно"
}
}, directIni3)
inicfg.save(ini3, directIni3)
end
GhettoMateSeconds = string.format('LarekSeconds')
if ini3[GhettoMateSeconds] == nil then
ini3 = inicfg.load({
[GhettoMateSeconds] = {
time1 = tonumber(0),
time2 = tonumber(0),
time3 = tonumber(0),
time4 = tonumber(0),
time5 = tonumber(0),
time6 = tonumber(0),
time7 = tonumber(0),
time8 = tonumber(0),
time9 = tonumber(0),
time10 = tonumber(0),
time11 = tonumber(0),
time12 = tonumber(0),
time13 = tonumber(0),
time14 = tonumber(0),
time15 = tonumber(0),
time16 = tonumber(0)
}
}, directIni3)
inicfg.save(ini3, directIni3)
end
TimeMO = string.format('TimeMO')
if ini3[TimeMO] == nil then
ini3 = inicfg.load({
[TimeMO] = {
time1 = u8:decode"Неизвестно",
time2 = u8:decode"Неизвестно",
time3 = u8:decode"Неизвестно"
}
}, directIni3)
inicfg.save(ini3, directIni3)
end
SecondsMO = string.format('SecondsMO')
if ini3[SecondsMO] == nil then
ini3 = inicfg.load({
[SecondsMO] = {
time1 = tonumber(0),
time2 = tonumber(0),
time3 = tonumber(0)
}
}, directIni3)
inicfg.save(ini3, directIni3)
end
GhettoMateSettings = string.format('Settings')
if ini4[GhettoMateSettings] == nil then
ini4 = inicfg.load({
[GhettoMateSettings] = {
NotifyLarek = true,
TimerNotifyLarek = tonumber(15),
NotifyUgonyala = true,
AnimUgonyala = true,
IdAnimUgonyala = tonumber(14),
NotifyFind = true,
NotifyDrugs = true,
NotifyAutoGetGuns = true,
TimerNotifyMO = tonumber(15),
NotifyMO = true,
Health = 120,
Sounds = false,
NotifyCapture = true
}
}, directIni4)
inicfg.save(ini4, directIni4)
end
hotkey = string.format('hotkey')
if ini4[hotkey] == nil then
ini4 = inicfg.load({
[hotkey] = {
bindDrugs="[107]",
bindAutoGetGuns="[106]",
bindSeller="[109]"
}
}, directIni4)
inicfg.save(ini4, directIni4)
end
ActiveDrugs = {
v = decodeJson(ini4.hotkey.bindDrugs)
}
ActiveAutoGetGuns = {
v = decodeJson(ini4.hotkey.bindAutoGetGuns)
}
ActiveSeller = {
v = decodeJson(ini4.hotkey.bindSeller)
}
bindDrugs = rkeys.registerHotKey(ActiveDrugs.v, true, cmd_usedrugs)
bindAutoGetGuns = rkeys.registerHotKey(ActiveAutoGetGuns.v, true, cmd_autogetguns)
bindSeller = rkeys.registerHotKey(ActiveSeller.v, true, cmd_seller)
ini = inicfg.load(GhettoMateConfig, directIni)
ini2 = inicfg.load(GhettoMateMoney, directIni2)
ini3 = inicfg.load(GhettoMateTime, directIni3)
ini4 = inicfg.load(GhettoMateSettings, directIni4)
imgui.initBuffers()
checkUpdates()
sampAddChatMessage(u8:decode" [GhettoMate] {FFFFFF}Успешно загрузился!", main_color)
if not ini[GhettoMateConfig].timeCalibration then
sampAddChatMessage(u8:decode" [GhettoMate] {FFFFFF}Откалибруйте время в /gm", main_color)
end
imgui.ApplyCustomStyle()
imgui.Process = false
imgui.ShowCursor = false
while true do
wait(250)
paused = isGamePaused()
GhettoMateConfig = string.format('Config')
ini = inicfg.load(GhettoMateConfig, directIni)
hour = os.date("%H") + ini[GhettoMateConfig].time
hour2 = os.date("%H")
if hour == -1 then
hour = 23
end
if hour == -2 then
hour = 22
end
if hour == -3 then
hour = 21
end
if hour == -4 then
hour = 20
end
if hour == -5 then
hour = 23
end
if hour == -6 then
hour = 19
end
minute = os.date("%M")
second = os.date("%S")
totalSeconds = hour * 3600 + minute * 60 + second
Timer()
TimerMO()
TimerM()
TimerMMO()
Refresh()
RefreshMO()
AfterDeathReload()
LarekChecker()
MOChecker()
if Find then
Suchen()
end
DrugsTimer = UseDrugsTimer - os.clock()
--UGONYALA--
ugtimer = ugontimer - os.clock()
charinstream = getAllChars()
carsinstream = getAllVehicles()
for i, car in ipairs(carsinstream) do
for modelid = 400, 611 do
if vehnames[modelid-399] ~= "1" then
if isCarModel(car, modelid) then
result, vehId = sampGetVehicleIdByCarHandle(car)
driverNickname = nil
isDriver = false
for j, ped in ipairs(charinstream) do
if isCharInCar(ped, car) then
isDriver, driverId= sampGetPlayerIdByCharHandle(ped)
driverNickname = sampGetPlayerNickname(driverId)
end
end
posX, posY, posZ = getCarCoordinates(car)
if getCarDoorLockStatus(car) == 2 then
isRepeat = false
isRepeatTwo = false
for k, vehh in ipairs(vehlist) do
if vehId == vehh[5] then
isRepeat = true
isRepeatTwo = true
vehh[2] = posX
vehh[3] = posY
vehh[4] = posZ
if driverNickname ~= my_name then
vehh[6] = driverNickname
end
vehh[7] = os.clock()
if carname then
if string.lower(carname) == string.lower(vehnames[modelid-399]) then
removeMarks()
mark = addSpriteBlipForCoord(vehh[2],vehh[3],vehh[4],55)
ugcheckpoint = createCheckpoint(1, vehh[2],vehh[3],vehh[4],vehh[2],vehh[3],vehh[4], 1)
search = true
--if ini4[GhettoMateSettings].NotifyUgonyala then
-- if isDriver then
--sampAddChatMessage(string.format(u8:decode" [GhettoMate] {FFFFFF}Транспорт {FF0000}\"%s\" {FFFFFF}обнаружен! За рулем: {FF0000}%s", vehnames[modelid-399], driverNickname), main_color)
-- else
--sampAddChatMessage(string.format(u8:decode" [GhettoMate] {FFFFFF}Транспорт {FF0000}\"%s\" {FFFFFF}обнаружен!", vehnames[modelid-399]), main_color)
-- end
-- if ini4[GhettoMateSettings].Sounds then
--soundManager.playSound("message_tip")
-- end
--end
--[[if marks then
for i, mark in ipairs(marks) do
removeBlip(mark)
end
end
if ugcheckpoints then
for i, ugcheckpoint in ipairs(ugcheckpoints) do
deleteCheckpoint(ugcheckpoint)
end
end]]
end
end
end
end
if not isRepeat and not search then
table.insert(vehlist, {vehnames[modelid-399], posX, posY, posZ, vehId, driverNickname, os.clock()})
end
if not isRepeatTwo and search then
table.insert(vehlist, {vehnames[modelid-399], posX, posY, posZ, vehId, driverNickname, os.clock()})
if string.lower(carname) == string.lower(vehnames[modelid-399]) then
if ini4[GhettoMateSettings].NotifyUgonyala then
if isDriver then
sampAddChatMessage(string.format(u8:decode" [GhettoMate] {FF0000}\"%s\" {FFFFFF}обнаружен! За рулем: {FF0000}%s", vehnames[modelid-399], driverNickname), main_color)
else
sampAddChatMessage(string.format(u8:decode" [GhettoMate] {FF0000}\"%s\" {FFFFFF}обнаружен!", vehnames[modelid-399]), main_color)
end
if ini4[GhettoMateSettings].Sounds then
soundManager.playSound("message_tip")
end
end
end
end
else
for k, vehh in ipairs(vehlist) do
if vehId == vehh[5] then
vehh[2] = posX
vehh[3] = posY
vehh[4] = posZ
if driverNickname ~= my_name then
vehh[6] = driverNickname
end
vehh[7] = os.clock()
if carname then
if string.lower(carname) == string.lower(vehnames[modelid-399]) and driverNickname ~= my_name then
removeMarks()
mark = addSpriteBlipForCoord(vehh[2],vehh[3],vehh[4],55)
ugcheckpoint = createCheckpoint(1, vehh[2],vehh[3],vehh[4],vehh[2],vehh[3],vehh[4], 1)
--if ini4[GhettoMateSettings].NotifyUgonyala then
-- if isDriver then
-- sampAddChatMessage(string.format(u8:decode" [GhettoMate] {FFFFFF}Открытый {FF0000}\"%s\" {FFFFFF}обнаружен! За рулем: {FF0000}%s", vehnames[modelid-399], driverNickname), main_color)
-- else
-- sampAddChatMessage(string.format(u8:decode" [GhettoMate] {FFFFFF}Открытый {FF0000}\"%s\" {FFFFFF}обнаружен!", vehnames[modelid-399]), main_color)
-- end
-- if ini4[GhettoMateSettings].Sounds then
--soundManager.playSound("message_tip")
-- end
--end
--[[if marks then
for i, mark in ipairs(marks) do
removeBlip(mark)
end
end
if ugcheckpoints then
for i, ugcheckpoint in ipairs(ugcheckpoints) do
deleteCheckpoint(ugcheckpoint)
end
end]]
end
end
end
end
end
end
end
end
end
if sampIsChatVisible() and sampGetChatInputText() == "/q" and wasKeyPressed(13) then off = 1 end
if not sampIsScoreboardOpen() and sampIsChatVisible() and not isKeyDown(116) and not isKeyDown(121) and off == nil then
if ugtimer > 0 then
sound = true
elseif sound then
if ini4[GhettoMateSettings].NotifyUgonyala then
sampAddChatMessage(u8:decode" [GhettoMate] {FFFFFF}Угон снова доступен", main_color)
if ini4[GhettoMateSettings].Sounds then
soundManager.playSound("message_tip")
end
sound = false
end
end
end
end
end
function cmd_hud(arg)
larek_window_state.v = not larek_window_state.v
if not larek_window_state.v and not mo_window_state.v and not main_window_state.v then
imgui.Process = false
end
if larek_window_state.v then
imgui.Process = true
end
end
function cmd_MOhud(arg)
mo_window_state.v = not mo_window_state.v
if not larek_window_state.v and not mo_window_state.v and not main_window_state.v then
imgui.Process = false
end
if mo_window_state.v then
imgui.Process = true
end
end
function cmd_menu()
main_window_state.v = not main_window_state.v
if not larek_window_state.v and not mo_window_state.v and not main_window_state.v then
imgui.Process = false
end
if main_window_state.v then
imgui.Process = true
end
end
function cmd_seller()
GunWait:run(ini.GunList.gun1, ini.GunList.gun2, ini.GunList.gun3, ini.GunList.pt1, ini.GunList.pt2, ini.GunList.pt3)
end
function imgui.initBuffers()
imgui.settingsTab = 1
imgui.LarekName1 = imgui.ImBuffer(u8(ini[GhettoMateName].Name1), 256)
imgui.LarekName2 = imgui.ImBuffer(u8(ini[GhettoMateName].Name2), 256)
imgui.LarekName3 = imgui.ImBuffer(u8(ini[GhettoMateName].Name3), 256)
imgui.LarekName4 = imgui.ImBuffer(u8(ini[GhettoMateName].Name4), 256)
imgui.LarekName5 = imgui.ImBuffer(u8(ini[GhettoMateName].Name5), 256)
imgui.LarekName6 = imgui.ImBuffer(u8(ini[GhettoMateName].Name6), 256)
imgui.LarekName7 = imgui.ImBuffer(u8(ini[GhettoMateName].Name7), 256)
imgui.LarekName8 = imgui.ImBuffer(u8(ini[GhettoMateName].Name8), 256)
imgui.LarekName9 = imgui.ImBuffer(u8(ini[GhettoMateName].Name9), 256)
imgui.LarekName10 = imgui.ImBuffer(u8(ini[GhettoMateName].Name10), 256)
imgui.LarekName11 = imgui.ImBuffer(u8(ini[GhettoMateName].Name11), 256)
imgui.LarekName12 = imgui.ImBuffer(u8(ini[GhettoMateName].Name12), 256)
imgui.LarekName13 = imgui.ImBuffer(u8(ini[GhettoMateName].Name13), 256)
imgui.LarekName14 = imgui.ImBuffer(u8(ini[GhettoMateName].Name14), 256)
imgui.LarekName15 = imgui.ImBuffer(u8(ini[GhettoMateName].Name15), 256)
imgui.LarekName16 = imgui.ImBuffer(u8(ini[GhettoMateName].Name16), 256)
imgui.TimerNotifyMO = imgui.ImInt(ini4[GhettoMateSettings].TimerNotifyMO)
imgui.Health = imgui.ImInt(ini4[GhettoMateSettings].Health)
imgui.IdAnimUgonyala = imgui.ImInt(ini4[GhettoMateSettings].IdAnimUgonyala)
imgui.TimerNotifyLarek = imgui.ImInt(ini4[GhettoMateSettings].TimerNotifyLarek)
imgui.price_Drugs = imgui.ImInt(ini[GhettoMateConfig].price_Drugs)
imgui.price_Deagle = imgui.ImInt(ini[GhettoMateConfig].price_Deagle)
imgui.price_M4 = imgui.ImInt(ini[GhettoMateConfig].price_M4)
imgui.price_Shotgun = imgui.ImInt(ini[GhettoMateConfig].price_Shotgun)
imgui.price_SDpistol = imgui.ImInt(ini[GhettoMateConfig].price_SDpistol)
imgui.price_AK47 = imgui.ImInt(ini[GhettoMateConfig].price_AK47)
imgui.price_SMG = imgui.ImInt(ini[GhettoMateConfig].price_SMG)
imgui.price_Rifle = imgui.ImInt(ini[GhettoMateConfig].price_Rifle)
combo_select1 = imgui.ImInt(ini.GunList.gun1)
combo_select2 = imgui.ImInt(ini.GunList.gun2)
combo_select3 = imgui.ImInt(ini.GunList.gun3)
imgui.pt1 = imgui.ImInt(ini.GunList.pt1)
imgui.pt2 = imgui.ImInt(ini.GunList.pt2)
imgui.pt3 = imgui.ImInt(ini.GunList.pt3)
end
function imgui.OnDrawFrame()
if main_window_state.v then
local resX, resY = getScreenResolution()
imgui.SetNextWindowSize(vec(212, 190))
imgui.SetNextWindowPos(vec(200, 118), 2)
imgui.ShowCursor = true
imgui.Begin('GhettoMate ', main_window_state, imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoResize + imgui.WindowFlags.NoScrollbar)
imgui.BeginChild('top', vec(210, 9), false)
imgui.BeginChild("##inp101", vec(32.5,9), false)
if imgui.Selectable(' Параметры', imgui.settingsTab == 1) then
imgui.settingsTab = 1
end
imgui.EndChild()
imgui.SameLine()
imgui.BeginChild("##inp102",vec(32.5, 9), false)
if imgui.Selectable(' Larek', imgui.settingsTab == 2) then
imgui.settingsTab = 2
end
imgui.EndChild()
imgui.SameLine()
imgui.BeginChild("##inp103",vec(32.5, 9), false)
if imgui.Selectable(' MO', imgui.settingsTab == 3) then
imgui.settingsTab = 3
end
imgui.EndChild()
imgui.SameLine()
imgui.BeginChild("##inp104",vec(32.5, 9), false)
if imgui.Selectable(' Seller', imgui.settingsTab == 4) then
imgui.settingsTab = 4
end
imgui.EndChild()
imgui.SameLine()
imgui.BeginChild("##inp105",vec(32.5, 9), false)
if imgui.Selectable(' Capture', imgui.settingsTab == 5) then
imgui.settingsTab = 5
end
imgui.EndChild()
imgui.SameLine()
imgui.BeginChild("##inp107",vec(32.5, 9), false)
if imgui.Selectable(' Информация', imgui.settingsTab == 6) then
imgui.settingsTab = 6
end
imgui.EndChild()
imgui.EndChild()
imgui.BeginChild('bottom', vec(205, 160), true)
if imgui.settingsTab == 1 then
imgui.initBuffers()
if imgui.Checkbox("Уведомления от Larek. Таймер уведомлений: ", imgui.ImBool(ini4[GhettoMateSettings].NotifyLarek)) then
ini4[GhettoMateSettings].NotifyLarek = not ini4[GhettoMateSettings].NotifyLarek
inicfg.save(ini4, directIni4)
end
imgui.SameLine()
imgui.PushItemWidth(toScreenX(165/5))
if imgui.InputInt("##inp1", imgui.TimerNotifyLarek, 1, 1) then
if imgui.TimerNotifyLarek.v ~= nil and imgui.TimerNotifyLarek.v ~= "" and imgui.TimerNotifyLarek.v >= 0 and imgui.TimerNotifyLarek.v <= 1800 then
ini4[GhettoMateSettings].TimerNotifyLarek = imgui.TimerNotifyLarek.v
inicfg.save(ini4, directIni4)
end
end
imgui.PopItemWidth()
if imgui.Checkbox("Уведомления от Ugonyala", imgui.ImBool(ini4[GhettoMateSettings].NotifyUgonyala)) then
ini4[GhettoMateSettings].NotifyUgonyala = not ini4[GhettoMateSettings].NotifyUgonyala
inicfg.save(ini4, directIni4)
end
if imgui.Checkbox("Анимация угона:", imgui.ImBool(ini4[GhettoMateSettings].AnimUgonyala)) then
ini4[GhettoMateSettings].AnimUgonyala = not ini4[GhettoMateSettings].AnimUgonyala
inicfg.save(ini4, directIni4)
end
imgui.SameLine()
imgui.PushItemWidth(toScreenX(165/5))
if imgui.InputInt("##inp2", imgui.IdAnimUgonyala, 1, 1) then
if imgui.IdAnimUgonyala.v ~= nil and imgui.IdAnimUgonyala.v ~= "" and imgui.IdAnimUgonyala.v >= 0 and imgui.IdAnimUgonyala.v <= 45 then
ini4[GhettoMateSettings].IdAnimUgonyala = imgui.IdAnimUgonyala.v
inicfg.save(ini4, directIni4)
end
end
imgui.PopItemWidth()
if imgui.Checkbox("Уведомления от поиска игрока", imgui.ImBool(ini4[GhettoMateSettings].NotifyFind)) then
ini4[GhettoMateSettings].NotifyFind = not ini4[GhettoMateSettings].NotifyFind
inicfg.save(ini4, directIni4)
end
if imgui.Checkbox("Уведомления от Drugs. Максимальное количество ХП: ", imgui.ImBool(ini4[GhettoMateSettings].NotifyDrugs)) then
ini4[GhettoMateSettings].NotifyDrugs = not ini4[GhettoMateSettings].NotifyDrugs
inicfg.save(ini4, directIni4)
end
imgui.SameLine()
imgui.PushItemWidth(toScreenX(15))
if imgui.InputInt("##inp3", imgui.Health, 0, 1) then
if imgui.Health.v ~= nil and imgui.Health.v ~= "" then
ini4[GhettoMateSettings].Health = imgui.Health.v
inicfg.save(ini4, directIni4)
end
end
imgui.PopItemWidth()