· 5 years ago · Jun 13, 2020, 10:54 PM
1<< dumped by Safa - Ich liebe nur Ensar & Ilhan >>
2
3NOTE: Dieser Release ist aus purer Emotion & Hass entstanden da mein PC runtergefahren wurde :x
4
5
6
7
8
9
10#IfWinActive, GTA:SA:MP
11#SingleInstance, force
12#Persistent
13#NoEnv
14SetWorkingDir, %A_ScriptDir%
15if (!A_IsAdmin) {
16try {
17Run *RunAs "%A_ScriptFullPath%"
18} catch {
19MsgBox, 48, Administratorenrechte, Der Keybinder benötigt Administratorenrechte und wird nun beendet. Führe den Keybinder als Administrator aus!, 5
20ExitApp
21}
22}
23global ERROR_OK := 0
24global ERROR_PROCESS_NOT_FOUND := 1
25global ERROR_OPEN_PROCESS := 2
26global ERROR_INVALID_HANDLE := 3
27global ERROR_MODULE_NOT_FOUND := 4
28global ERROR_ENUM_PROCESS_MODULES := 5
29global ERROR_ZONE_NOT_FOUND := 6
30global ERROR_CITY_NOT_FOUND := 7
31global ERROR_READ_MEMORY := 8
32global ERROR_WRITE_MEMORY := 9
33global ERROR_ALLOC_MEMORY := 10
34global ERROR_FREE_MEMORY := 11
35global ERROR_WAIT_FOR_OBJECT := 12
36global ERROR_CREATE_THREAD := 13
37global ADDR_ZONECODE := 0xA49AD4
38global ADDR_POSITION_X := 0xB6F2E4
39global ADDR_POSITION_Y := 0xB6F2E8
40global ADDR_POSITION_Z := 0xB6F2EC
41global ADDR_CPED_PTR := 0xB6F5F0
42global ADDR_CPED_HPOFF := 0x540
43global ADDR_CPED_ARMOROFF := 0x548
44global ADDR_CPED_MONEY := 0x0B7CE54
45global ADDR_CPED_INTID := 0xA4ACE8
46global ADDR_CPED_SKINIDOFF := 0x22
47global ADDR_VEHICLE_PTR := 0xBA18FC
48global ADDR_VEHICLE_HPOFF := 0x4C0
49global ADDR_VEHICLE_DOORSTATE := 0x4F8
50global ADDR_VEHICLE_ENGINESTATE := 0x428
51global ADDR_VEHICLE_LIGHTSTATE := 0x584
52global ADDR_VEHICLE_MODEL := 0x22
53global ADDR_VEHICLE_TYPE := 0x590
54global ADDR_VEHICLE_DRIVER := 0x460
55global ADDR_VEHICLE_X := 0x44
56global ADDR_VEHICLE_Y := 0x48
57global ADDR_VEHICLE_Z := 0x4C
58global oAirplaneModels := [417, 425, 447, 460, 469, 476, 487, 488, 497, 511, 512, 513, 519, 520, 548, 553, 563, 577, 592, 593]
59global oBikeModels := [481,509,510]
60global ovehicleNames := ["Landstalker","Bravura","Buffalo","Linerunner","Perrenial","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus","Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Whoopee","BFInjection","Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie","Stallion","Rumpo","RCBandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley'sRCVan","Skimmer","PCJ-600","Faggio","Freeway","RCBaron","RCRaider","Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR-350","Walton","Regina","Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","NewsChopper","Rancher","FBIRancher","Virgo","Greenwood","Jetmax","Hotring","Sandking","BlistaCompact","PoliceMaverick","Boxvillde","Benson","Mesa","RCGoblin","HotringRacerA","HotringRacerB","BloodringBanger","Rancher","SuperGT","Elegant","Journey","Bike","MountainBike","Beagle","Cropduster","Stunt","Tanker","Roadtrain","Nebula","Majestic","Buccaneer","Shamal","hydra","FCR-900","NRG-500","HPV1000","CementTruck","TowTruck","Fortune","Cadrona","FBITruck","Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover","Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster","Monster","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RCTiger","Flash","Tahoma","Savanna","Bandito","FreightFlat","StreakCarriage","Kart","Mower","Dune","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","NewsVan","Tug","Trailer","Emperor","Wayfarer","Euros","Hotdog","Club","FreightBox","Trailer","Andromada","Dodo","RCCam","Launch","PoliceCar","PoliceCar","PoliceCar","PoliceRanger","Picador","S.W.A.T","Alpha","Phoenix","GlendaleShit","SadlerShit","Luggage","Luggage","Stairs","Boxville","Tiller","UtilityTrailer"]
61global oweaponNames := ["Fist","Brass Knuckles","Golf Club","Nightstick","Knife","Baseball Bat","Shovel","Pool Cue","Katana","Chainsaw","Purple Dildo","Dildo","Vibrator","Silver Vibrator","Flowers","Cane","Grenade","Tear Gas","Molotov Cocktail", "", "", "", "9mm","Silenced 9mm","Desert Eagle","Shotgun","Sawnoff Shotgun","Combat Shotgun","Micro SMG/Uzi","MP5","AK-47","M4","Tec-9","Country Rifle","Sniper Rifle","RPG","HS Rocket","Flamethrower","Minigun","Satchel Charge","Detonator","Spraycan","Fire Extinguisher","Camera","Night Vis Goggles","Thermal Goggles","Parachute"]
62global oradiostationNames := ["Playback FM", "K Rose", "K-DST", "Bounce FM", "SF-UR", "Radio Los Santos", "Radio X", "CSR 103.9", "K-JAH West", "Master Sounds 98.3", "WCTR Talk Radio", "User Track Player", "Radio Off"]
63global oweatherNames := ["EXTRASUNNY_LA", "SUNNY_LA", "EXTRASUNNY_SMOG_LA", "SUNNY_SMOG_LA", "CLOUDY_LA", "SUNNY_SF", "EXTRASUNNY_SF", "CLOUDY_SF", "RAINY_SF", "FOGGY_SF", "SUNNY_VEGAS", "EXTRASUNNY_VEGAS", "CLOUDY_VEGAS", "EXTRASUNNY_COUNTRYSIDE", "SUNNY_COUNTRYSIDE", "CLOUDY_COUNTRYSIDE", "RAINY_COUNTRYSIDE", "EXTRASUNNY_DESERT", "SUNNY_DESERT", "SANDSTORM_DESERT", "UNDERWATER", "EXTRACOLOURS_1", "EXTRACOLOURS_2"]
64global ADDR_SAMP_INCHAT_PTR := 0x21a10c
65global ADDR_SAMP_INCHAT_PTR_OFF := 0x55
66global ADDR_SAMP_USERNAME := 0x219A6F
67global FUNC_SAMP_SENDCMD := 0x65c60
68global FUNC_SAMP_SENDSAY := 0x57f0
69global FUNC_SAMP_ADDTOCHATWND := 0x64520
70global ADDR_SAMP_CHATMSG_PTR := 0x21a0e4
71global FUNC_SAMP_SHOWGAMETEXT := 0x9c2c0
72global FUNC_SAMP_PLAYAUDIOSTR := 0x62da0
73global FUNC_SAMP_STOPAUDIOSTR := 0x629a0
74global DIALOG_STYLE_MSGBOX := 0
75global DIALOG_STYLE_INPUT := 1
76global DIALOG_STYLE_LIST := 2
77global DIALOG_STYLE_PASSWORD := 3
78global DIALOG_STYLE_TABLIST := 4
79global DIALOG_STYLE_TABLIST_HEADERS := 5
80global SAMP_DIALOG_STRUCT_PTR := 0x21A0B8
81global SAMP_DIALOG_PTR1_OFFSET := 0x1C
82global SAMP_DIALOG_LINES_OFFSET := 0x44C
83global SAMP_DIALOG_INDEX_OFFSET := 0x443
84global SAMP_DIALOG_BUTTON_HOVERING_OFFSET := 0x465
85global SAMP_DIALOG_BUTTON_CLICKED_OFFSET := 0x466
86global SAMP_DIALOG_PTR2_OFFSET := 0x20
87global SAMP_DIALOG_LINECOUNT_OFFSET := 0x150
88global SAMP_DIALOG_OPEN_OFFSET := 0x28
89global SAMP_DIALOG_STYLE_OFFSET := 0x2C
90global SAMP_DIALOG_ID_OFFSET := 0x30
91global SAMP_DIALOG_TEXT_PTR_OFFSET := 0x34
92global SAMP_DIALOG_CAPTION_OFFSET := 0x40
93global FUNC_SAMP_SHOWDIALOG := 0x6B9C0
94global FUNC_SAMP_CLOSEDIALOG := 0x6C040
95global FUNC_UPDATESCOREBOARD := 0x8A10
96global SAMP_INFO_OFFSET := 0x21A0F8
97global ADDR_SAMP_CRASHREPORT := 0x5CF2C
98global SAMP_PPOOLS_OFFSET := 0x3CD
99global SAMP_PPOOL_PLAYER_OFFSET := 0x18
100global SAMP_SLOCALPLAYERID_OFFSET := 0x4
101global SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET := 0x1A
102global SAMP_SZLOCALPLAYERNAME_OFFSET := 0xA
103global SAMP_PSZLOCALPLAYERNAME_OFFSET := 0xA
104global SAMP_PREMOTEPLAYER_OFFSET := 0x2E
105global SAMP_ISTRLENNAME___OFFSET := 0x1C
106global SAMP_SZPLAYERNAME_OFFSET := 0xC
107global SAMP_PSZPLAYERNAME_OFFSET := 0xC
108global SAMP_ILOCALPLAYERPING_OFFSET := 0x26
109global SAMP_ILOCALPLAYERSCORE_OFFSET := 0x2A
110global SAMP_IPING_OFFSET := 0x28
111global SAMP_ISCORE_OFFSET := 0x24
112global SAMP_ISNPC_OFFSET := 0x4
113global SAMP_PLAYER_MAX := 1004
114global CheckpointCheck := 0xC7DEEA
115global rmaddrs := [0xC7DEC8, 0xC7DECC, 0xC7DED0]
116global SIZE_SAMP_CHATMSG := 0xFC
117global hGTA := 0x0
118global dwGTAPID := 0x0
119global dwSAMP := 0x0
120global pMemory := 0x0
121global pParam1 := 0x0
122global pParam2 := 0x0
123global pParam3 := 0x0
124global pParam4 := 0x0
125global pParam5 := 0x0
126global pInjectFunc := 0x0
127global nZone := 1
128global nCity := 1
129global bInitZaC := 0
130global iRefreshScoreboard := 0
131global oScoreboardData := ""
132global iRefreshHandles := 0
133global iUpdateTick := 2500
134IsSAMPAvailable() {
135if(!checkHandles())
136return false
137dwChatInfo := readDWORD(hGTA, dwSAMP + ADDR_SAMP_CHATMSG_PTR)
138if(dwChatInfo == 0 || dwChatInfo == "ERROR")
139{
140return false
141}
142else
143{
144return true
145}
146}
147isInChat() {
148if(!checkHandles())
149return -1
150dwPtr := dwSAMP + ADDR_SAMP_INCHAT_PTR
151dwAddress := readDWORD(hGTA, dwPtr) + ADDR_SAMP_INCHAT_PTR_OFF
152if(ErrorLevel) {
153ErrorLevel := ERROR_READ_MEMORY
154return -1
155}
156dwInChat := readDWORD(hGTA, dwAddress)
157if(ErrorLevel) {
158ErrorLevel := ERROR_READ_MEMORY
159return -1
160}
161ErrorLevel := ERROR_OK
162if(dwInChat > 0) {
163return true
164} else {
165return false
166}
167}
168getUsername() {
169if(!checkHandles())
170return ""
171dwAddress := dwSAMP + ADDR_SAMP_USERNAME
172sUsername := readString(hGTA, dwAddress, 25)
173if(ErrorLevel) {
174ErrorLevel := ERROR_READ_MEMORY
175return ""
176}
177ErrorLevel := ERROR_OK
178return sUsername
179}
180getId() {
181s:=getUsername()
182return getPlayerIdByName(s)
183}
184SendChat(wText) {
185wText := "" wText
186if(!checkHandles())
187return false
188dwFunc:=0
189if(SubStr(wText, 1, 1) == "/") {
190dwFunc := dwSAMP + FUNC_SAMP_SENDCMD
191} else {
192dwFunc := dwSAMP + FUNC_SAMP_SENDSAY
193}
194callWithParams(hGTA, dwFunc, [["s", wText]], false)
195ErrorLevel := ERROR_OK
196return true
197}
198addChatMessage(wText) {
199if(!checkHandles())
200return false
201dwFunc := dwSAMP + FUNC_SAMP_ADDTOCHATWND
202dwChatInfo := readDWORD(hGTA, dwSAMP + ADDR_SAMP_CHATMSG_PTR)
203if(ErrorLevel) {
204ErrorLevel := ERROR_READ_MEMORY
205return false
206}
207callWithParams(hGTA, dwFunc, [["p", dwChatInfo], ["s", wText]], true)
208SetChatLineRed(0, 0xFF)
209SetChatLineGreen(0, 0xFF)
210SetChatLineBlue(0, 0x00)
211ErrorLevel := ERROR_OK
212return true
213}
214showGameText(wText, dwTime, dwSize) {
215wText := "" wText
216dwTime += 0
217dwTime := Floor(dwTime)
218dwSize += 0
219dwSize := Floor(dwSize)
220if(!checkHandles())
221return false
222dwFunc := dwSAMP + FUNC_SAMP_SHOWGAMETEXT
223callWithParams(hGTA, dwFunc, [["s", wText], ["i", dwTime], ["i", dwSize]], false)
224ErrorLevel := ERROR_OK
225return true
226}
227playAudioStream(wUrl) {
228wUrl := "" wUrl
229if(!checkHandles())
230return false
231dwFunc := dwSAMP + FUNC_SAMP_PLAYAUDIOSTR
232patchRadio()
233callWithParams(hGTA, dwFunc, [["s", wUrl], ["i", 0], ["i", 0], ["i", 0], ["i", 0], ["i", 0]], false)
234unPatchRadio()
235ErrorLevel := ERROR_OK
236return true
237}
238stopAudioStream() {
239if(!checkHandles())
240return false
241dwFunc := dwSAMP + FUNC_SAMP_STOPAUDIOSTR
242patchRadio()
243callWithParams(hGTA, dwFunc, [["i", 1]], false)
244unPatchRadio()
245ErrorLevel := ERROR_OK
246return true
247}
248patchRadio()
249{
250if(!checkHandles())
251return false
252VarSetCapacity(nop, 4, 0)
253NumPut(0x90909090,nop,0,"UInt")
254dwFunc := dwSAMP + FUNC_SAMP_PLAYAUDIOSTR
255writeRaw(hGTA, dwFunc, &nop, 4)
256writeRaw(hGTA, dwFunc+4, &nop, 1)
257dwFunc := dwSAMP + FUNC_SAMP_STOPAUDIOSTR
258writeRaw(hGTA, dwFunc, &nop, 4)
259writeRaw(hGTA, dwFunc+4, &nop, 1)
260return true
261}
262unPatchRadio()
263{
264if(!checkHandles())
265return false
266VarSetCapacity(old, 4, 0)
267dwFunc := dwSAMP + FUNC_SAMP_PLAYAUDIOSTR
268NumPut(0x74003980,old,0,"UInt")
269writeRaw(hGTA, dwFunc, &old, 4)
270NumPut(0x39,old,0,"UChar")
271writeRaw(hGTA, dwFunc+4, &old, 1)
272dwFunc := dwSAMP + FUNC_SAMP_STOPAUDIOSTR
273NumPut(0x74003980,old,0,"UInt")
274writeRaw(hGTA, dwFunc, &old, 4)
275NumPut(0x09,old,0,"UChar")
276writeRaw(hGTA, dwFunc+4, &old, 1)
277return true
278}
279blockChatInput() {
280if(!checkHandles())
281return false
282VarSetCapacity(nop, 2, 0)
283dwFunc := dwSAMP + FUNC_SAMP_SENDSAY
284NumPut(0x04C2,nop,0,"Short")
285writeRaw(hGTA, dwFunc, &nop, 2)
286dwFunc := dwSAMP + FUNC_SAMP_SENDCMD
287writeRaw(hGTA, dwFunc, &nop, 2)
288return true
289}
290unBlockChatInput() {
291if(!checkHandles())
292return false
293VarSetCapacity(nop, 2, 0)
294dwFunc := dwSAMP + FUNC_SAMP_SENDSAY
295NumPut(0xA164,nop,0,"Short")
296writeRaw(hGTA, dwFunc, &nop, 2)
297dwFunc := dwSAMP + FUNC_SAMP_SENDCMD
298writeRaw(hGTA, dwFunc, &nop, 2)
299return true
300}
301getServerName() {
302if(!checkHandles())
303return -1
304dwAdress := readMem(hGTA, dwSAMP + 0x21A0F8, 4, "int")
305if(ErrorLevel) {
306ErrorLevel := ERROR_READ_MEMORY
307return -1
308}
309if(!dwAdress)
310return -1
311ServerName := readString(hGTA, dwAdress + 0x121, 200)
312if(ErrorLevel) {
313ErrorLevel := ERROR_READ_MEMORY
314return -1
315}
316ErrorLevel := ERROR_OK
317return ServerName
318}
319getServerIP() {
320if(!checkHandles())
321return -1
322dwAdress := readMem(hGTA, dwSAMP + 0x21A0F8, 4, "int")
323if(ErrorLevel) {
324ErrorLevel := ERROR_READ_MEMORY
325return -1
326}
327if(!dwAdress)
328return -1
329ServerIP := readString(hGTA, dwAdress + 0x20, 100)
330if(ErrorLevel) {
331ErrorLevel := ERROR_READ_MEMORY
332return -1
333}
334ErrorLevel := ERROR_OK
335return ServerIP
336}
337getServerPort() {
338if(!checkHandles())
339return -1
340dwAdress := readMem(hGTA, dwSAMP + 0x21A0F8, 4, "int")
341if(ErrorLevel) {
342ErrorLevel := ERROR_READ_MEMORY
343return -1
344}
345if(!dwAdress)
346return -1
347ServerPort := readMem(hGTA, dwAdress + 0x225, 4, "int")
348if(ErrorLevel) {
349ErrorLevel := ERROR_READ_MEMORY
350return -1
351}
352ErrorLevel := ERROR_OK
353return ServerPort
354}
355getWeatherID() {
356if(!checkHandles())
357return -1
358dwGTA := getModuleBaseAddress("gta_sa.exe", hGTA)
359WeatherID := readMem(hGTA, dwGTA + 0xC81320, 2, "byte")
360if(ErrorLevel) {
361ErrorLevel := ERROR_READ_MEMORY
362return -1
363}
364ErrorLevel := ERROR_OK
365return WeatherID
366}
367getWeatherName() {
368if(isPlayerInAnyVehicle() == 0)
369return -1
370if(id >= 0 && id < 23)
371{
372return oweatherNames[id-1]
373}
374return ""
375}
376getTargetPed() {
377if(!checkHandles())
378return 0
379dwAddress := readDWORD(hGTA, 0xB6F3B8)
380if(ErrorLevel) {
381ErrorLevel := ERROR_READ_MEMORY
382return 0
383}
384if(!dwAddress)
385return 0
386dwAddress := readDWORD(hGTA, dwAddress+0x79C)
387if(ErrorLevel) {
388ErrorLevel := ERROR_READ_MEMORY
389return 0
390}
391ErrorLevel := ERROR_OK
392return dwAddress
393}
394calcScreenCoors(fX,fY,fZ)
395{
396if(!checkHandles())
397return false
398dwM := 0xB6FA2C
399m_11 := readFloat(hGTA, dwM + 0*4)
400if(ErrorLevel) {
401ErrorLevel := ERROR_READ_MEMORY
402return false
403}
404m_12 := readFloat(hGTA, dwM + 1*4)
405m_13 := readFloat(hGTA, dwM + 2*4)
406m_21 := readFloat(hGTA, dwM + 4*4)
407m_22 := readFloat(hGTA, dwM + 5*4)
408m_23 := readFloat(hGTA, dwM + 6*4)
409m_31 := readFloat(hGTA, dwM + 8*4)
410m_32 := readFloat(hGTA, dwM + 9*4)
411m_33 := readFloat(hGTA, dwM + 10*4)
412m_41 := readFloat(hGTA, dwM + 12*4)
413m_42 := readFloat(hGTA, dwM + 13*4)
414m_43 := readFloat(hGTA, dwM + 14*4)
415dwLenX := readDWORD(hGTA, 0xC17044)
416if(ErrorLevel) {
417ErrorLevel := ERROR_READ_MEMORY
418return false
419}
420dwLenY := readDWORD(hGTA, 0xC17048)
421frX := fZ * m_31 + fY * m_21 + fX * m_11 + m_41
422frY := fZ * m_32 + fY * m_22 + fX * m_12 + m_42
423frZ := fZ * m_33 + fY * m_23 + fX * m_13 + m_43
424fRecip := 1.0/frZ
425frX *= fRecip * dwLenX
426frY *= fRecip * dwLenY
427if(frX<=dwLenX && frY<=dwLenY && frZ>1)
428return [frX,frY,frZ]
429}
430getPedById(dwId) {
431dwId += 0
432dwId := Floor(dwId)
433if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
434return 0
435if(iRefreshScoreboard+iUpdateTick > A_TickCount)
436{
437if(oScoreboardData[dwId])
438{
439if(oScoreboardData[dwId].HasKey("PED"))
440return oScoreboardData[dwId].PED
441}
442return 0
443}
444if(!updateOScoreboardData())
445return 0
446if(oScoreboardData[dwId])
447{
448if(oScoreboardData[dwId].HasKey("PED"))
449return oScoreboardData[dwId].PED
450}
451return 0
452}
453getIdByPed(dwPed) {
454dwPed += 0
455dwPed := Floor(dwPed)
456if(!dwPed)
457return -1
458if(iRefreshScoreboard+iUpdateTick > A_TickCount)
459{
460For i, o in oScoreboardData
461{
462if(o.HasKey("PED"))
463{
464if(o.PED==dwPed)
465return i
466}
467}
468return -1
469}
470if(!updateOScoreboardData())
471return -1
472For i, o in oScoreboardData
473{
474if(o.HasKey("PED"))
475{
476if(o.PED==dwPed)
477return i
478}
479}
480return -1
481}
482getStreamedInPlayersInfo() {
483r:=[]
484if(iRefreshScoreboard+iUpdateTick > A_TickCount)
485{
486For i, o in oScoreboardData
487{
488if(o.HasKey("PED"))
489{
490p := getPedCoordinates(o.PED)
491if(p)
492{
493o.POS := p
494r[i] := o
495}
496}
497}
498return r
499}
500if(!updateOScoreboardData())
501return ""
502For i, o in oScoreboardData
503{
504if(o.HasKey("PED"))
505{
506p := getPedCoordinates(o.PED)
507if(p)
508{
509o.POS := p
510r[i] := o
511}
512}
513}
514return r
515}
516callFuncForAllStreamedInPlayers(cfunc,dist=0x7fffffff) {
517cfunc := "" cfunc
518dist += 0
519if(!IsFunc(cfunc))
520return false
521p := getStreamedInPlayersInfo()
522if(!p)
523return false
524if(dist<0x7fffffff)
525{
526lpos := getCoordinates()
527if(!lpos)
528return false
529For i, o in p
530{
531if(dist>getDist(lpos,o.POS))
532%cfunc%(o)
533}
534}
535else
536{
537For i, o in p
538%cfunc%(o)
539}
540return true
541}
542getDist(pos1,pos2) {
543if(!pos1 || !pos2)
544return 0
545return Sqrt((pos1[1]-pos2[1])*(pos1[1]-pos2[1])+(pos1[2]-pos2[2])*(pos1[2]-pos2[2])+(pos1[3]-pos2[3])*(pos1[3]-pos2[3]))
546}
547getClosestPlayerPed() {
548dist := 0x7fffffff
549p := getStreamedInPlayersInfo()
550if(!p)
551return -1
552lpos := getCoordinates()
553if(!lpos)
554return -1
555id := -1
556For i, o in p
557{
558t:=getDist(lpos,o.POS)
559if(t<dist)
560{
561dist := t
562id := i
563}
564}
565PED := getPedById(id)
566return PED
567}
568getClosestPlayerId() {
569dist := 0x7fffffff
570p := getStreamedInPlayersInfo()
571if(!p)
572return -1
573lpos := getCoordinates()
574if(!lpos)
575return -1
576id := -1
577For i, o in p
578{
579t:=getDist(lpos,o.POS)
580if(t<dist)
581{
582dist := t
583id := i
584}
585}
586return id
587}
588CountOnlinePlayers() {
589if(!checkHandles())
590return -1
591dwOnline := readDWORD(hGTA, dwSAMP + 0x21A0B4)
592if(ErrorLevel) {
593ErrorLevel := ERROR_READ_MEMORY
594return -1
595}
596dwAddr := dwOnline + 0x4
597OnlinePlayers := readDWORD(hGTA, dwAddr)
598if(ErrorLevel) {
599ErrorLevel := ERROR_READ_MEMORY
600return -1
601}
602ErrorLevel := ERROR_OK
603return OnlinePlayers
604}
605getPedCoordinates(dwPED) {
606dwPED += 0
607dwPED := Floor(dwPED)
608if(!dwPED)
609return ""
610if(!checkHandles())
611return ""
612dwAddress := readDWORD(hGTA, dwPED + 0x14)
613if(ErrorLevel || dwAddress==0) {
614ErrorLevel := ERROR_READ_MEMORY
615return ""
616}
617fX := readFloat(hGTA, dwAddress + 0x30)
618if(ErrorLevel) {
619ErrorLevel := ERROR_READ_MEMORY
620return ""
621}
622fY := readFloat(hGTA, dwAddress + 0x34)
623if(ErrorLevel) {
624ErrorLevel := ERROR_READ_MEMORY
625return ""
626}
627fZ := readFloat(hGTA, dwAddress + 0x38)
628if(ErrorLevel) {
629ErrorLevel := ERROR_READ_MEMORY
630return ""
631}
632ErrorLevel := ERROR_OK
633return [fX, fY, fZ]
634}
635getTargetPos(dwId) {
636dwId += 0
637dwId := Floor(dwId)
638if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
639return ""
640if(iRefreshScoreboard+iUpdateTick > A_TickCount)
641{
642if(oScoreboardData[dwId])
643{
644if(oScoreboardData[dwId].HasKey("PED"))
645return getPedCoordinates(oScoreboardData[dwId].PED)
646if(oScoreboardData[dwId].HasKey("MPOS"))
647return oScoreboardData[dwId].MPOS
648}
649return ""
650}
651if(!updateOScoreboardData())
652return ""
653if(oScoreboardData[dwId])
654{
655if(oScoreboardData[dwId].HasKey("PED"))
656return getPedCoordinates(oScoreboardData[dwId].PED)
657if(oScoreboardData[dwId].HasKey("MPOS"))
658return oScoreboardData[dwId].MPOS
659}
660return ""
661}
662getTargetPlayerSkinIdByPed(dwPED) {
663if(!checkHandles())
664return -1
665dwAddr := dwPED + ADDR_CPED_SKINIDOFF
666SkinID := readMem(hGTA, dwAddr, 2, "byte")
667if(ErrorLevel) {
668ErrorLevel := ERROR_READ_MEMORY
669return -1
670}
671ErrorLevel := ERROR_OK
672return SkinID
673}
674getTargetPlayerSkinIdById(dwId) {
675if(!checkHandles())
676return -1
677dwPED := getPedById(dwId)
678dwAddr := dwPED + ADDR_CPED_SKINIDOFF
679SkinID := readMem(hGTA, dwAddr, 2, "byte")
680if(ErrorLevel) {
681ErrorLevel := ERROR_READ_MEMORY
682return -1
683}
684ErrorLevel := ERROR_OK
685return SkinID
686}
687getVehiclePointerByPed(dwPED) {
688dwPED += 0
689dwPED := Floor(dwPED)
690if(!dwPED)
691return 0
692if(!checkHandles())
693return 0
694dwAddress := readDWORD(hGTA, dwPED + 0x58C)
695if(ErrorLevel) {
696ErrorLevel := ERROR_READ_MEMORY
697return 0
698}
699ErrorLevel := ERROR_OK
700return dwAddress
701}
702getVehiclePointerById(dwId) {
703if(!dwId)
704return 0
705if(!checkHandles())
706return 0
707dwPed_By_Id := getPedById(dwId)
708dwAddress := readDWORD(hGTA, dwPed_By_Id + 0x58C)
709if(ErrorLevel) {
710ErrorLevel := ERROR_READ_MEMORY
711return 0
712}
713ErrorLevel := ERROR_OK
714return dwAddress
715}
716isTargetInAnyVehicleByPed(dwPED)
717{
718if(!checkHandles())
719return -1
720dwVehiclePointer := getVehiclePointerByPed(dwPedPointer)
721if(dwVehiclePointer > 0)
722{
723return 1
724}
725else if(dwVehiclePointer <= 0)
726{
727return 0
728}
729else
730{
731return -1
732}
733}
734isTargetInAnyVehiclebyId(dwId)
735{
736if(!checkHandles())
737return -1
738dwPedPointer := getPedById(dwId)
739dwVehiclePointer := getVehiclePointerByPed(dwPedPointer)
740if(dwVehiclePointer > 0)
741{
742return 1
743}
744else if(dwVehiclePointer <= 0)
745{
746return 0
747}
748else
749{
750return -1
751}
752}
753getTargetVehicleHealthByPed(dwPed) {
754if(!checkHandles())
755return -1
756dwVehPtr := getVehiclePointerByPed(dwPed)
757dwAddr := dwVehPtr + ADDR_VEHICLE_HPOFF
758fHealth := readFloat(hGTA, dwAddr)
759if(ErrorLevel) {
760ErrorLevel := ERROR_READ_MEMORY
761return -1
762}
763ErrorLevel := ERROR_OK
764return Round(fHealth)
765}
766getTargetVehicleHealthById(dwId) {
767if(!checkHandles())
768return -1
769dwVehPtr := getVehiclePointerById(dwId)
770dwAddr := dwVehPtr + ADDR_VEHICLE_HPOFF
771fHealth := readFloat(hGTA, dwAddr)
772if(ErrorLevel) {
773ErrorLevel := ERROR_READ_MEMORY
774return -1
775}
776ErrorLevel := ERROR_OK
777return Round(fHealth)
778}
779getTargetVehicleTypeByPed(dwPED) {
780if(!checkHandles())
781return 0
782dwAddr := getVehiclePointerByPed(dwPED)
783if(!dwAddr)
784return 0
785cVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_TYPE, 1, "Char")
786if(ErrorLevel) {
787ErrorLevel := ERROR_READ_MEMORY
788return 0
789}
790ErrorLevel := ERROR_OK
791if(!cVal)
792{
793mid := getVehicleModelId()
794Loop % oAirplaneModels.MaxIndex()
795{
796if(oAirplaneModels[A_Index]==mid)
797return 5
798}
799return 1
800}
801else if(cVal==5)
802return 2
803else if(cVal==6)
804return 3
805else if(cVal==9)
806{
807mid := getVehicleModelId()
808Loop % oBikeModels.MaxIndex()
809{
810if(oBikeModels[A_Index]==mid)
811return 6
812}
813return 4
814}
815return 0
816}
817getTargetVehicleTypeById(dwId) {
818if(!checkHandles())
819return 0
820dwAddr := getVehiclePointerById(dwId)
821if(!dwAddr)
822return 0
823cVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_TYPE, 1, "Char")
824if(ErrorLevel) {
825ErrorLevel := ERROR_READ_MEMORY
826return 0
827}
828ErrorLevel := ERROR_OK
829if(!cVal)
830{
831mid := getVehicleModelId()
832Loop % oAirplaneModels.MaxIndex()
833{
834if(oAirplaneModels[A_Index]==mid)
835return 5
836}
837return 1
838}
839else if(cVal==5)
840return 2
841else if(cVal==6)
842return 3
843else if(cVal==9)
844{
845mid := getVehicleModelId()
846Loop % oBikeModels.MaxIndex()
847{
848if(oBikeModels[A_Index]==mid)
849return 6
850}
851return 4
852}
853return 0
854}
855getTargetVehicleModelIdByPed(dwPED) {
856if(!checkHandles())
857return 0
858dwAddr := getVehiclePointerByPed(dwPED)
859if(!dwAddr)
860return 0
861sVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_MODEL, 2, "Short")
862if(ErrorLevel) {
863ErrorLevel := ERROR_READ_MEMORY
864return 0
865}
866ErrorLevel := ERROR_OK
867return sVal
868}
869getTargetVehicleModelIdById(dwId) {
870if(!checkHandles())
871return 0
872dwAddr := getVehiclePointerById(dwId)
873if(!dwAddr)
874return 0
875sVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_MODEL, 2, "Short")
876if(ErrorLevel) {
877ErrorLevel := ERROR_READ_MEMORY
878return 0
879}
880ErrorLevel := ERROR_OK
881return sVal
882}
883getTargetVehicleModelNameByPed(dwPED) {
884id := getTargetVehicleModelIdByPed(dwPED)
885if(id > 400 && id < 611)
886{
887return ovehicleNames[id-399]
888}
889return ""
890}
891getTargetVehicleModelNameById(dwId) {
892id := getTargetVehicleModelIdById(dwId)
893if(id > 400 && id < 611)
894{
895return ovehicleNames[id-399]
896}
897return ""
898}
899getTargetVehicleLightStateByPed(dwPED) {
900if(!checkHandles())
901return -1
902dwAddr := getVehiclePointerByPed(dwPED)
903if(!dwAddr)
904return -1
905dwVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_LIGHTSTATE, 4, "Int")
906if(ErrorLevel) {
907ErrorLevel := ERROR_READ_MEMORY
908return -1
909}
910ErrorLevel := ERROR_OK
911return (dwVal>0)
912}
913getTargetVehicleLightStateById(dwId) {
914if(!checkHandles())
915return -1
916dwAddr := getVehiclePointerById(dwId)
917if(!dwAddr)
918return -1
919dwVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_LIGHTSTATE, 4, "Int")
920if(ErrorLevel) {
921ErrorLevel := ERROR_READ_MEMORY
922return -1
923}
924ErrorLevel := ERROR_OK
925return (dwVal>0)
926}
927getTargetVehicleLockStateByPed(dwPED) {
928if(!checkHandles())
929return -1
930dwAddr := getVehiclePointerByPed(dwPED)
931if(!dwAddr)
932return -1
933dwVal := readDWORD(hGTA, dwAddr + ADDR_VEHICLE_DOORSTATE)
934if(ErrorLevel) {
935ErrorLevel := ERROR_READ_MEMORY
936return -1
937}
938ErrorLevel := ERROR_OK
939return (dwVal==2)
940}
941getTargetVehicleLockStateById(dwId) {
942if(!checkHandles())
943return -1
944dwAddr := getVehiclePointerById(dwId)
945if(!dwAddr)
946return -1
947dwVal := readDWORD(hGTA, dwAddr + ADDR_VEHICLE_DOORSTATE)
948if(ErrorLevel) {
949ErrorLevel := ERROR_READ_MEMORY
950return -1
951}
952ErrorLevel := ERROR_OK
953return (dwVal==2)
954}
955getTargetVehicleColor1byPed(dwPED) {
956if(!checkHandles())
957return 0
958dwAddr := getVehiclePointerByPed(dwPED)
959if(!dwAddr)
960return 0
961sVal := readMem(hGTA, dwAddr + 1076, 1, "byte")
962if(ErrorLevel) {
963ErrorLevel := ERROR_READ_MEMORY
964return 0
965}
966ErrorLevel := ERROR_OK
967return sVal
968}
969getTargetVehicleColor1byId(dwId) {
970if(!checkHandles())
971return 0
972dwAddr := getVehiclePointerById(dwId)
973if(!dwAddr)
974return 0
975sVal := readMem(hGTA, dwAddr + 1076, 1, "byte")
976if(ErrorLevel) {
977ErrorLevel := ERROR_READ_MEMORY
978return 0
979}
980ErrorLevel := ERROR_OK
981return sVal
982}
983getTargetVehicleColor2byPed(dwPED) {
984if(!checkHandles())
985return 0
986dwAddr := getVehiclePointerByPed(dwPED)
987if(!dwAddr)
988return 0
989sVal := readMem(hGTA, dwAddr + 1077, 1, "byte")
990if(ErrorLevel) {
991ErrorLevel := ERROR_READ_MEMORY
992return 0
993}
994ErrorLevel := ERROR_OK
995return sVal
996}
997getTargetVehicleColor2byId(dwId) {
998if(!checkHandles())
999return 0
1000dwAddr := getVehiclePointerById(dwId)
1001if(!dwAddr)
1002return 0
1003sVal := readMem(hGTA, dwAddr + 1077, 1, "byte")
1004if(ErrorLevel) {
1005ErrorLevel := ERROR_READ_MEMORY
1006return 0
1007}
1008ErrorLevel := ERROR_OK
1009return sVal
1010}
1011getTargetVehicleSpeedByPed(dwPED) {
1012if(!checkHandles())
1013return -1
1014dwAddr := getVehiclePointerByPed(dwPED)
1015fSpeedX := readMem(hGTA, dwAddr + ADDR_VEHICLE_X, 4, "float")
1016fSpeedY := readMem(hGTA, dwAddr + ADDR_VEHICLE_Y, 4, "float")
1017fSpeedZ := readMem(hGTA, dwAddr + ADDR_VEHICLE_Z, 4, "float")
1018fVehicleSpeed := sqrt((fSpeedX * fSpeedX) + (fSpeedY * fSpeedY) + (fSpeedZ * fSpeedZ))
1019fVehicleSpeed := (fVehicleSpeed * 100) * 1.43
1020return fVehicleSpeed
1021}
1022getTargetVehicleSpeedById(dwId) {
1023if(!checkHandles())
1024return -1
1025dwAddr := getVehiclePointerById(dwId)
1026fSpeedX := readMem(hGTA, dwAddr + ADDR_VEHICLE_X, 4, "float")
1027fSpeedY := readMem(hGTA, dwAddr + ADDR_VEHICLE_Y, 4, "float")
1028fSpeedZ := readMem(hGTA, dwAddr + ADDR_VEHICLE_Z, 4, "float")
1029fVehicleSpeed := sqrt((fSpeedX * fSpeedX) + (fSpeedY * fSpeedY) + (fSpeedZ * fSpeedZ))
1030fVehicleSpeed := (fVehicleSpeed * 100) * 1.43
1031return fVehicleSpeed
1032}
1033getPlayerNameById(dwId) {
1034dwId += 0
1035dwId := Floor(dwId)
1036if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
1037return ""
1038if(iRefreshScoreboard+iUpdateTick > A_TickCount)
1039{
1040if(oScoreboardData[dwId])
1041return oScoreboardData[dwId].NAME
1042return ""
1043}
1044if(!updateOScoreboardData())
1045return ""
1046if(oScoreboardData[dwId])
1047return oScoreboardData[dwId].NAME
1048return ""
1049}
1050getPlayerIdByName(wName, exact := false) {
1051wName := "" wName
1052if(StrLen(wName) < 1 || StrLen(wName) > 24)
1053return -1
1054if(iRefreshScoreboard+iUpdateTick > A_TickCount)
1055{
1056For i, o in oScoreboardData
1057{
1058if (o.NAME = wName)
1059return i
1060}
1061For i, o in oScoreboardData
1062{
1063if (!exact && InStr(o.NAME,wName)==1)
1064return i
1065else if (exact && o.NAME = wName)
1066return i
1067}
1068return -1
1069}
1070if(!updateOScoreboardData())
1071return -2
1072For i, o in oScoreboardData
1073{
1074if (o.NAME = wName)
1075return i
1076}
1077For i, o in oScoreboardData
1078{
1079if (!exact && InStr(o.NAME,wName)==1)
1080return i
1081else if (exact && o.NAME = wName)
1082return i
1083}
1084return -1
1085}
1086getPlayerScoreById(dwId) {
1087dwId += 0
1088dwId := Floor(dwId)
1089if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
1090return ""
1091if(iRefreshScoreboard+iUpdateTick > A_TickCount)
1092{
1093if(oScoreboardData[dwId])
1094return oScoreboardData[dwId].SCORE
1095return ""
1096}
1097if(!updateOScoreboardData())
1098return ""
1099if(oScoreboardData[dwId])
1100return oScoreboardData[dwId].SCORE
1101return ""
1102}
1103getPlayerPingById(dwId) {
1104dwId += 0
1105dwId := Floor(dwId)
1106if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
1107return -1
1108if(iRefreshScoreboard+iUpdateTick > A_TickCount)
1109{
1110if(oScoreboardData[dwId])
1111return oScoreboardData[dwId].PING
1112return -1
1113}
1114if(!updateOScoreboardData())
1115return -1
1116if(oScoreboardData[dwId])
1117return oScoreboardData[dwId].PING
1118return -1
1119}
1120isNPCById(dwId) {
1121dwId += 0
1122dwId := Floor(dwId)
1123if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
1124return -1
1125if(iRefreshScoreboard+iUpdateTick > A_TickCount)
1126{
1127if(oScoreboardData[dwId])
1128return oScoreboardData[dwId].ISNPC
1129return -1
1130}
1131if(!updateOScoreboardData())
1132return -1
1133if(oScoreboardData[dwId])
1134return oScoreboardData[dwId].ISNPC
1135return -1
1136}
1137updateScoreboardDataEx() {
1138if(!checkHandles())
1139return false
1140dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
1141if(ErrorLevel || dwAddress==0) {
1142ErrorLevel := ERROR_READ_MEMORY
1143return false
1144}
1145dwFunc := dwSAMP + FUNC_UPDATESCOREBOARD
1146VarSetCapacity(injectData, 11, 0)
1147NumPut(0xB9, injectData, 0, "UChar")
1148NumPut(dwAddress, injectData, 1, "UInt")
1149NumPut(0xE8, injectData, 5, "UChar")
1150offset := dwFunc - (pInjectFunc + 10)
1151NumPut(offset, injectData, 6, "Int")
1152NumPut(0xC3, injectData, 10, "UChar")
1153writeRaw(hGTA, pInjectFunc, &injectData, 11)
1154if(ErrorLevel)
1155return false
1156hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
1157if(ErrorLevel)
1158return false
1159waitForSingleObject(hThread, 0xFFFFFFFF)
1160closeProcess(hThread)
1161return true
1162}
1163updateOScoreboardData() {
1164if(!checkHandles())
1165return 0
1166oScoreboardData := []
1167if(!updateScoreboardDataEx())
1168return 0
1169iRefreshScoreboard := A_TickCount
1170dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
1171if(ErrorLevel || dwAddress==0) {
1172ErrorLevel := ERROR_READ_MEMORY
1173return 0
1174}
1175dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
1176if(ErrorLevel || dwAddress==0) {
1177ErrorLevel := ERROR_READ_MEMORY
1178return 0
1179}
1180dwPlayers := readDWORD(hGTA, dwAddress + SAMP_PPOOL_PLAYER_OFFSET)
1181if(ErrorLevel || dwPlayers==0) {
1182ErrorLevel := ERROR_READ_MEMORY
1183return 0
1184}
1185wID := readMem(hGTA, dwPlayers + SAMP_SLOCALPLAYERID_OFFSET, 2, "Short")
1186if(ErrorLevel) {
1187ErrorLevel := ERROR_READ_MEMORY
1188return 0
1189}
1190dwPing := readMem(hGTA, dwPlayers + SAMP_ILOCALPLAYERPING_OFFSET, 4, "Int")
1191if(ErrorLevel) {
1192ErrorLevel := ERROR_READ_MEMORY
1193return 0
1194}
1195dwScore := readMem(hGTA, dwPlayers + SAMP_ILOCALPLAYERSCORE_OFFSET, 4, "Int")
1196if(ErrorLevel) {
1197ErrorLevel := ERROR_READ_MEMORY
1198return 0
1199}
1200dwTemp := readMem(hGTA, dwPlayers + SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET, 4, "Int")
1201if(ErrorLevel) {
1202ErrorLevel := ERROR_READ_MEMORY
1203return 0
1204}
1205sUsername := ""
1206if(dwTemp <= 0xf) {
1207sUsername := readString(hGTA, dwPlayers + SAMP_SZLOCALPLAYERNAME_OFFSET, 16)
1208if(ErrorLevel) {
1209ErrorLevel := ERROR_READ_MEMORY
1210return 0
1211}
1212}
1213else {
1214dwAddress := readDWORD(hGTA, dwPlayers + SAMP_PSZLOCALPLAYERNAME_OFFSET)
1215if(ErrorLevel) {
1216ErrorLevel := ERROR_READ_MEMORY
1217return 0
1218}
1219sUsername := readString(hGTA, dwAddress, 25)
1220if(ErrorLevel) {
1221ErrorLevel := ERROR_READ_MEMORY
1222return 0
1223}
1224}
1225oScoreboardData[wID] := Object("NAME", sUsername, "ID", wID, "PING", dwPing, "SCORE", dwScore, "ISNPC", 0)
1226Loop, % SAMP_PLAYER_MAX
1227{
1228i := A_Index-1
1229dwRemoteplayer := readDWORD(hGTA, dwPlayers+SAMP_PREMOTEPLAYER_OFFSET+i*4)
1230if(ErrorLevel) {
1231ErrorLevel := ERROR_READ_MEMORY
1232return 0
1233}
1234if(dwRemoteplayer==0)
1235continue
1236dwPing := readMem(hGTA, dwRemoteplayer + SAMP_IPING_OFFSET, 4, "Int")
1237if(ErrorLevel) {
1238ErrorLevel := ERROR_READ_MEMORY
1239return 0
1240}
1241dwScore := readMem(hGTA, dwRemoteplayer + SAMP_ISCORE_OFFSET, 4, "Int")
1242if(ErrorLevel) {
1243ErrorLevel := ERROR_READ_MEMORY
1244return 0
1245}
1246dwIsNPC := readMem(hGTA, dwRemoteplayer + SAMP_ISNPC_OFFSET, 4, "Int")
1247if(ErrorLevel) {
1248ErrorLevel := ERROR_READ_MEMORY
1249return 0
1250}
1251dwTemp := readMem(hGTA, dwRemoteplayer + SAMP_ISTRLENNAME___OFFSET, 4, "Int")
1252if(ErrorLevel) {
1253ErrorLevel := ERROR_READ_MEMORY
1254return 0
1255}
1256sUsername := ""
1257if(dwTemp <= 0xf)
1258{
1259sUsername := readString(hGTA, dwRemoteplayer+SAMP_SZPLAYERNAME_OFFSET, 16)
1260if(ErrorLevel) {
1261ErrorLevel := ERROR_READ_MEMORY
1262return 0
1263}
1264}
1265else {
1266dwAddress := readDWORD(hGTA, dwRemoteplayer + SAMP_PSZPLAYERNAME_OFFSET)
1267if(ErrorLevel || dwAddress==0) {
1268ErrorLevel := ERROR_READ_MEMORY
1269return 0
1270}
1271sUsername := readString(hGTA, dwAddress, 25)
1272if(ErrorLevel) {
1273ErrorLevel := ERROR_READ_MEMORY
1274return 0
1275}
1276}
1277o := Object("NAME", sUsername, "ID", i, "PING", dwPing, "SCORE", dwScore, "ISNPC", dwIsNPC)
1278oScoreboardData[i] := o
1279dwRemoteplayerData := readDWORD(hGTA, dwRemoteplayer + 0x0)
1280if(ErrorLevel) {
1281ErrorLevel := ERROR_READ_MEMORY
1282return 0
1283}
1284if(dwRemoteplayerData==0)
1285continue
1286dwAddress := readDWORD(hGTA, dwRemoteplayerData + 489)
1287if(ErrorLevel) {
1288ErrorLevel := ERROR_READ_MEMORY
1289return 0
1290}
1291if(dwAddress)
1292{
1293ix := readMem(hGTA, dwRemoteplayerData + 493, 4, "Int")
1294if(ErrorLevel) {
1295ErrorLevel := ERROR_READ_MEMORY
1296return 0
1297}
1298iy := readMem(hGTA, dwRemoteplayerData + 497, 4, "Int")
1299if(ErrorLevel) {
1300ErrorLevel := ERROR_READ_MEMORY
1301return 0
1302}
1303iz := readMem(hGTA, dwRemoteplayerData + 501, 4, "Int")
1304if(ErrorLevel) {
1305ErrorLevel := ERROR_READ_MEMORY
1306return 0
1307}
1308o.MPOS := [ix, iy, iz]
1309}
1310dwpSAMP_Actor := readDWORD(hGTA, dwRemoteplayerData + 0x0)
1311if(ErrorLevel) {
1312ErrorLevel := ERROR_READ_MEMORY
1313return 0
1314}
1315if(dwpSAMP_Actor==0)
1316continue
1317dwPed := readDWORD(hGTA, dwpSAMP_Actor + 676)
1318if(ErrorLevel) {
1319ErrorLevel := ERROR_READ_MEMORY
1320return 0
1321}
1322if(dwPed==0)
1323continue
1324o.PED := dwPed
1325fHP := readFloat(hGTA, dwRemoteplayerData + 444)
1326if(ErrorLevel) {
1327ErrorLevel := ERROR_READ_MEMORY
1328return 0
1329}
1330fARMOR := readFloat(hGTA, dwRemoteplayerData + 440)
1331if(ErrorLevel) {
1332ErrorLevel := ERROR_READ_MEMORY
1333return 0
1334}
1335o.HP := fHP
1336o.ARMOR := fARMOR
1337}
1338ErrorLevel := ERROR_OK
1339return 1
1340}
1341GetChatLine(Line, ByRef Output, timestamp=0, color=0){
1342chatindex := 0
1343FileRead, file, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
1344loop, Parse, file, `n, `r
1345{
1346if(A_LoopField)
1347chatindex := A_Index
1348}
1349loop, Parse, file, `n, `r
1350{
1351if(A_Index = chatindex - line){
1352output := A_LoopField
1353break
1354}
1355}
1356file := ""
1357if(!timestamp)
1358output := RegExReplace(output, "U)^\[\d{2}:\d{2}:\d{2}\]")
1359if(!color)
1360output := RegExReplace(output, "Ui)\{[a-f0-9]{6}\}")
1361return
1362}
1363getPlayerHealth() {
1364if(!checkHandles())
1365return -1
1366dwCPedPtr := readDWORD(hGTA, ADDR_CPED_PTR)
1367if(ErrorLevel) {
1368ErrorLevel := ERROR_READ_MEMORY
1369return -1
1370}
1371dwAddr := dwCPedPtr + ADDR_CPED_HPOFF
1372fHealth := readFloat(hGTA, dwAddr)
1373if(ErrorLevel) {
1374ErrorLevel := ERROR_READ_MEMORY
1375return -1
1376}
1377ErrorLevel := ERROR_OK
1378return Round(fHealth)
1379}
1380getPlayerArmor() {
1381if(!checkHandles())
1382return -1
1383dwCPedPtr := readDWORD(hGTA, ADDR_CPED_PTR)
1384if(ErrorLevel) {
1385ErrorLevel := ERROR_READ_MEMORY
1386return -1
1387}
1388dwAddr := dwCPedPtr + ADDR_CPED_ARMOROFF
1389fHealth := readFloat(hGTA, dwAddr)
1390if(ErrorLevel) {
1391ErrorLevel := ERROR_READ_MEMORY
1392return -1
1393}
1394ErrorLevel := ERROR_OK
1395return Round(fHealth)
1396}
1397getPlayerInteriorId() {
1398if(!checkHandles())
1399return -1
1400iid := readMem(hGTA, ADDR_CPED_INTID, 4, "Int")
1401if(ErrorLevel) {
1402ErrorLevel := ERROR_READ_MEMORY
1403return -1
1404}
1405ErrorLevel := ERROR_OK
1406return iid
1407}
1408getPlayerSkinID() {
1409if(!checkHandles())
1410return -1
1411dwCPedPtr := readDWORD(hGTA, ADDR_CPED_PTR)
1412if(ErrorLevel) {
1413ErrorLevel := ERROR_READ_MEMORY
1414return -1
1415}
1416dwAddr := dwCPedPtr + ADDR_CPED_SKINIDOFF
1417SkinID := readMem(hGTA, dwAddr, 2, "byte")
1418if(ErrorLevel) {
1419ErrorLevel := ERROR_READ_MEMORY
1420return -1
1421}
1422ErrorLevel := ERROR_OK
1423return SkinID
1424}
1425getPlayerMoney() {
1426if(!checkHandles())
1427return ""
1428money := readMem(hGTA, ADDR_CPED_MONEY, 4, "Int")
1429if(ErrorLevel) {
1430ErrorLevel := ERROR_READ_MEMORY
1431return ""
1432}
1433ErrorLevel := ERROR_OK
1434return money
1435}
1436getPlayerWanteds() {
1437if(!checkHandles())
1438return -1
1439dwPtr := 0xB7CD9C
1440dwPtr := readDWORD(hGTA, dwPtr)
1441if(ErrorLevel) {
1442ErrorLevel := ERROR_READ_MEMORY
1443return -1
1444}
1445Wanteds := readDWORD(hGTA, dwPtr)
1446if(ErrorLevel) {
1447ErrorLevel := ERROR_READ_MEMORY
1448return -1
1449}
1450ErrorLevel := ERROR_OK
1451return Wanteds
1452}
1453getPlayerWeaponId() {
1454if(!checkHandles())
1455return 0
1456WaffenId := readMem(hGTA, 0xBAA410, 4, "byte")
1457if(ErrorLevel) {
1458ErrorLevel := ERROR_READ_MEMORY
1459return -1
1460}
1461return WaffenId
1462}
1463getPlayerWeaponName() {
1464id := getPlayerWeaponId()
1465if(id >= 0 && id < 44)
1466{
1467return oweaponNames[id+1]
1468}
1469return ""
1470}
1471getPlayerState() {
1472if(!checkHandles())
1473return -1
1474dwCPedPtr := readDWORD(hGTA, ADDR_CPED_PTR)
1475if(ErrorLevel) {
1476ErrorLevel := ERROR_READ_MEMORY
1477return -1
1478}
1479State := readDWORD(hGTA, dwCPedPtr + 0x530)
1480if(ErrorLevel) {
1481ErrorLevel := ERROR_READ_MEMORY
1482return -1
1483}
1484ErrorLevel := ERROR_OK
1485return State
1486}
1487IsPlayerInMenu() {
1488if(!checkHandles())
1489return -1
1490IsInMenu := readMem(hGTA, 0xBA67A4, 4, "byte")
1491if(ErrorLevel) {
1492ErrorLevel := ERROR_READ_MEMORY
1493return -1
1494}
1495ErrorLevel := ERROR_OK
1496return IsInMenu
1497}
1498getPlayerMapPosX() {
1499if(!checkHandles())
1500return -1
1501MapPosX := readFloat(hGTA, 0xBA67B8)
1502if(ErrorLevel) {
1503ErrorLevel := ERROR_READ_MEMORY
1504return -1
1505}
1506ErrorLevel := ERROR_OK
1507return MapPosX
1508}
1509getPlayerMapPosY() {
1510if(!checkHandles())
1511return -1
1512MapPosY := readFloat(hGTA, 0xBA67BC)
1513if(ErrorLevel) {
1514ErrorLevel := ERROR_READ_MEMORY
1515return -1
1516}
1517ErrorLevel := ERROR_OK
1518return MapPosY
1519}
1520getPlayerMapZoom() {
1521if(!checkHandles())
1522return -1
1523MapZoom := readFloat(hGTA, 0xBA67AC)
1524if(ErrorLevel) {
1525ErrorLevel := ERROR_READ_MEMORY
1526return -1
1527}
1528ErrorLevel := ERROR_OK
1529return MapZoom
1530}
1531IsPlayerFreezed() {
1532if(!checkHandles())
1533return -1
1534dwGTA := getModuleBaseAddress("gta_sa.exe", hGTA)
1535IPF := readMem(hGTA, dwGTA + 0x690495, 2, "byte")
1536if(ErrorLevel) {
1537ErrorLevel := ERROR_READ_MEMORY
1538return -1
1539}
1540ErrorLevel := ERROR_OK
1541return IPF
1542}
1543isPlayerInAnyVehicle()
1544{
1545if(!checkHandles())
1546return -1
1547dwVehPtr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
1548if(ErrorLevel) {
1549ErrorLevel := ERROR_READ_MEMORY
1550return -1
1551}
1552return (dwVehPtr > 0)
1553}
1554isPlayerDriver() {
1555if(!checkHandles())
1556return -1
1557dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
1558if(ErrorLevel) {
1559ErrorLevel := ERROR_READ_MEMORY
1560return -1
1561}
1562if(!dwAddr)
1563return -1
1564dwCPedPtr := readDWORD(hGTA, ADDR_CPED_PTR)
1565if(ErrorLevel) {
1566ErrorLevel := ERROR_READ_MEMORY
1567return -1
1568}
1569dwVal := readDWORD(hGTA, dwAddr + ADDR_VEHICLE_DRIVER)
1570if(ErrorLevel) {
1571ErrorLevel := ERROR_READ_MEMORY
1572return -1
1573}
1574ErrorLevel := ERROR_OK
1575return (dwVal==dwCPedPtr)
1576}
1577getVehicleHealth() {
1578if(!checkHandles())
1579return -1
1580dwVehPtr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
1581if(ErrorLevel) {
1582ErrorLevel := ERROR_READ_MEMORY
1583return -1
1584}
1585dwAddr := dwVehPtr + ADDR_VEHICLE_HPOFF
1586fHealth := readFloat(hGTA, dwAddr)
1587if(ErrorLevel) {
1588ErrorLevel := ERROR_READ_MEMORY
1589return -1
1590}
1591ErrorLevel := ERROR_OK
1592return Round(fHealth)
1593}
1594getVehicleType() {
1595if(!checkHandles())
1596return 0
1597dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
1598if(ErrorLevel) {
1599ErrorLevel := ERROR_READ_MEMORY
1600return 0
1601}
1602if(!dwAddr)
1603return 0
1604cVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_TYPE, 1, "Char")
1605if(ErrorLevel) {
1606ErrorLevel := ERROR_READ_MEMORY
1607return 0
1608}
1609ErrorLevel := ERROR_OK
1610if(!cVal)
1611{
1612mid := getVehicleModelId()
1613Loop % oAirplaneModels.MaxIndex()
1614{
1615if(oAirplaneModels[A_Index]==mid)
1616return 5
1617}
1618return 1
1619}
1620else if(cVal==5)
1621return 2
1622else if(cVal==6)
1623return 3
1624else if(cVal==9)
1625{
1626mid := getVehicleModelId()
1627Loop % oBikeModels.MaxIndex()
1628{
1629if(oBikeModels[A_Index]==mid)
1630return 6
1631}
1632return 4
1633}
1634return 0
1635}
1636getVehicleModelId() {
1637if(!checkHandles())
1638return 0
1639dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
1640if(ErrorLevel) {
1641ErrorLevel := ERROR_READ_MEMORY
1642return 0
1643}
1644if(!dwAddr)
1645return 0
1646sVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_MODEL, 2, "Short")
1647if(ErrorLevel) {
1648ErrorLevel := ERROR_READ_MEMORY
1649return 0
1650}
1651ErrorLevel := ERROR_OK
1652return sVal
1653}
1654getVehicleModelName() {
1655id:=getVehicleModelId()
1656if(id > 400 && id < 611)
1657{
1658return ovehicleNames[id-399]
1659}
1660return ""
1661}
1662getVehicleLightState() {
1663if(!checkHandles())
1664return -1
1665dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
1666if(ErrorLevel) {
1667ErrorLevel := ERROR_READ_MEMORY
1668return -1
1669}
1670if(!dwAddr)
1671return -1
1672dwVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_LIGHTSTATE, 4, "Int")
1673if(ErrorLevel) {
1674ErrorLevel := ERROR_READ_MEMORY
1675return -1
1676}
1677ErrorLevel := ERROR_OK
1678return (dwVal>0)
1679}
1680getVehicleEngineState() {
1681if(!checkHandles())
1682return -1
1683dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
1684if(ErrorLevel) {
1685ErrorLevel := ERROR_READ_MEMORY
1686return -1
1687}
1688if(!dwAddr)
1689return -1
1690cVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_ENGINESTATE, 1, "Char")
1691if(ErrorLevel) {
1692ErrorLevel := ERROR_READ_MEMORY
1693return -1
1694}
1695ErrorLevel := ERROR_OK
1696return (cVal==24 || cVal==56 || cVal==88 || cVal==120)
1697}
1698getVehicleLockState() {
1699if(!checkHandles())
1700return -1
1701dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
1702if(ErrorLevel) {
1703ErrorLevel := ERROR_READ_MEMORY
1704return -1
1705}
1706if(!dwAddr)
1707return -1
1708dwVal := readDWORD(hGTA, dwAddr + ADDR_VEHICLE_DOORSTATE)
1709if(ErrorLevel) {
1710ErrorLevel := ERROR_READ_MEMORY
1711return -1
1712}
1713ErrorLevel := ERROR_OK
1714return (dwVal==2)
1715}
1716getVehicleColor1() {
1717if(!checkHandles())
1718return 0
1719dwAddr := readDWORD(hGTA, 0xBA18FC)
1720if(ErrorLevel) {
1721ErrorLevel := ERROR_READ_MEMORY
1722return 0
1723}
1724if(!dwAddr)
1725return 0
1726sVal := readMem(hGTA, dwAddr + 1076, 1, "byte")
1727if(ErrorLevel) {
1728ErrorLevel := ERROR_READ_MEMORY
1729return 0
1730}
1731ErrorLevel := ERROR_OK
1732return sVal
1733}
1734getVehicleColor2() {
1735if(!checkHandles())
1736return 0
1737dwAddr := readDWORD(hGTA, 0xBA18FC)
1738if(ErrorLevel) {
1739ErrorLevel := ERROR_READ_MEMORY
1740return 0
1741}
1742if(!dwAddr)
1743return 0
1744sVal := readMem(hGTA, dwAddr + 1077, 1, "byte")
1745if(ErrorLevel) {
1746ErrorLevel := ERROR_READ_MEMORY
1747return 0
1748}
1749ErrorLevel := ERROR_OK
1750return sVal
1751}
1752getVehicleSpeed() {
1753if(!checkHandles())
1754return -1
1755dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
1756if(ErrorLevel) {
1757ErrorLevel := ERROR_READ_MEMORY
1758return ""
1759}
1760fSpeedX := readMem(hGTA, dwAddr + ADDR_VEHICLE_X, 4, "float")
1761fSpeedY := readMem(hGTA, dwAddr + ADDR_VEHICLE_Y, 4, "float")
1762fSpeedZ := readMem(hGTA, dwAddr + ADDR_VEHICLE_Z, 4, "float")
1763fVehicleSpeed := sqrt((fSpeedX * fSpeedX) + (fSpeedY * fSpeedY) + (fSpeedZ * fSpeedZ))
1764fVehicleSpeed := (fVehicleSpeed * 100) * 1.43
1765return fVehicleSpeed
1766}
1767getPlayerRadiostationID() {
1768if(!checkHandles())
1769return -1
1770if(isPlayerInAnyVehicle() == 0)
1771return -1
1772dwGTA := getModuleBaseAddress("gta_sa.exe", hGTA)
1773RadioStationID := readMem(hGTA, dwGTA + 0x4CB7E1, 1, "byte")
1774if(ErrorLevel) {
1775ErrorLevel := ERROR_READ_MEMORY
1776return -1
1777}
1778return RadioStationID
1779}
1780getPlayerRadiostationName() {
1781if(isPlayerInAnyVehicle() == 0)
1782return -1
1783id := getPlayerRadiostationID()
1784if(id == 0)
1785return -1
1786if(id >= 0 && id < 14)
1787{
1788return oradiostationNames[id]
1789}
1790return ""
1791}
1792setCheckpoint(fX, fY, fZ, fSize := 7) {
1793if(!checkHandles())
1794return false
1795dwFunc := dwSAMP + 0x9D340
1796dwAddress := readDWORD(hGTA, dwSAMP + ADDR_SAMP_INCHAT_PTR)
1797if(ErrorLevel || dwAddress==0) {
1798ErrorLevel := ERROR_READ_MEMORY
1799return false
1800}
1801VarSetCapacity(buf, 16, 0)
1802NumPut(fX, buf, 0, "Float")
1803NumPut(fY, buf, 4, "Float")
1804NumPut(fZ, buf, 8, "Float")
1805NumPut(fSize, buf, 12, "Float")
1806writeRaw(hGTA, pParam1, &buf, 16)
1807dwLen := 31
1808VarSetCapacity(injectData, dwLen, 0)
1809NumPut(0xB9, injectData, 0, "UChar")
1810NumPut(dwAddress, injectData, 1, "UInt")
1811NumPut(0x68, injectData, 5, "UChar")
1812NumPut(pParam1+12, injectData, 6, "UInt")
1813NumPut(0x68, injectData, 10, "UChar")
1814NumPut(pParam1, injectData, 11, "UInt")
1815NumPut(0xE8, injectData, 15, "UChar")
1816offset := dwFunc - (pInjectFunc + 20)
1817NumPut(offset, injectData, 16, "Int")
1818NumPut(0x05C7, injectData, 20, "UShort")
1819NumPut(dwAddress+0x24, injectData, 22, "UInt")
1820NumPut(1, injectData, 26, "UInt")
1821NumPut(0xC3, injectData, 30, "UChar")
1822writeRaw(hGTA, pInjectFunc, &injectData, dwLen)
1823if(ErrorLevel)
1824return false
1825hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
1826if(ErrorLevel)
1827return false
1828waitForSingleObject(hThread, 0xFFFFFFFF)
1829closeProcess(hThread)
1830dwAddress := readDWORD(hGTA, dwSAMP + ADDR_SAMP_INCHAT_PTR)
1831writeMemory(hGTA, dwAddress + 0xC, fX, 4, "Float")
1832writeMemory(hGTA, dwAddress + 0x10, fY, 4, "Float")
1833writeMemory(hGTA, dwAddress + 0x14, fZ, 4, "Float")
1834writeMemory(hGTA, dwAddress + 0x18, fSize, 4, "Float")
1835ErrorLevel := ERROR_OK
1836return true
1837}
1838disableCheckpoint()
1839{
1840if(!checkHandles())
1841return false
1842dwAddress := readDWORD(hGTA, dwSAMP + ADDR_SAMP_INCHAT_PTR)
1843if(ErrorLevel || dwAddress==0) {
1844ErrorLevel := ERROR_READ_MEMORY
1845return false
1846}
1847VarSetCapacity(enablecp, 4, 0)
1848NumPut(0,enablecp,0,"Int")
1849writeRaw(hGTA, dwAddress+0x24, &enablecp, 4)
1850ErrorLevel := ERROR_OK
1851return true
1852}
1853IsMarkerCreated(){
1854If(!checkHandles())
1855return false
1856active := readMem(hGTA, CheckpointCheck, 1, "byte")
1857If(!active)
1858return 0
1859else return 1
1860}
1861CoordsFromRedmarker(){
1862if(!checkhandles())
1863return false
1864for i, v in rmaddrs
1865f%i% := readFloat(hGTA, v)
1866return [f1, f2, f3]
1867}
1868getCoordinates() {
1869if(!checkHandles())
1870return ""
1871fX := readFloat(hGTA, ADDR_POSITION_X)
1872if(ErrorLevel) {
1873ErrorLevel := ERROR_READ_MEMORY
1874return ""
1875}
1876fY := readFloat(hGTA, ADDR_POSITION_Y)
1877if(ErrorLevel) {
1878ErrorLevel := ERROR_READ_MEMORY
1879return ""
1880}
1881fZ := readFloat(hGTA, ADDR_POSITION_Z)
1882if(ErrorLevel) {
1883ErrorLevel := ERROR_READ_MEMORY
1884return ""
1885}
1886ErrorLevel := ERROR_OK
1887return [fX, fY, fZ]
1888}
1889GetPlayerPos(ByRef fX,ByRef fY,ByRef fZ) {
1890if(!checkHandles())
1891return 0
1892fX := readFloat(hGTA, ADDR_POSITION_X)
1893if(ErrorLevel) {
1894ErrorLevel := ERROR_READ_MEMORY
1895return 0
1896}
1897fY := readFloat(hGTA, ADDR_POSITION_Y)
1898if(ErrorLevel) {
1899ErrorLevel := ERROR_READ_MEMORY
1900return 0
1901}
1902fZ := readFloat(hGTA, ADDR_POSITION_Z)
1903if(ErrorLevel) {
1904ErrorLevel := ERROR_READ_MEMORY
1905return 0
1906}
1907ErrorLevel := ERROR_OK
1908}
1909getDialogStructPtr() {
1910if (!checkHandles()) {
1911ErrorLevel := ERROR_INVALID_HANDLE
1912return false
1913}
1914dwPointer := readDWORD(hGTA, dwSAMP + SAMP_DIALOG_STRUCT_PTR)
1915if (ErrorLevel) {
1916ErrorLevel := ERROR_READ_MEMORY
1917return false
1918}
1919ErrorLevel := ERROR_OK
1920return dwPointer
1921}
1922isDialogOpen() {
1923dwPointer := getDialogStructPtr()
1924if (ErrorLevel || !dwPointer)
1925return false
1926dwIsOpen := readMem(hGTA, dwPointer + SAMP_DIALOG_OPEN_OFFSET, 4, "UInt")
1927if (ErrorLevel) {
1928ErrorLevel := ERROR_READ_MEMORY
1929return false
1930}
1931ErrorLevel := ERROR_OK
1932return dwIsOpen ? true : false
1933}
1934getDialogStyle() {
1935dwPointer := getDialogStructPtr()
1936if (ErrorLevel || !dwPointer)
1937return -1
1938style := readMem(hGTA, dwPointer + SAMP_DIALOG_STYLE_OFFSET, 4, "UInt")
1939if (ErrorLevel) {
1940ErrorLevel := ERROR_READ_MEMORY
1941return -1
1942}
1943ErrorLevel := ERROR_OK
1944return style
1945}
1946getDialogID() {
1947dwPointer := getDialogStructPtr()
1948if (ErrorLevel || !dwPointer)
1949return -1
1950id := readMem(hGTA, dwPointer + SAMP_DIALOG_ID_OFFSET, 4, "UInt")
1951if (ErrorLevel) {
1952ErrorLevel := ERROR_READ_MEMORY
1953return -1
1954}
1955ErrorLevel := ERROR_OK
1956return id
1957}
1958setDialogID(id) {
1959dwPointer := getDialogStructPtr()
1960if (ErrorLevel || !dwPointer)
1961return false
1962writeMemory(hGTA, dwPointer + SAMP_DIALOG_ID_OFFSET, id, "UInt", 4)
1963if (ErrorLevel) {
1964ErrorLevel := ERROR_WRITE_MEMORY
1965return false
1966}
1967ErrorLevel := ERROR_OK
1968return true
1969}
1970getDialogIndex() {
1971dwPointer := getDialogStructPtr()
1972if (ErrorLevel || !dwPointer)
1973return 0
1974dwPointer := readDWORD(hGTA, dwPointer + SAMP_DIALOG_PTR1_OFFSET)
1975if (ErrorLevel) {
1976ErrorLevel := ERROR_READ_MEMORY
1977return 0
1978}
1979index := readMem(hGTA, dwPointer + SAMP_DIALOG_INDEX_OFFSET, 1, "Byte")
1980if (ErrorLevel) {
1981ErrorLevel := ERROR_READ_MEMORY
1982return 0
1983}
1984ErrorLevel := ERROR_OK
1985return index + 1
1986}
1987getDialogCaption() {
1988dwPointer := getDialogStructPtr()
1989if (ErrorLevel || !dwPointer)
1990return ""
1991text := readString(hGTA, dwPointer + SAMP_DIALOG_CAPTION_OFFSET, 64)
1992if (ErrorLevel) {
1993ErrorLevel := ERROR_READ_MEMORY
1994return ""
1995}
1996ErrorLevel := ERROR_OK
1997return text
1998}
1999getDialogTextSize(dwAddress) {
2000i := 0
2001Loop, 4096 {
2002i := A_Index - 1
2003byte := Memory_ReadByte(hGTA, dwAddress + i)
2004if (!byte)
2005break
2006}
2007return i
2008}
2009getDialogText() {
2010dwPointer := getDialogStructPtr()
2011if (ErrorLevel || !dwPointer)
2012return ""
2013dwPointer := readDWORD(hGTA, dwPointer + SAMP_DIALOG_TEXT_PTR_OFFSET)
2014if (ErrorLevel) {
2015ErrorLevel := ERROR_READ_MEMORY
2016return ""
2017}
2018text := readString(hGTA, dwPointer, 4096)
2019if (ErrorLevel) {
2020text := readString(hGTA, dwPointer, getDialogTextSize(dwPointer))
2021if (ErrorLevel) {
2022ErrorLevel := ERROR_READ_MEMORY
2023return ""
2024}
2025}
2026ErrorLevel := ERROR_OK
2027return text
2028}
2029getDialogLineCount() {
2030dwPointer := getDialogStructPtr()
2031if (ErrorLevel || !dwPointer)
2032return 0
2033dwPointer := readDWORD(hGTA, dwPointer + SAMP_DIALOG_PTR2_OFFSET)
2034if (ErrorLevel) {
2035ErrorLevel := ERROR_READ_MEMORY
2036return 0
2037}
2038count := readMem(hGTA, dwPointer + SAMP_DIALOG_LINECOUNT_OFFSET, 4, "UInt")
2039if (ErrorLevel) {
2040ErrorLevel := ERROR_READ_MEMORY
2041return 0
2042}
2043ErrorLevel := ERROR_OK
2044return count
2045}
2046getDialogLine__(index) {
2047if (getDialogLineCount > index)
2048return ""
2049dwPointer := getDialogStructPtr()
2050if (ErrorLevel || !dwPointer)
2051return ""
2052dwPointer := readDWORD(hGTA, dwPointer + SAMP_DIALOG_PTR1_OFFSET)
2053if (ErrorLevel) {
2054ErrorLevel := ERROR_READ_MEMORY
2055return ""
2056}
2057dwPointer := readDWORD(hGTA, dwPointer + SAMP_DIALOG_LINES_OFFSET)
2058if (ErrorLevel) {
2059ErrorLevel := ERROR_READ_MEMORY
2060return ""
2061}
2062dwLineAddress := readDWORD(hGTA, dwPointer + (index - 1) * 0x4)
2063line := readString(hGTA, dwLineAddress, 128)
2064ErrorLevel := ERROR_OK
2065return line
2066}
2067getDialogLine(index) {
2068lines := getDialogLines()
2069if (index > lines.Length())
2070return ""
2071if (getDialogStyle() == DIALOG_STYLE_TABLIST_HEADERS)
2072index++
2073return lines[index]
2074}
2075getDialogLines() {
2076text := getDialogText()
2077if (text == "")
2078return -1
2079lines := StrSplit(text, "`n")
2080return lines
2081}
2082isDialogButton1Selected() {
2083dwPointer := getDialogStructPtr()
2084if (ErrorLevel || !dwPointer)
2085return false
2086dwPointer := readDWORD(hGTA, dwPointer + SAMP_DIALOG_PTR1_OFFSET)
2087if (ErrorLevel) {
2088ErrorLevel := ERROR_READ_MEMORY
2089return false
2090}
2091selected := readMem(hGTA, dwPointer + SAMP_DIALOG_BUTTON_HOVERING_OFFSET, 1, "Byte")
2092if (ErrorLevel) {
2093ErrorLevel := ERROR_READ_MEMORY
2094return false
2095}
2096ErrorLevel := ERROR_OK
2097return selected
2098}
2099getDialogLines__() {
2100count := getDialogLineCount()
2101dwPointer := getDialogStructPtr()
2102if (ErrorLevel || !dwPointer)
2103return -1
2104dwPointer := readDWORD(hGTA, dwPointer + SAMP_DIALOG_PTR1_OFFSET)
2105if (ErrorLevel) {
2106ErrorLevel := ERROR_READ_MEMORY
2107return -1
2108}
2109dwPointer := readDWORD(hGTA, dwPointer + SAMP_DIALOG_LINES_OFFSET)
2110if (ErrorLevel) {
2111ErrorLevel := ERROR_READ_MEMORY
2112return -1
2113}
2114lines := []
2115Loop %count% {
2116dwLineAddress := readDWORD(hGTA, dwPointer + (A_Index - 1) * 0x4)
2117lines[A_Index] := readString(hGTA, dwLineAddress, 128)
2118}
2119ErrorLevel := ERROR_OK
2120return lines
2121}
2122showDialog(style, caption, text, button1, button2 := "", id := 1) {
2123style += 0
2124style := Floor(style)
2125id += 0
2126id := Floor(id)
2127caption := "" caption
2128text := "" text
2129button1 := "" button1
2130button2 := "" button2
2131if (id < 0 || id > 32767 || style < 0 || style > 5 || StrLen(caption) > 64 || StrLen(text) > 4096 || StrLen(button1) > 10 || StrLen(button2) > 10)
2132return false
2133if (!checkHandles())
2134return false
2135dwFunc := dwSAMP + FUNC_SAMP_SHOWDIALOG
2136dwAddress := readDWORD(hGTA, dwSAMP + SAMP_DIALOG_STRUCT_PTR)
2137if (ErrorLevel || !dwAddress) {
2138ErrorLevel := ERROR_READ_MEMORY
2139return false
2140}
2141writeString(hGTA, pParam5, caption)
2142if (ErrorLevel)
2143return false
2144writeString(hGTA, pParam1, text)
2145if (ErrorLevel)
2146return false
2147writeString(hGTA, pParam5 + 512, button1)
2148if (ErrorLevel)
2149return false
2150writeString(hGTA, pParam5+StrLen(caption) + 1, button2)
2151if (ErrorLevel)
2152return false
2153dwLen := 5 + 7 * 5 + 5 + 1
2154VarSetCapacity(injectData, dwLen, 0)
2155NumPut(0xB9, injectData, 0, "UChar")
2156NumPut(dwAddress, injectData, 1, "UInt")
2157NumPut(0x68, injectData, 5, "UChar")
2158NumPut(1, injectData, 6, "UInt")
2159NumPut(0x68, injectData, 10, "UChar")
2160NumPut(pParam5 + StrLen(caption) + 1, injectData, 11, "UInt")
2161NumPut(0x68, injectData, 15, "UChar")
2162NumPut(pParam5 + 512, injectData, 16, "UInt")
2163NumPut(0x68, injectData, 20, "UChar")
2164NumPut(pParam1, injectData, 21, "UInt")
2165NumPut(0x68, injectData, 25, "UChar")
2166NumPut(pParam5, injectData, 26, "UInt")
2167NumPut(0x68, injectData, 30, "UChar")
2168NumPut(style, injectData, 31, "UInt")
2169NumPut(0x68, injectData, 35, "UChar")
2170NumPut(id, injectData, 36, "UInt")
2171NumPut(0xE8, injectData, 40, "UChar")
2172offset := dwFunc - (pInjectFunc + 45)
2173NumPut(offset, injectData, 41, "Int")
2174NumPut(0xC3, injectData, 45, "UChar")
2175writeRaw(hGTA, pInjectFunc, &injectData, dwLen)
2176if (ErrorLevel)
2177return false
2178hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
2179if (ErrorLevel)
2180return false
2181waitForSingleObject(hThread, 0xFFFFFFFF)
2182closeProcess(hThread)
2183return true
2184}
2185initZonesAndCities() {
2186AddCity("Las Venturas", 685.0, 476.093, -500.0, 3000.0, 3000.0, 500.0)
2187AddCity("San Fierro", -3000.0, -742.306, -500.0, -1270.53, 1530.24, 500.0)
2188AddCity("San Fierro", -1270.53, -402.481, -500.0, -1038.45, 832.495, 500.0)
2189AddCity("San Fierro", -1038.45, -145.539, -500.0, -897.546, 376.632, 500.0)
2190AddCity("Los Santos", 480.0, -3000.0, -500.0, 3000.0, -850.0, 500.0)
2191AddCity("Los Santos", 80.0, -2101.61, -500.0, 1075.0, -1239.61, 500.0)
2192AddCity("Tierra Robada", -1213.91, 596.349, -242.99, -480.539, 1659.68, 900.0)
2193AddCity("Red County", -1213.91, -768.027, -242.99, 2997.06, 596.349, 900.0)
2194AddCity("Flint County", -1213.91, -2892.97, -242.99, 44.6147, -768.027, 900.0)
2195AddCity("Whetstone", -2997.47, -2892.97, -242.99, -1213.91, -1115.58, 900.0)
2196AddZone("Avispa Country Club", -2667.810, -302.135, -28.831, -2646.400, -262.320, 71.169)
2197AddZone("Easter Bay Airport", -1315.420, -405.388, 15.406, -1264.400, -209.543, 25.406)
2198AddZone("Avispa Country Club", -2550.040, -355.493, 0.000, -2470.040, -318.493, 39.700)
2199AddZone("Easter Bay Airport", -1490.330, -209.543, 15.406, -1264.400, -148.388, 25.406)
2200AddZone("Garcia", -2395.140, -222.589, -5.3, -2354.090, -204.792, 200.000)
2201AddZone("Shady Cabin", -1632.830, -2263.440, -3.0, -1601.330, -2231.790, 200.000)
2202AddZone("East Los Santos", 2381.680, -1494.030, -89.084, 2421.030, -1454.350, 110.916)
2203AddZone("LVA Freight Depot", 1236.630, 1163.410, -89.084, 1277.050, 1203.280, 110.916)
2204AddZone("Blackfield Intersection", 1277.050, 1044.690, -89.084, 1315.350, 1087.630, 110.916)
2205AddZone("Avispa Country Club", -2470.040, -355.493, 0.000, -2270.040, -318.493, 46.100)
2206AddZone("Temple", 1252.330, -926.999, -89.084, 1357.000, -910.170, 110.916)
2207AddZone("Unity Station", 1692.620, -1971.800, -20.492, 1812.620, -1932.800, 79.508)
2208AddZone("LVA Freight Depot", 1315.350, 1044.690, -89.084, 1375.600, 1087.630, 110.916)
2209AddZone("Los Flores", 2581.730, -1454.350, -89.084, 2632.830, -1393.420, 110.916)
2210AddZone("Starfish Casino", 2437.390, 1858.100, -39.084, 2495.090, 1970.850, 60.916)
2211AddZone("Easter Bay Chemicals", -1132.820, -787.391, 0.000, -956.476, -768.027, 200.000)
2212AddZone("Downtown Los Santos", 1370.850, -1170.870, -89.084, 1463.900, -1130.850, 110.916)
2213AddZone("Esplanade East", -1620.300, 1176.520, -4.5, -1580.010, 1274.260, 200.000)
2214AddZone("Market Station", 787.461, -1410.930, -34.126, 866.009, -1310.210, 65.874)
2215AddZone("Linden Station", 2811.250, 1229.590, -39.594, 2861.250, 1407.590, 60.406)
2216AddZone("Montgomery Intersection", 1582.440, 347.457, 0.000, 1664.620, 401.750, 200.000)
2217AddZone("Frederick Bridge", 2759.250, 296.501, 0.000, 2774.250, 594.757, 200.000)
2218AddZone("Yellow Bell Station", 1377.480, 2600.430, -21.926, 1492.450, 2687.360, 78.074)
2219AddZone("Downtown Los Santos", 1507.510, -1385.210, 110.916, 1582.550, -1325.310, 335.916)
2220AddZone("Jefferson", 2185.330, -1210.740, -89.084, 2281.450, -1154.590, 110.916)
2221AddZone("Mulholland", 1318.130, -910.170, -89.084, 1357.000, -768.027, 110.916)
2222AddZone("Avispa Country Club", -2361.510, -417.199, 0.000, -2270.040, -355.493, 200.000)
2223AddZone("Jefferson", 1996.910, -1449.670, -89.084, 2056.860, -1350.720, 110.916)
2224AddZone("Julius Thruway West", 1236.630, 2142.860, -89.084, 1297.470, 2243.230, 110.916)
2225AddZone("Jefferson", 2124.660, -1494.030, -89.084, 2266.210, -1449.670, 110.916)
2226AddZone("Julius Thruway North", 1848.400, 2478.490, -89.084, 1938.800, 2553.490, 110.916)
2227AddZone("Rodeo", 422.680, -1570.200, -89.084, 466.223, -1406.050, 110.916)
2228AddZone("Cranberry Station", -2007.830, 56.306, 0.000, -1922.000, 224.782, 100.000)
2229AddZone("Downtown Los Santos", 1391.050, -1026.330, -89.084, 1463.900, -926.999, 110.916)
2230AddZone("Redsands West", 1704.590, 2243.230, -89.084, 1777.390, 2342.830, 110.916)
2231AddZone("Little Mexico", 1758.900, -1722.260, -89.084, 1812.620, -1577.590, 110.916)
2232AddZone("Blackfield Intersection", 1375.600, 823.228, -89.084, 1457.390, 919.447, 110.916)
2233AddZone("Los Santos International", 1974.630, -2394.330, -39.084, 2089.000, -2256.590, 60.916)
2234AddZone("Beacon Hill", -399.633, -1075.520, -1.489, -319.033, -977.516, 198.511)
2235AddZone("Rodeo", 334.503, -1501.950, -89.084, 422.680, -1406.050, 110.916)
2236AddZone("Richman", 225.165, -1369.620, -89.084, 334.503, -1292.070, 110.916)
2237AddZone("Downtown Los Santos", 1724.760, -1250.900, -89.084, 1812.620, -1150.870, 110.916)
2238AddZone("The Strip", 2027.400, 1703.230, -89.084, 2137.400, 1783.230, 110.916)
2239AddZone("Downtown Los Santos", 1378.330, -1130.850, -89.084, 1463.900, -1026.330, 110.916)
2240AddZone("Blackfield Intersection", 1197.390, 1044.690, -89.084, 1277.050, 1163.390, 110.916)
2241AddZone("Conference Center", 1073.220, -1842.270, -89.084, 1323.900, -1804.210, 110.916)
2242AddZone("Montgomery", 1451.400, 347.457, -6.1, 1582.440, 420.802, 200.000)
2243AddZone("Foster Valley", -2270.040, -430.276, -1.2, -2178.690, -324.114, 200.000)
2244AddZone("Blackfield Chapel", 1325.600, 596.349, -89.084, 1375.600, 795.010, 110.916)
2245AddZone("Los Santos International", 2051.630, -2597.260, -39.084, 2152.450, -2394.330, 60.916)
2246AddZone("Mulholland", 1096.470, -910.170, -89.084, 1169.130, -768.027, 110.916)
2247AddZone("Yellow Bell Gol Course", 1457.460, 2723.230, -89.084, 1534.560, 2863.230, 110.916)
2248AddZone("The Strip", 2027.400, 1783.230, -89.084, 2162.390, 1863.230, 110.916)
2249AddZone("Jefferson", 2056.860, -1210.740, -89.084, 2185.330, -1126.320, 110.916)
2250AddZone("Mulholland", 952.604, -937.184, -89.084, 1096.470, -860.619, 110.916)
2251AddZone("Aldea Malvada", -1372.140, 2498.520, 0.000, -1277.590, 2615.350, 200.000)
2252AddZone("Las Colinas", 2126.860, -1126.320, -89.084, 2185.330, -934.489, 110.916)
2253AddZone("Las Colinas", 1994.330, -1100.820, -89.084, 2056.860, -920.815, 110.916)
2254AddZone("Richman", 647.557, -954.662, -89.084, 768.694, -860.619, 110.916)
2255AddZone("LVA Freight Depot", 1277.050, 1087.630, -89.084, 1375.600, 1203.280, 110.916)
2256AddZone("Julius Thruway North", 1377.390, 2433.230, -89.084, 1534.560, 2507.230, 110.916)
2257AddZone("Willowfield", 2201.820, -2095.000, -89.084, 2324.000, -1989.900, 110.916)
2258AddZone("Julius Thruway North", 1704.590, 2342.830, -89.084, 1848.400, 2433.230, 110.916)
2259AddZone("Temple", 1252.330, -1130.850, -89.084, 1378.330, -1026.330, 110.916)
2260AddZone("Little Mexico", 1701.900, -1842.270, -89.084, 1812.620, -1722.260, 110.916)
2261AddZone("Queens", -2411.220, 373.539, 0.000, -2253.540, 458.411, 200.000)
2262AddZone("Las Venturas Airport", 1515.810, 1586.400, -12.500, 1729.950, 1714.560, 87.500)
2263AddZone("Richman", 225.165, -1292.070, -89.084, 466.223, -1235.070, 110.916)
2264AddZone("Temple", 1252.330, -1026.330, -89.084, 1391.050, -926.999, 110.916)
2265AddZone("East Los Santos", 2266.260, -1494.030, -89.084, 2381.680, -1372.040, 110.916)
2266AddZone("Julius Thruway East", 2623.180, 943.235, -89.084, 2749.900, 1055.960, 110.916)
2267AddZone("Willowfield", 2541.700, -1941.400, -89.084, 2703.580, -1852.870, 110.916)
2268AddZone("Las Colinas", 2056.860, -1126.320, -89.084, 2126.860, -920.815, 110.916)
2269AddZone("Julius Thruway East", 2625.160, 2202.760, -89.084, 2685.160, 2442.550, 110.916)
2270AddZone("Rodeo", 225.165, -1501.950, -89.084, 334.503, -1369.620, 110.916)
2271AddZone("Las Brujas", -365.167, 2123.010, -3.0, -208.570, 2217.680, 200.000)
2272AddZone("Julius Thruway East", 2536.430, 2442.550, -89.084, 2685.160, 2542.550, 110.916)
2273AddZone("Rodeo", 334.503, -1406.050, -89.084, 466.223, -1292.070, 110.916)
2274AddZone("Vinewood", 647.557, -1227.280, -89.084, 787.461, -1118.280, 110.916)
2275AddZone("Rodeo", 422.680, -1684.650, -89.084, 558.099, -1570.200, 110.916)
2276AddZone("Julius Thruway North", 2498.210, 2542.550, -89.084, 2685.160, 2626.550, 110.916)
2277AddZone("Downtown Los Santos", 1724.760, -1430.870, -89.084, 1812.620, -1250.900, 110.916)
2278AddZone("Rodeo", 225.165, -1684.650, -89.084, 312.803, -1501.950, 110.916)
2279AddZone("Jefferson", 2056.860, -1449.670, -89.084, 2266.210, -1372.040, 110.916)
2280AddZone("Hampton Barns", 603.035, 264.312, 0.000, 761.994, 366.572, 200.000)
2281AddZone("Temple", 1096.470, -1130.840, -89.084, 1252.330, -1026.330, 110.916)
2282AddZone("Kincaid Bridge", -1087.930, 855.370, -89.084, -961.950, 986.281, 110.916)
2283AddZone("Verona Beach", 1046.150, -1722.260, -89.084, 1161.520, -1577.590, 110.916)
2284AddZone("Commerce", 1323.900, -1722.260, -89.084, 1440.900, -1577.590, 110.916)
2285AddZone("Mulholland", 1357.000, -926.999, -89.084, 1463.900, -768.027, 110.916)
2286AddZone("Rodeo", 466.223, -1570.200, -89.084, 558.099, -1385.070, 110.916)
2287AddZone("Mulholland", 911.802, -860.619, -89.084, 1096.470, -768.027, 110.916)
2288AddZone("Mulholland", 768.694, -954.662, -89.084, 952.604, -860.619, 110.916)
2289AddZone("Julius Thruway South", 2377.390, 788.894, -89.084, 2537.390, 897.901, 110.916)
2290AddZone("Idlewood", 1812.620, -1852.870, -89.084, 1971.660, -1742.310, 110.916)
2291AddZone("Ocean Docks", 2089.000, -2394.330, -89.084, 2201.820, -2235.840, 110.916)
2292AddZone("Commerce", 1370.850, -1577.590, -89.084, 1463.900, -1384.950, 110.916)
2293AddZone("Julius Thruway North", 2121.400, 2508.230, -89.084, 2237.400, 2663.170, 110.916)
2294AddZone("Temple", 1096.470, -1026.330, -89.084, 1252.330, -910.170, 110.916)
2295AddZone("Glen Park", 1812.620, -1449.670, -89.084, 1996.910, -1350.720, 110.916)
2296AddZone("Easter Bay Airport", -1242.980, -50.096, 0.000, -1213.910, 578.396, 200.000)
2297AddZone("Martin Bridge", -222.179, 293.324, 0.000, -122.126, 476.465, 200.000)
2298AddZone("The Strip", 2106.700, 1863.230, -89.084, 2162.390, 2202.760, 110.916)
2299AddZone("Willowfield", 2541.700, -2059.230, -89.084, 2703.580, -1941.400, 110.916)
2300AddZone("Marina", 807.922, -1577.590, -89.084, 926.922, -1416.250, 110.916)
2301AddZone("Las Venturas Airport", 1457.370, 1143.210, -89.084, 1777.400, 1203.280, 110.916)
2302AddZone("Idlewood", 1812.620, -1742.310, -89.084, 1951.660, -1602.310, 110.916)
2303AddZone("Esplanade East", -1580.010, 1025.980, -6.1, -1499.890, 1274.260, 200.000)
2304AddZone("Downtown Los Santos", 1370.850, -1384.950, -89.084, 1463.900, -1170.870, 110.916)
2305AddZone("The Mako Span", 1664.620, 401.750, 0.000, 1785.140, 567.203, 200.000)
2306AddZone("Rodeo", 312.803, -1684.650, -89.084, 422.680, -1501.950, 110.916)
2307AddZone("Pershing Square", 1440.900, -1722.260, -89.084, 1583.500, -1577.590, 110.916)
2308AddZone("Mulholland", 687.802, -860.619, -89.084, 911.802, -768.027, 110.916)
2309AddZone("Gant Bridge", -2741.070, 1490.470, -6.1, -2616.400, 1659.680, 200.000)
2310AddZone("Las Colinas", 2185.330, -1154.590, -89.084, 2281.450, -934.489, 110.916)
2311AddZone("Mulholland", 1169.130, -910.170, -89.084, 1318.130, -768.027, 110.916)
2312AddZone("Julius Thruway North", 1938.800, 2508.230, -89.084, 2121.400, 2624.230, 110.916)
2313AddZone("Commerce", 1667.960, -1577.590, -89.084, 1812.620, -1430.870, 110.916)
2314AddZone("Rodeo", 72.648, -1544.170, -89.084, 225.165, -1404.970, 110.916)
2315AddZone("Roca Escalante", 2536.430, 2202.760, -89.084, 2625.160, 2442.550, 110.916)
2316AddZone("Rodeo", 72.648, -1684.650, -89.084, 225.165, -1544.170, 110.916)
2317AddZone("Market", 952.663, -1310.210, -89.084, 1072.660, -1130.850, 110.916)
2318AddZone("Las Colinas", 2632.740, -1135.040, -89.084, 2747.740, -945.035, 110.916)
2319AddZone("Mulholland", 861.085, -674.885, -89.084, 1156.550, -600.896, 110.916)
2320AddZone("King's", -2253.540, 373.539, -9.1, -1993.280, 458.411, 200.000)
2321AddZone("Redsands East", 1848.400, 2342.830, -89.084, 2011.940, 2478.490, 110.916)
2322AddZone("Downtown", -1580.010, 744.267, -6.1, -1499.890, 1025.980, 200.000)
2323AddZone("Conference Center", 1046.150, -1804.210, -89.084, 1323.900, -1722.260, 110.916)
2324AddZone("Richman", 647.557, -1118.280, -89.084, 787.461, -954.662, 110.916)
2325AddZone("Ocean Flats", -2994.490, 277.411, -9.1, -2867.850, 458.411, 200.000)
2326AddZone("Greenglass College", 964.391, 930.890, -89.084, 1166.530, 1044.690, 110.916)
2327AddZone("Glen Park", 1812.620, -1100.820, -89.084, 1994.330, -973.380, 110.916)
2328AddZone("LVA Freight Depot", 1375.600, 919.447, -89.084, 1457.370, 1203.280, 110.916)
2329AddZone("Regular Tom", -405.770, 1712.860, -3.0, -276.719, 1892.750, 200.000)
2330AddZone("Verona Beach", 1161.520, -1722.260, -89.084, 1323.900, -1577.590, 110.916)
2331AddZone("East Los Santos", 2281.450, -1372.040, -89.084, 2381.680, -1135.040, 110.916)
2332AddZone("Caligula's Palace", 2137.400, 1703.230, -89.084, 2437.390, 1783.230, 110.916)
2333AddZone("Idlewood", 1951.660, -1742.310, -89.084, 2124.660, -1602.310, 110.916)
2334AddZone("Pilgrim", 2624.400, 1383.230, -89.084, 2685.160, 1783.230, 110.916)
2335AddZone("Idlewood", 2124.660, -1742.310, -89.084, 2222.560, -1494.030, 110.916)
2336AddZone("Queens", -2533.040, 458.411, 0.000, -2329.310, 578.396, 200.000)
2337AddZone("Downtown", -1871.720, 1176.420, -4.5, -1620.300, 1274.260, 200.000)
2338AddZone("Commerce", 1583.500, -1722.260, -89.084, 1758.900, -1577.590, 110.916)
2339AddZone("East Los Santos", 2381.680, -1454.350, -89.084, 2462.130, -1135.040, 110.916)
2340AddZone("Marina", 647.712, -1577.590, -89.084, 807.922, -1416.250, 110.916)
2341AddZone("Richman", 72.648, -1404.970, -89.084, 225.165, -1235.070, 110.916)
2342AddZone("Vinewood", 647.712, -1416.250, -89.084, 787.461, -1227.280, 110.916)
2343AddZone("East Los Santos", 2222.560, -1628.530, -89.084, 2421.030, -1494.030, 110.916)
2344AddZone("Rodeo", 558.099, -1684.650, -89.084, 647.522, -1384.930, 110.916)
2345AddZone("Easter Tunnel", -1709.710, -833.034, -1.5, -1446.010, -730.118, 200.000)
2346AddZone("Rodeo", 466.223, -1385.070, -89.084, 647.522, -1235.070, 110.916)
2347AddZone("Redsands East", 1817.390, 2202.760, -89.084, 2011.940, 2342.830, 110.916)
2348AddZone("The Clown's Pocket", 2162.390, 1783.230, -89.084, 2437.390, 1883.230, 110.916)
2349AddZone("Idlewood", 1971.660, -1852.870, -89.084, 2222.560, -1742.310, 110.916)
2350AddZone("Montgomery Intersection", 1546.650, 208.164, 0.000, 1745.830, 347.457, 200.000)
2351AddZone("Willowfield", 2089.000, -2235.840, -89.084, 2201.820, -1989.900, 110.916)
2352AddZone("Temple", 952.663, -1130.840, -89.084, 1096.470, -937.184, 110.916)
2353AddZone("Prickle Pine", 1848.400, 2553.490, -89.084, 1938.800, 2863.230, 110.916)
2354AddZone("Los Santos International", 1400.970, -2669.260, -39.084, 2189.820, -2597.260, 60.916)
2355AddZone("Garver Bridge", -1213.910, 950.022, -89.084, -1087.930, 1178.930, 110.916)
2356AddZone("Garver Bridge", -1339.890, 828.129, -89.084, -1213.910, 1057.040, 110.916)
2357AddZone("Kincaid Bridge", -1339.890, 599.218, -89.084, -1213.910, 828.129, 110.916)
2358AddZone("Kincaid Bridge", -1213.910, 721.111, -89.084, -1087.930, 950.022, 110.916)
2359AddZone("Verona Beach", 930.221, -2006.780, -89.084, 1073.220, -1804.210, 110.916)
2360AddZone("Verdant Bluffs", 1073.220, -2006.780, -89.084, 1249.620, -1842.270, 110.916)
2361AddZone("Vinewood", 787.461, -1130.840, -89.084, 952.604, -954.662, 110.916)
2362AddZone("Vinewood", 787.461, -1310.210, -89.084, 952.663, -1130.840, 110.916)
2363AddZone("Commerce", 1463.900, -1577.590, -89.084, 1667.960, -1430.870, 110.916)
2364AddZone("Market", 787.461, -1416.250, -89.084, 1072.660, -1310.210, 110.916)
2365AddZone("Rockshore West", 2377.390, 596.349, -89.084, 2537.390, 788.894, 110.916)
2366AddZone("Julius Thruway North", 2237.400, 2542.550, -89.084, 2498.210, 2663.170, 110.916)
2367AddZone("East Beach", 2632.830, -1668.130, -89.084, 2747.740, -1393.420, 110.916)
2368AddZone("Fallow Bridge", 434.341, 366.572, 0.000, 603.035, 555.680, 200.000)
2369AddZone("Willowfield", 2089.000, -1989.900, -89.084, 2324.000, -1852.870, 110.916)
2370AddZone("Chinatown", -2274.170, 578.396, -7.6, -2078.670, 744.170, 200.000)
2371AddZone("El Castillo del Diablo", -208.570, 2337.180, 0.000, 8.430, 2487.180, 200.000)
2372AddZone("Ocean Docks", 2324.000, -2145.100, -89.084, 2703.580, -2059.230, 110.916)
2373AddZone("Easter Bay Chemicals", -1132.820, -768.027, 0.000, -956.476, -578.118, 200.000)
2374AddZone("The Visage", 1817.390, 1703.230, -89.084, 2027.400, 1863.230, 110.916)
2375AddZone("Ocean Flats", -2994.490, -430.276, -1.2, -2831.890, -222.589, 200.000)
2376AddZone("Richman", 321.356, -860.619, -89.084, 687.802, -768.027, 110.916)
2377AddZone("Green Palms", 176.581, 1305.450, -3.0, 338.658, 1520.720, 200.000)
2378AddZone("Richman", 321.356, -768.027, -89.084, 700.794, -674.885, 110.916)
2379AddZone("Starfish Casino", 2162.390, 1883.230, -89.084, 2437.390, 2012.180, 110.916)
2380AddZone("East Beach", 2747.740, -1668.130, -89.084, 2959.350, -1498.620, 110.916)
2381AddZone("Jefferson", 2056.860, -1372.040, -89.084, 2281.450, -1210.740, 110.916)
2382AddZone("Downtown Los Santos", 1463.900, -1290.870, -89.084, 1724.760, -1150.870, 110.916)
2383AddZone("Downtown Los Santos", 1463.900, -1430.870, -89.084, 1724.760, -1290.870, 110.916)
2384AddZone("Garver Bridge", -1499.890, 696.442, -179.615, -1339.890, 925.353, 20.385)
2385AddZone("Julius Thruway South", 1457.390, 823.228, -89.084, 2377.390, 863.229, 110.916)
2386AddZone("East Los Santos", 2421.030, -1628.530, -89.084, 2632.830, -1454.350, 110.916)
2387AddZone("Greenglass College", 964.391, 1044.690, -89.084, 1197.390, 1203.220, 110.916)
2388AddZone("Las Colinas", 2747.740, -1120.040, -89.084, 2959.350, -945.035, 110.916)
2389AddZone("Mulholland", 737.573, -768.027, -89.084, 1142.290, -674.885, 110.916)
2390AddZone("Ocean Docks", 2201.820, -2730.880, -89.084, 2324.000, -2418.330, 110.916)
2391AddZone("East Los Santos", 2462.130, -1454.350, -89.084, 2581.730, -1135.040, 110.916)
2392AddZone("Ganton", 2222.560, -1722.330, -89.084, 2632.830, -1628.530, 110.916)
2393AddZone("Avispa Country Club", -2831.890, -430.276, -6.1, -2646.400, -222.589, 200.000)
2394AddZone("Willowfield", 1970.620, -2179.250, -89.084, 2089.000, -1852.870, 110.916)
2395AddZone("Esplanade North", -1982.320, 1274.260, -4.5, -1524.240, 1358.900, 200.000)
2396AddZone("The High Roller", 1817.390, 1283.230, -89.084, 2027.390, 1469.230, 110.916)
2397AddZone("Ocean Docks", 2201.820, -2418.330, -89.084, 2324.000, -2095.000, 110.916)
2398AddZone("Last Dime Motel", 1823.080, 596.349, -89.084, 1997.220, 823.228, 110.916)
2399AddZone("Bayside Marina", -2353.170, 2275.790, 0.000, -2153.170, 2475.790, 200.000)
2400AddZone("King's", -2329.310, 458.411, -7.6, -1993.280, 578.396, 200.000)
2401AddZone("El Corona", 1692.620, -2179.250, -89.084, 1812.620, -1842.270, 110.916)
2402AddZone("Blackfield Chapel", 1375.600, 596.349, -89.084, 1558.090, 823.228, 110.916)
2403AddZone("The Pink Swan", 1817.390, 1083.230, -89.084, 2027.390, 1283.230, 110.916)
2404AddZone("Julius Thruway West", 1197.390, 1163.390, -89.084, 1236.630, 2243.230, 110.916)
2405AddZone("Los Flores", 2581.730, -1393.420, -89.084, 2747.740, -1135.040, 110.916)
2406AddZone("The Visage", 1817.390, 1863.230, -89.084, 2106.700, 2011.830, 110.916)
2407AddZone("Prickle Pine", 1938.800, 2624.230, -89.084, 2121.400, 2861.550, 110.916)
2408AddZone("Verona Beach", 851.449, -1804.210, -89.084, 1046.150, -1577.590, 110.916)
2409AddZone("Robada Intersection", -1119.010, 1178.930, -89.084, -862.025, 1351.450, 110.916)
2410AddZone("Linden Side", 2749.900, 943.235, -89.084, 2923.390, 1198.990, 110.916)
2411AddZone("Ocean Docks", 2703.580, -2302.330, -89.084, 2959.350, -2126.900, 110.916)
2412AddZone("Willowfield", 2324.000, -2059.230, -89.084, 2541.700, -1852.870, 110.916)
2413AddZone("King's", -2411.220, 265.243, -9.1, -1993.280, 373.539, 200.000)
2414AddZone("Commerce", 1323.900, -1842.270, -89.084, 1701.900, -1722.260, 110.916)
2415AddZone("Mulholland", 1269.130, -768.027, -89.084, 1414.070, -452.425, 110.916)
2416AddZone("Marina", 647.712, -1804.210, -89.084, 851.449, -1577.590, 110.916)
2417AddZone("Battery Point", -2741.070, 1268.410, -4.5, -2533.040, 1490.470, 200.000)
2418AddZone("The Four Dragons Casino", 1817.390, 863.232, -89.084, 2027.390, 1083.230, 110.916)
2419AddZone("Blackfield", 964.391, 1203.220, -89.084, 1197.390, 1403.220, 110.916)
2420AddZone("Julius Thruway North", 1534.560, 2433.230, -89.084, 1848.400, 2583.230, 110.916)
2421AddZone("Yellow Bell Gol Course", 1117.400, 2723.230, -89.084, 1457.460, 2863.230, 110.916)
2422AddZone("Idlewood", 1812.620, -1602.310, -89.084, 2124.660, -1449.670, 110.916)
2423AddZone("Redsands West", 1297.470, 2142.860, -89.084, 1777.390, 2243.230, 110.916)
2424AddZone("Doherty", -2270.040, -324.114, -1.2, -1794.920, -222.589, 200.000)
2425AddZone("Hilltop Farm", 967.383, -450.390, -3.0, 1176.780, -217.900, 200.000)
2426AddZone("Las Barrancas", -926.130, 1398.730, -3.0, -719.234, 1634.690, 200.000)
2427AddZone("Pirates in Men's Pants", 1817.390, 1469.230, -89.084, 2027.400, 1703.230, 110.916)
2428AddZone("City Hall", -2867.850, 277.411, -9.1, -2593.440, 458.411, 200.000)
2429AddZone("Avispa Country Club", -2646.400, -355.493, 0.000, -2270.040, -222.589, 200.000)
2430AddZone("The Strip", 2027.400, 863.229, -89.084, 2087.390, 1703.230, 110.916)
2431AddZone("Hashbury", -2593.440, -222.589, -1.0, -2411.220, 54.722, 200.000)
2432AddZone("Los Santos International", 1852.000, -2394.330, -89.084, 2089.000, -2179.250, 110.916)
2433AddZone("Whitewood Estates", 1098.310, 1726.220, -89.084, 1197.390, 2243.230, 110.916)
2434AddZone("Sherman Reservoir", -789.737, 1659.680, -89.084, -599.505, 1929.410, 110.916)
2435AddZone("El Corona", 1812.620, -2179.250, -89.084, 1970.620, -1852.870, 110.916)
2436AddZone("Downtown", -1700.010, 744.267, -6.1, -1580.010, 1176.520, 200.000)
2437AddZone("Foster Valley", -2178.690, -1250.970, 0.000, -1794.920, -1115.580, 200.000)
2438AddZone("Las Payasadas", -354.332, 2580.360, 2.0, -133.625, 2816.820, 200.000)
2439AddZone("Valle Ocultado", -936.668, 2611.440, 2.0, -715.961, 2847.900, 200.000)
2440AddZone("Blackfield Intersection", 1166.530, 795.010, -89.084, 1375.600, 1044.690, 110.916)
2441AddZone("Ganton", 2222.560, -1852.870, -89.084, 2632.830, -1722.330, 110.916)
2442AddZone("Easter Bay Airport", -1213.910, -730.118, 0.000, -1132.820, -50.096, 200.000)
2443AddZone("Redsands East", 1817.390, 2011.830, -89.084, 2106.700, 2202.760, 110.916)
2444AddZone("Esplanade East", -1499.890, 578.396, -79.615, -1339.890, 1274.260, 20.385)
2445AddZone("Caligula's Palace", 2087.390, 1543.230, -89.084, 2437.390, 1703.230, 110.916)
2446AddZone("Royal Casino", 2087.390, 1383.230, -89.084, 2437.390, 1543.230, 110.916)
2447AddZone("Richman", 72.648, -1235.070, -89.084, 321.356, -1008.150, 110.916)
2448AddZone("Starfish Casino", 2437.390, 1783.230, -89.084, 2685.160, 2012.180, 110.916)
2449AddZone("Mulholland", 1281.130, -452.425, -89.084, 1641.130, -290.913, 110.916)
2450AddZone("Downtown", -1982.320, 744.170, -6.1, -1871.720, 1274.260, 200.000)
2451AddZone("Hankypanky Point", 2576.920, 62.158, 0.000, 2759.250, 385.503, 200.000)
2452AddZone("K.A.C.C. Military Fuels", 2498.210, 2626.550, -89.084, 2749.900, 2861.550, 110.916)
2453AddZone("Harry Gold Parkway", 1777.390, 863.232, -89.084, 1817.390, 2342.830, 110.916)
2454AddZone("Bayside Tunnel", -2290.190, 2548.290, -89.084, -1950.190, 2723.290, 110.916)
2455AddZone("Ocean Docks", 2324.000, -2302.330, -89.084, 2703.580, -2145.100, 110.916)
2456AddZone("Richman", 321.356, -1044.070, -89.084, 647.557, -860.619, 110.916)
2457AddZone("Randolph Industrial Estate", 1558.090, 596.349, -89.084, 1823.080, 823.235, 110.916)
2458AddZone("East Beach", 2632.830, -1852.870, -89.084, 2959.350, -1668.130, 110.916)
2459AddZone("Flint Water", -314.426, -753.874, -89.084, -106.339, -463.073, 110.916)
2460AddZone("Blueberry", 19.607, -404.136, 3.8, 349.607, -220.137, 200.000)
2461AddZone("Linden Station", 2749.900, 1198.990, -89.084, 2923.390, 1548.990, 110.916)
2462AddZone("Glen Park", 1812.620, -1350.720, -89.084, 2056.860, -1100.820, 110.916)
2463AddZone("Downtown", -1993.280, 265.243, -9.1, -1794.920, 578.396, 200.000)
2464AddZone("Redsands West", 1377.390, 2243.230, -89.084, 1704.590, 2433.230, 110.916)
2465AddZone("Richman", 321.356, -1235.070, -89.084, 647.522, -1044.070, 110.916)
2466AddZone("Gant Bridge", -2741.450, 1659.680, -6.1, -2616.400, 2175.150, 200.000)
2467AddZone("Lil' Probe Inn", -90.218, 1286.850, -3.0, 153.859, 1554.120, 200.000)
2468AddZone("Flint Intersection", -187.700, -1596.760, -89.084, 17.063, -1276.600, 110.916)
2469AddZone("Las Colinas", 2281.450, -1135.040, -89.084, 2632.740, -945.035, 110.916)
2470AddZone("Sobell Rail Yards", 2749.900, 1548.990, -89.084, 2923.390, 1937.250, 110.916)
2471AddZone("The Emerald Isle", 2011.940, 2202.760, -89.084, 2237.400, 2508.230, 110.916)
2472AddZone("El Castillo del Diablo", -208.570, 2123.010, -7.6, 114.033, 2337.180, 200.000)
2473AddZone("Santa Flora", -2741.070, 458.411, -7.6, -2533.040, 793.411, 200.000)
2474AddZone("Playa del Seville", 2703.580, -2126.900, -89.084, 2959.350, -1852.870, 110.916)
2475AddZone("Market", 926.922, -1577.590, -89.084, 1370.850, -1416.250, 110.916)
2476AddZone("Queens", -2593.440, 54.722, 0.000, -2411.220, 458.411, 200.000)
2477AddZone("Pilson Intersection", 1098.390, 2243.230, -89.084, 1377.390, 2507.230, 110.916)
2478AddZone("Spinybed", 2121.400, 2663.170, -89.084, 2498.210, 2861.550, 110.916)
2479AddZone("Pilgrim", 2437.390, 1383.230, -89.084, 2624.400, 1783.230, 110.916)
2480AddZone("Blackfield", 964.391, 1403.220, -89.084, 1197.390, 1726.220, 110.916)
2481AddZone("'The Big Ear'", -410.020, 1403.340, -3.0, -137.969, 1681.230, 200.000)
2482AddZone("Dillimore", 580.794, -674.885, -9.5, 861.085, -404.790, 200.000)
2483AddZone("El Quebrados", -1645.230, 2498.520, 0.000, -1372.140, 2777.850, 200.000)
2484AddZone("Esplanade North", -2533.040, 1358.900, -4.5, -1996.660, 1501.210, 200.000)
2485AddZone("Easter Bay Airport", -1499.890, -50.096, -1.0, -1242.980, 249.904, 200.000)
2486AddZone("Fisher's Lagoon", 1916.990, -233.323, -100.000, 2131.720, 13.800, 200.000)
2487AddZone("Mulholland", 1414.070, -768.027, -89.084, 1667.610, -452.425, 110.916)
2488AddZone("East Beach", 2747.740, -1498.620, -89.084, 2959.350, -1120.040, 110.916)
2489AddZone("San Andreas Sound", 2450.390, 385.503, -100.000, 2759.250, 562.349, 200.000)
2490AddZone("Shady Creeks", -2030.120, -2174.890, -6.1, -1820.640, -1771.660, 200.000)
2491AddZone("Market", 1072.660, -1416.250, -89.084, 1370.850, -1130.850, 110.916)
2492AddZone("Rockshore West", 1997.220, 596.349, -89.084, 2377.390, 823.228, 110.916)
2493AddZone("Prickle Pine", 1534.560, 2583.230, -89.084, 1848.400, 2863.230, 110.916)
2494AddZone("Easter Basin", -1794.920, -50.096, -1.04, -1499.890, 249.904, 200.000)
2495AddZone("Leafy Hollow", -1166.970, -1856.030, 0.000, -815.624, -1602.070, 200.000)
2496AddZone("LVA Freight Depot", 1457.390, 863.229, -89.084, 1777.400, 1143.210, 110.916)
2497AddZone("Prickle Pine", 1117.400, 2507.230, -89.084, 1534.560, 2723.230, 110.916)
2498AddZone("Blueberry", 104.534, -220.137, 2.3, 349.607, 152.236, 200.000)
2499AddZone("El Castillo del Diablo", -464.515, 2217.680, 0.000, -208.570, 2580.360, 200.000)
2500AddZone("Downtown", -2078.670, 578.396, -7.6, -1499.890, 744.267, 200.000)
2501AddZone("Rockshore East", 2537.390, 676.549, -89.084, 2902.350, 943.235, 110.916)
2502AddZone("San Fierro Bay", -2616.400, 1501.210, -3.0, -1996.660, 1659.680, 200.000)
2503AddZone("Paradiso", -2741.070, 793.411, -6.1, -2533.040, 1268.410, 200.000)
2504AddZone("The Camel's Toe", 2087.390, 1203.230, -89.084, 2640.400, 1383.230, 110.916)
2505AddZone("Old Venturas Strip", 2162.390, 2012.180, -89.084, 2685.160, 2202.760, 110.916)
2506AddZone("Juniper Hill", -2533.040, 578.396, -7.6, -2274.170, 968.369, 200.000)
2507AddZone("Juniper Hollow", -2533.040, 968.369, -6.1, -2274.170, 1358.900, 200.000)
2508AddZone("Roca Escalante", 2237.400, 2202.760, -89.084, 2536.430, 2542.550, 110.916)
2509AddZone("Julius Thruway East", 2685.160, 1055.960, -89.084, 2749.900, 2626.550, 110.916)
2510AddZone("Verona Beach", 647.712, -2173.290, -89.084, 930.221, -1804.210, 110.916)
2511AddZone("Foster Valley", -2178.690, -599.884, -1.2, -1794.920, -324.114, 200.000)
2512AddZone("Arco del Oeste", -901.129, 2221.860, 0.000, -592.090, 2571.970, 200.000)
2513AddZone("Fallen Tree", -792.254, -698.555, -5.3, -452.404, -380.043, 200.000)
2514AddZone("The Farm", -1209.670, -1317.100, 114.981, -908.161, -787.391, 251.981)
2515AddZone("The Sherman Dam", -968.772, 1929.410, -3.0, -481.126, 2155.260, 200.000)
2516AddZone("Esplanade North", -1996.660, 1358.900, -4.5, -1524.240, 1592.510, 200.000)
2517AddZone("Financial", -1871.720, 744.170, -6.1, -1701.300, 1176.420, 300.000)
2518AddZone("Garcia", -2411.220, -222.589, -1.14, -2173.040, 265.243, 200.000)
2519AddZone("Montgomery", 1119.510, 119.526, -3.0, 1451.400, 493.323, 200.000)
2520AddZone("Creek", 2749.900, 1937.250, -89.084, 2921.620, 2669.790, 110.916)
2521AddZone("Los Santos International", 1249.620, -2394.330, -89.084, 1852.000, -2179.250, 110.916)
2522AddZone("Santa Maria Beach", 72.648, -2173.290, -89.084, 342.648, -1684.650, 110.916)
2523AddZone("Mulholland Intersection", 1463.900, -1150.870, -89.084, 1812.620, -768.027, 110.916)
2524AddZone("Angel Pine", -2324.940, -2584.290, -6.1, -1964.220, -2212.110, 200.000)
2525AddZone("Verdant Meadows", 37.032, 2337.180, -3.0, 435.988, 2677.900, 200.000)
2526AddZone("Octane Springs", 338.658, 1228.510, 0.000, 664.308, 1655.050, 200.000)
2527AddZone("Come-A-Lot", 2087.390, 943.235, -89.084, 2623.180, 1203.230, 110.916)
2528AddZone("Redsands West", 1236.630, 1883.110, -89.084, 1777.390, 2142.860, 110.916)
2529AddZone("Santa Maria Beach", 342.648, -2173.290, -89.084, 647.712, -1684.650, 110.916)
2530AddZone("Verdant Bluffs", 1249.620, -2179.250, -89.084, 1692.620, -1842.270, 110.916)
2531AddZone("Las Venturas Airport", 1236.630, 1203.280, -89.084, 1457.370, 1883.110, 110.916)
2532AddZone("Flint Range", -594.191, -1648.550, 0.000, -187.700, -1276.600, 200.000)
2533AddZone("Verdant Bluffs", 930.221, -2488.420, -89.084, 1249.620, -2006.780, 110.916)
2534AddZone("Palomino Creek", 2160.220, -149.004, 0.000, 2576.920, 228.322, 200.000)
2535AddZone("Ocean Docks", 2373.770, -2697.090, -89.084, 2809.220, -2330.460, 110.916)
2536AddZone("Easter Bay Airport", -1213.910, -50.096, -4.5, -947.980, 578.396, 200.000)
2537AddZone("Whitewood Estates", 883.308, 1726.220, -89.084, 1098.310, 2507.230, 110.916)
2538AddZone("Calton Heights", -2274.170, 744.170, -6.1, -1982.320, 1358.900, 200.000)
2539AddZone("Easter Basin", -1794.920, 249.904, -9.1, -1242.980, 578.396, 200.000)
2540AddZone("Los Santos Inlet", -321.744, -2224.430, -89.084, 44.615, -1724.430, 110.916)
2541AddZone("Doherty", -2173.040, -222.589, -1.0, -1794.920, 265.243, 200.000)
2542AddZone("Mount Chiliad", -2178.690, -2189.910, -47.917, -2030.120, -1771.660, 576.083)
2543AddZone("Fort Carson", -376.233, 826.326, -3.0, 123.717, 1220.440, 200.000)
2544AddZone("Foster Valley", -2178.690, -1115.580, 0.000, -1794.920, -599.884, 200.000)
2545AddZone("Ocean Flats", -2994.490, -222.589, -1.0, -2593.440, 277.411, 200.000)
2546AddZone("Fern Ridge", 508.189, -139.259, 0.000, 1306.660, 119.526, 200.000)
2547AddZone("Bayside", -2741.070, 2175.150, 0.000, -2353.170, 2722.790, 200.000)
2548AddZone("Las Venturas Airport", 1457.370, 1203.280, -89.084, 1777.390, 1883.110, 110.916)
2549AddZone("Blueberry Acres", -319.676, -220.137, 0.000, 104.534, 293.324, 200.000)
2550AddZone("Palisades", -2994.490, 458.411, -6.1, -2741.070, 1339.610, 200.000)
2551AddZone("North Rock", 2285.370, -768.027, 0.000, 2770.590, -269.740, 200.000)
2552AddZone("Hunter Quarry", 337.244, 710.840, -115.239, 860.554, 1031.710, 203.761)
2553AddZone("Los Santos International", 1382.730, -2730.880, -89.084, 2201.820, -2394.330, 110.916)
2554AddZone("Missionary Hill", -2994.490, -811.276, 0.000, -2178.690, -430.276, 200.000)
2555AddZone("San Fierro Bay", -2616.400, 1659.680, -3.0, -1996.660, 2175.150, 200.000)
2556AddZone("Restricted Area", -91.586, 1655.050, -50.000, 421.234, 2123.010, 250.000)
2557AddZone("Mount Chiliad", -2997.470, -1115.580, -47.917, -2178.690, -971.913, 576.083)
2558AddZone("Mount Chiliad", -2178.690, -1771.660, -47.917, -1936.120, -1250.970, 576.083)
2559AddZone("Easter Bay Airport", -1794.920, -730.118, -3.0, -1213.910, -50.096, 200.000)
2560AddZone("The Panopticon", -947.980, -304.320, -1.1, -319.676, 327.071, 200.000)
2561AddZone("Shady Creeks", -1820.640, -2643.680, -8.0, -1226.780, -1771.660, 200.000)
2562AddZone("Back o Beyond", -1166.970, -2641.190, 0.000, -321.744, -1856.030, 200.000)
2563AddZone("Mount Chiliad", -2994.490, -2189.910, -47.917, -2178.690, -1115.580, 576.083)
2564AddZone("Tierra Robada", -1213.910, 596.349, -242.990, -480.539, 1659.680, 900.000)
2565AddZone("Flint County", -1213.910, -2892.970, -242.990, 44.615, -768.027, 900.000)
2566AddZone("Whetstone", -2997.470, -2892.970, -242.990, -1213.910, -1115.580, 900.000)
2567AddZone("Bone County", -480.539, 596.349, -242.990, 869.461, 2993.870, 900.000)
2568AddZone("Tierra Robada", -2997.470, 1659.680, -242.990, -480.539, 2993.870, 900.000)
2569AddZone("San Fierro", -2997.470, -1115.580, -242.990, -1213.910, 1659.680, 900.000)
2570AddZone("Las Venturas", 869.461, 596.349, -242.990, 2997.060, 2993.870, 900.000)
2571AddZone("Red County", -1213.910, -768.027, -242.990, 2997.060, 596.349, 900.000)
2572AddZone("Los Santos", 44.615, -2892.970, -242.990, 2997.060, -768.027, 900.000)
2573}
2574calculateZone(posX, posY, posZ) {
2575if ( bInitZaC == 0 )
2576{
2577initZonesAndCities()
2578bInitZaC := 1
2579}
2580Loop % nZone-1
2581{
2582if (posX >= zone%A_Index%_x1) && (posY >= zone%A_Index%_y1) && (posZ >= zone%A_Index%_z1) && (posX <= zone%A_Index%_x2) && (posY <= zone%A_Index%_y2) && (posZ <= zone%A_Index%_z2)
2583{
2584ErrorLevel := ERROR_OK
2585return zone%A_Index%_name
2586}
2587}
2588ErrorLevel := ERROR_ZONE_NOT_FOUND
2589return "Unbekannt"
2590}
2591calculateCity(posX, posY, posZ) {
2592if ( bInitZaC == 0 )
2593{
2594initZonesAndCities()
2595bInitZaC := 1
2596}
2597smallestCity := "Unbekannt"
2598currentCitySize := 0
2599smallestCitySize := 0
2600Loop % nCity-1
2601{
2602if (posX >= city%A_Index%_x1) && (posY >= city%A_Index%_y1) && (posZ >= city%A_Index%_z1) && (posX <= city%A_Index%_x2) && (posY <= city%A_Index%_y2) && (posZ <= city%A_Index%_z2)
2603{
2604currentCitySize := ((city%A_Index%_x2 - city%A_Index%_x1) * (city%A_Index%_y2 - city%A_Index%_y1) * (city%A_Index%_z2 - city%A_Index%_z1))
2605if (smallestCity == "Unbekannt") || (currentCitySize < smallestCitySize)
2606{
2607smallestCity := city%A_Index%_name
2608smallestCitySize := currentCitySize
2609}
2610}
2611}
2612if(smallestCity == "Unbekannt") {
2613ErrorLevel := ERROR_CITY_NOT_FOUND
2614} else {
2615ErrorLevel := ERROR_OK
2616}
2617return smallestCity
2618}
2619AddZone(sName, x1, y1, z1, x2, y2, z2) {
2620global
2621zone%nZone%_name := sName
2622zone%nZone%_x1 := x1
2623zone%nZone%_y1 := y1
2624zone%nZone%_z1 := z1
2625zone%nZone%_x2 := x2
2626zone%nZone%_y2 := y2
2627zone%nZone%_z2 := z2
2628nZone := nZone + 1
2629}
2630AddCity(sName, x1, y1, z1, x2, y2, z2) {
2631global
2632city%nCity%_name := sName
2633city%nCity%_x1 := x1
2634city%nCity%_y1 := y1
2635city%nCity%_z1 := z1
2636city%nCity%_x2 := x2
2637city%nCity%_y2 := y2
2638city%nCity%_z2 := z2
2639nCity := nCity + 1
2640}
2641IsPlayerInRangeOfPoint(_posX, _posY, _posZ, _posRadius)
2642{
2643GetPlayerPos(posX, posY, posZ)
2644X := posX -_posX
2645Y := posY -_posY
2646Z := posZ -_posZ
2647if(((X < _posRadius) && (X > -_posRadius)) && ((Y < _posRadius) && (Y > -_posRadius)) && ((Z < _posRadius) && (Z > -_posRadius)))
2648return TRUE
2649return FALSE
2650}
2651IsPlayerInRangeOfPoint2D(_posX, _posY, _posRadius)
2652{
2653GetPlayerPos(posX, posY, posZ)
2654X := posX - _posX
2655Y := posY - _posY
2656if(((X < _posRadius) && (X > -_posRadius)) && ((Y < _posRadius) && (Y > -_posRadius)))
2657return TRUE
2658return FALSE
2659}
2660getPlayerZone()
2661{
2662aktPos := getCoordinates()
2663return calculateZone(aktPos[1], aktPos[2], aktPos[3])
2664}
2665getPlayerCity()
2666{
2667aktPos := getCoordinates()
2668return calculateCity(aktPos[1], aktPos[2], aktPos[3])
2669}
2670AntiCrash(){
2671If(!checkHandles())
2672return false
2673cReport := ADDR_SAMP_CRASHREPORT
2674writeMemory(hGTA, dwSAMP + cReport, 0x90909090, 4)
2675cReport += 0x4
2676writeMemory(hGTA, dwSAMP + cReport, 0x90, 1)
2677cReport += 0x9
2678writeMemory(hGTA, dwSAMP + cReport, 0x90909090, 4)
2679cReport += 0x4
2680writeMemory(hGTA, dwSAMP + cReport, 0x90, 1)
2681}
2682writeMemory(hProcess,address,writevalue,length=4, datatype="int") {
2683if(!hProcess) {
2684ErrorLevel := ERROR_INVALID_HANDLE
2685return false
2686}
2687VarSetCapacity(finalvalue,length, 0)
2688NumPut(writevalue,finalvalue,0,datatype)
2689dwRet := DllCall( "WriteProcessMemory"
2690,"Uint",hProcess
2691,"Uint",address
2692,"Uint",&finalvalue
2693,"Uint",length
2694,"Uint",0)
2695if(dwRet == 0) {
2696ErrorLevel := ERROR_WRITE_MEMORY
2697return false
2698}
2699ErrorLevel := ERROR_OK
2700return true
2701}
2702checkHandles() {
2703if(iRefreshHandles+500>A_TickCount)
2704return true
2705iRefreshHandles:=A_TickCount
2706if(!refreshGTA() || !refreshSAMP() || !refreshMemory()) {
2707return false
2708} else {
2709return true
2710}
2711return true
2712}
2713refreshGTA() {
2714newPID := getPID("GTA:SA:MP")
2715if(!newPID) {
2716if(hGTA) {
2717virtualFreeEx(hGTA, pMemory, 0, 0x8000)
2718closeProcess(hGTA)
2719hGTA := 0x0
2720}
2721dwGTAPID := 0
2722hGTA := 0x0
2723dwSAMP := 0x0
2724pMemory := 0x0
2725return false
2726}
2727if(!hGTA || (dwGTAPID != newPID)) {
2728hGTA := openProcess(newPID)
2729if(ErrorLevel) {
2730dwGTAPID := 0
2731hGTA := 0x0
2732dwSAMP := 0x0
2733pMemory := 0x0
2734return false
2735}
2736dwGTAPID := newPID
2737dwSAMP := 0x0
2738pMemory := 0x0
2739return true
2740}
2741return true
2742}
2743refreshSAMP() {
2744if(dwSAMP)
2745return true
2746dwSAMP := getModuleBaseAddress("samp.dll", hGTA)
2747if(!dwSAMP)
2748return false
2749return true
2750}
2751refreshMemory() {
2752if(!pMemory) {
2753pMemory := virtualAllocEx(hGTA, 6144, 0x1000 | 0x2000, 0x40)
2754if(ErrorLevel) {
2755pMemory := 0x0
2756return false
2757}
2758pParam1 := pMemory
2759pParam2 := pMemory + 1024
2760pParam3 := pMemory + 2048
2761pParam4 := pMemory + 3072
2762pParam5 := pMemory + 4096
2763pInjectFunc := pMemory + 5120
2764}
2765return true
2766}
2767getPID(szWindow) {
2768local dwPID := 0
2769WinGet, dwPID, PID, %szWindow%
2770return dwPID
2771}
2772openProcess(dwPID, dwRights = 0x1F0FFF) {
2773hProcess := DllCall("OpenProcess"
2774, "UInt", dwRights
2775, "int", 0
2776, "UInt", dwPID
2777, "Uint")
2778if(hProcess == 0) {
2779ErrorLevel := ERROR_OPEN_PROCESS
2780return 0
2781}
2782ErrorLevel := ERROR_OK
2783return hProcess
2784}
2785closeProcess(hProcess) {
2786if(hProcess == 0) {
2787ErrorLevel := ERROR_INVALID_HANDLE
2788return 0
2789}
2790dwRet := DllCall( "CloseHandle"
2791, "Uint", hProcess
2792, "UInt")
2793ErrorLevel := ERROR_OK
2794}
2795getModuleBaseAddress(sModule, hProcess) {
2796if(!sModule) {
2797ErrorLevel := ERROR_MODULE_NOT_FOUND
2798return 0
2799}
2800if(!hProcess) {
2801ErrorLevel := ERROR_INVALID_HANDLE
2802return 0
2803}
2804dwSize = 1024*4
2805VarSetCapacity(hMods, dwSize)
2806VarSetCapacity(cbNeeded, 4)
2807dwRet := DllCall( "Psapi.dll\EnumProcessModules"
2808, "UInt", hProcess
2809, "UInt", &hMods
2810, "UInt", dwSize
2811, "UInt*", cbNeeded
2812, "UInt")
2813if(dwRet == 0) {
2814ErrorLevel := ERROR_ENUM_PROCESS_MODULES
2815return 0
2816}
2817dwMods := cbNeeded / 4
2818i := 0
2819VarSetCapacity(hModule, 4)
2820VarSetCapacity(sCurModule, 260)
2821while(i < dwMods) {
2822hModule := NumGet(hMods, i*4)
2823DllCall("Psapi.dll\GetModuleFileNameEx"
2824, "UInt", hProcess
2825, "UInt", hModule
2826, "Str", sCurModule
2827, "UInt", 260)
2828SplitPath, sCurModule, sFilename
2829if(sModule == sFilename) {
2830ErrorLevel := ERROR_OK
2831return hModule
2832}
2833i := i + 1
2834}
2835ErrorLevel := ERROR_MODULE_NOT_FOUND
2836return 0
2837}
2838readString(hProcess, dwAddress, dwLen) {
2839if(!hProcess) {
2840ErrorLevel := ERROR_INVALID_HANDLE
2841return 0
2842}
2843VarSetCapacity(sRead, dwLen)
2844dwRet := DllCall( "ReadProcessMemory"
2845, "UInt", hProcess
2846, "UInt", dwAddress
2847, "Str", sRead
2848, "UInt", dwLen
2849, "UInt*", 0
2850, "UInt")
2851if(dwRet == 0) {
2852ErrorLevel := ERROR_READ_MEMORY
2853return 0
2854}
2855ErrorLevel := ERROR_OK
2856if A_IsUnicode
2857return __ansiToUnicode(sRead)
2858return sRead
2859}
2860readFloat(hProcess, dwAddress) {
2861if(!hProcess) {
2862ErrorLevel := ERROR_INVALID_HANDLE
2863return 0
2864}
2865VarSetCapacity(dwRead, 4)
2866dwRet := DllCall( "ReadProcessMemory"
2867, "UInt", hProcess
2868, "UInt", dwAddress
2869, "Str", dwRead
2870, "UInt", 4
2871, "UInt*", 0
2872, "UInt")
2873if(dwRet == 0) {
2874ErrorLevel := ERROR_READ_MEMORY
2875return 0
2876}
2877ErrorLevel := ERROR_OK
2878return NumGet(dwRead, 0, "Float")
2879}
2880readDWORD(hProcess, dwAddress) {
2881if(!hProcess) {
2882ErrorLevel := ERROR_INVALID_HANDLE
2883return 0
2884}
2885VarSetCapacity(dwRead, 4)
2886dwRet := DllCall( "ReadProcessMemory"
2887, "UInt", hProcess
2888, "UInt", dwAddress
2889, "Str", dwRead
2890, "UInt", 4
2891, "UInt*", 0)
2892if(dwRet == 0) {
2893ErrorLevel := ERROR_READ_MEMORY
2894return 0
2895}
2896ErrorLevel := ERROR_OK
2897return NumGet(dwRead, 0, "UInt")
2898}
2899readMem(hProcess, dwAddress, dwLen=4, type="UInt") {
2900if(!hProcess) {
2901ErrorLevel := ERROR_INVALID_HANDLE
2902return 0
2903}
2904VarSetCapacity(dwRead, dwLen)
2905dwRet := DllCall( "ReadProcessMemory"
2906, "UInt", hProcess
2907, "UInt", dwAddress
2908, "Str", dwRead
2909, "UInt", dwLen
2910, "UInt*", 0)
2911if(dwRet == 0) {
2912ErrorLevel := ERROR_READ_MEMORY
2913return 0
2914}
2915ErrorLevel := ERROR_OK
2916return NumGet(dwRead, 0, type)
2917}
2918writeString(hProcess, dwAddress, wString) {
2919if(!hProcess) {
2920ErrorLevel := ERROR_INVALID_HANDLE
2921return false
2922}
2923sString := wString
2924if A_IsUnicode
2925sString := __unicodeToAnsi(wString)
2926dwRet := DllCall( "WriteProcessMemory"
2927, "UInt", hProcess
2928, "UInt", dwAddress
2929, "Str", sString
2930, "UInt", StrLen(wString) + 1
2931, "UInt", 0
2932, "UInt")
2933if(dwRet == 0) {
2934ErrorLEvel := ERROR_WRITE_MEMORY
2935return false
2936}
2937ErrorLevel := ERROR_OK
2938return true
2939}
2940writeRaw(hProcess, dwAddress, pBuffer, dwLen) {
2941if(!hProcess) {
2942ErrorLevel := ERROR_INVALID_HANDLE
2943return false
2944}
2945dwRet := DllCall( "WriteProcessMemory"
2946, "UInt", hProcess
2947, "UInt", dwAddress
2948, "UInt", pBuffer
2949, "UInt", dwLen
2950, "UInt", 0
2951, "UInt")
2952if(dwRet == 0) {
2953ErrorLEvel := ERROR_WRITE_MEMORY
2954return false
2955}
2956ErrorLevel := ERROR_OK
2957return true
2958}
2959Memory_ReadByte(process_handle, address) {
2960VarSetCapacity(value, 1, 0)
2961DllCall("ReadProcessMemory", "UInt", process_handle, "UInt", address, "Str", value, "UInt", 1, "UInt *", 0)
2962return, NumGet(value, 0, "Byte")
2963}
2964callWithParams(hProcess, dwFunc, aParams, bCleanupStack = true) {
2965if(!hProcess) {
2966ErrorLevel := ERROR_INVALID_HANDLE
2967return false
2968}
2969validParams := 0
2970i := aParams.MaxIndex()
2971dwLen := i * 5 + 5 + 1
2972if(bCleanupStack)
2973dwLen += 3
2974VarSetCapacity(injectData, i * 5 + 5 + 3 + 1, 0)
2975i_ := 1
2976while(i > 0) {
2977if(aParams[i][1] != "") {
2978dwMemAddress := 0x0
2979if(aParams[i][1] == "p") {
2980dwMemAddress := aParams[i][2]
2981} else if(aParams[i][1] == "s") {
2982if(i_>3)
2983return false
2984dwMemAddress := pParam%i_%
2985writeString(hProcess, dwMemAddress, aParams[i][2])
2986if(ErrorLevel)
2987return false
2988i_ += 1
2989} else if(aParams[i][1] == "i") {
2990dwMemAddress := aParams[i][2]
2991} else {
2992return false
2993}
2994NumPut(0x68, injectData, validParams * 5, "UChar")
2995NumPut(dwMemAddress, injectData, validParams * 5 + 1, "UInt")
2996validParams += 1
2997}
2998i -= 1
2999}
3000offset := dwFunc - ( pInjectFunc + validParams * 5 + 5 )
3001NumPut(0xE8, injectData, validParams * 5, "UChar")
3002NumPut(offset, injectData, validParams * 5 + 1, "Int")
3003if(bCleanupStack) {
3004NumPut(0xC483, injectData, validParams * 5 + 5, "UShort")
3005NumPut(validParams*4, injectData, validParams * 5 + 7, "UChar")
3006NumPut(0xC3, injectData, validParams * 5 + 8, "UChar")
3007} else {
3008NumPut(0xC3, injectData, validParams * 5 + 5, "UChar")
3009}
3010writeRaw(hGTA, pInjectFunc, &injectData, dwLen)
3011if(ErrorLevel)
3012return false
3013hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
3014if(ErrorLevel)
3015return false
3016waitForSingleObject(hThread, 0xFFFFFFFF)
3017closeProcess(hThread)
3018return true
3019}
3020virtualAllocEx(hProcess, dwSize, flAllocationType, flProtect) {
3021if(!hProcess) {
3022ErrorLevel := ERROR_INVALID_HANDLE
3023return 0
3024}
3025dwRet := DllCall( "VirtualAllocEx"
3026, "UInt", hProcess
3027, "UInt", 0
3028, "UInt", dwSize
3029, "UInt", flAllocationType
3030, "UInt", flProtect
3031, "UInt")
3032if(dwRet == 0) {
3033ErrorLEvel := ERROR_ALLOC_MEMORY
3034return 0
3035}
3036ErrorLevel := ERROR_OK
3037return dwRet
3038}
3039virtualFreeEx(hProcess, lpAddress, dwSize, dwFreeType) {
3040if(!hProcess) {
3041ErrorLevel := ERROR_INVALID_HANDLE
3042return 0
3043}
3044dwRet := DllCall( "VirtualFreeEx"
3045, "UInt", hProcess
3046, "UInt", lpAddress
3047, "UInt", dwSize
3048, "UInt", dwFreeType
3049, "UInt")
3050if(dwRet == 0) {
3051ErrorLEvel := ERROR_FREE_MEMORY
3052return 0
3053}
3054ErrorLevel := ERROR_OK
3055return dwRet
3056}
3057createRemoteThread(hProcess, lpThreadAttributes, dwStackSize, lpStartAddress, lpParameter, dwCreationFlags, lpThreadId) {
3058if(!hProcess) {
3059ErrorLevel := ERROR_INVALID_HANDLE
3060return 0
3061}
3062dwRet := DllCall( "CreateRemoteThread"
3063, "UInt", hProcess
3064, "UInt", lpThreadAttributes
3065, "UInt", dwStackSize
3066, "UInt", lpStartAddress
3067, "UInt", lpParameter
3068, "UInt", dwCreationFlags
3069, "UInt", lpThreadId
3070, "UInt")
3071if(dwRet == 0) {
3072ErrorLEvel := ERROR_ALLOC_MEMORY
3073return 0
3074}
3075ErrorLevel := ERROR_OK
3076return dwRet
3077}
3078waitForSingleObject(hThread, dwMilliseconds) {
3079if(!hThread) {
3080ErrorLevel := ERROR_INVALID_HANDLE
3081return 0
3082}
3083dwRet := DllCall( "WaitForSingleObject"
3084, "UInt", hThread
3085, "UInt", dwMilliseconds
3086, "UInt")
3087if(dwRet == 0xFFFFFFFF) {
3088ErrorLEvel := ERROR_WAIT_FOR_OBJECT
3089return 0
3090}
3091ErrorLevel := ERROR_OK
3092return dwRet
3093}
3094__ansiToUnicode(sString, nLen = 0) {
3095If !nLen
3096{
3097nLen := DllCall("MultiByteToWideChar"
3098, "Uint", 0
3099, "Uint", 0
3100, "Uint", &sString
3101, "int", -1
3102, "Uint", 0
3103, "int", 0)
3104}
3105VarSetCapacity(wString, nLen * 2)
3106DllCall("MultiByteToWideChar"
3107, "Uint", 0
3108, "Uint", 0
3109, "Uint", &sString
3110, "int", -1
3111, "Uint", &wString
3112, "int", nLen)
3113return wString
3114}
3115__unicodeToAnsi(wString, nLen = 0) {
3116pString := wString + 1 > 65536 ? wString : &wString
3117If !nLen
3118{
3119nLen := DllCall("WideCharToMultiByte"
3120, "Uint", 0
3121, "Uint", 0
3122, "Uint", pString
3123, "int", -1
3124, "Uint", 0
3125, "int", 0
3126, "Uint", 0
3127, "Uint", 0)
3128}
3129VarSetCapacity(sString, nLen)
3130DllCall("WideCharToMultiByte"
3131, "Uint", 0
3132, "Uint", 0
3133, "Uint", pString
3134, "int", -1
3135, "str", sString
3136, "int", nLen
3137, "Uint", 0
3138, "Uint", 0)
3139return sString
3140}
3141global SAMP_MAX_VEHICLES := 2000
3142global SAMP_PPOOL_VEHICLE_OFFSET := 0x1C
3143global VEHPOOL_iVehicleCount := 0x0
3144global VEHPOOL_iIsListed := 0x3074
3145global VEHPOOL_pGTA_Vehicle := 0x4FB4
3146global iRefreshVeh := 0
3147global oVehiclePoolData := []
3148global iUpdateTickVeh := 1000
3149getVehicleID() {
3150if (!checkHandles())
3151return -1
3152vID := readMem(hGTA, readDWORD(hGTA, dwSAMP + 0x13C848) + 0x14, 2, "Short")
3153if (ErrorLevel || !vID || vID > 2000)
3154return -1
3155return vID
3156}
3157GetVehicleModelIDByVPed(dwvPed) {
3158checkHandles()
3159id := readMem(hGTA, dwvPed + 0x22, 2, "Short")
3160return id
3161}
3162getStreamedVehicles() {
3163if (!checkHandles())
3164return false
3165if (iRefreshVeh + iUpdateTickVeh > A_TickCount)
3166return true
3167oVehiclePoolData := []
3168iRefreshVeh := A_TickCount
3169dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
3170dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
3171stVehiclePool := readDWORD(hGTA, dwAddress + 0x1C)
3172vehicleoffset := 0
3173Loop, % SAMP_MAX_VEHICLES
3174{
3175index := A_Index - 1, vehicleoffset += 4
3176iIsListed := readDWORD(hGTA, stVehiclePool + VEHPOOL_iIsListed + index * 0x4)
3177if (iIsListed == 0)
3178continue
3179ptrGTAVeh := readDWORD(hGTA, stVehiclePool + VEHPOOL_pGTA_Vehicle + index * 0x4)
3180if (ptrGTAVeh == 0)
3181continue
3182dwDriver := readDWORD(hGTA, ptrGTAVeh + 1120)
3183occupied := dwDriver != 0 ? 1 : 0
3184GTACARid := GetVehicleModelIDByVPed(ptrGTAVeh)
3185sVehId := Round((vehicleoffset / 4) - 1)
3186if (GTACARid > 400 && GTACARid < 611)
3187oVehiclePoolData[index] := Object("PTR", ptrGTAVeh, "SAMPID", sVehId, "CARNAME", ovehicleNames[GTACARid - 399], "OCCUPIED", occupied)
3188}
3189return true
3190}
3191getVehiclePointer(wID) {
3192if (wID < 1 || wID > SAMP_MAX_VEHICLES || !checkHandles())
3193return false
3194var1 := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
3195var2 := readDWORD(hGTA, var1 + SAMP_PPOOLS_OFFSET)
3196stVehiclePool := readDWORD(hGTA, var2 + SAMP_PPOOL_VEHICLE_OFFSET)
3197if (stVehiclePool) {
3198var3 := readDWORD(hGTA, stVehiclePool + 0x4FB4 + wID * 0x4)
3199return var3
3200} else {
3201return false
3202}
3203}
3204getVehicleNumberPlate() {
3205if (!checkHandles())
3206return ""
3207dwVehPtr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
3208if (ErrorLevel || dwVehPtr==0) {
3209ErrorLevel := ERROR_READ_MEMORY
3210return ""
3211}
3212dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
3213if (ErrorLevel || dwAddress==0) {
3214ErrorLevel := ERROR_READ_MEMORY
3215return ""
3216}
3217dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
3218if (ErrorLevel || dwAddress==0) {
3219ErrorLevel := ERROR_READ_MEMORY
3220return ""
3221}
3222vehpool := readDWORD(hGTA, dwAddress + 0x1C)
3223if (ErrorLevel || vehpool==0) {
3224ErrorLevel := ERROR_READ_MEMORY
3225return ""
3226}
3227Loop, 2000
3228{
3229i := A_Index-1
3230listed := readDWORD(hGTA, vehpool + 0x3074 + i*4)
3231if (ErrorLevel) {
3232ErrorLevel := ERROR_READ_MEMORY
3233return ""
3234}
3235if (listed==0)
3236continue
3237svehptr := readDWORD(hGTA, vehpool + 0x4FB4 + i*4)
3238if (ErrorLevel) {
3239ErrorLevel := ERROR_READ_MEMORY
3240return ""
3241}
3242if (svehptr==dwVehPtr) {
3243sampveh := readDWORD(hGTA, vehpool + 0x1134 + i*4)
3244if (ErrorLevel || sampveh==0) {
3245ErrorLevel := ERROR_READ_MEMORY
3246return ""
3247}
3248plate := readString(hGTA, sampveh + 0x93, 32)
3249if (ErrorLevel) {
3250ErrorLevel := ERROR_READ_MEMORY
3251return ""
3252}
3253ErrorLevel := ERROR_OK
3254return plate
3255}
3256}
3257ErrorLevel := ERROR_OK
3258return ""
3259}
3260getVehicleNumberPlateById(wID) {
3261if (!checkHandles())
3262return ""
3263dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
3264if (ErrorLevel || dwAddress==0) {
3265ErrorLevel := ERROR_READ_MEMORY
3266return ""
3267}
3268dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
3269if (ErrorLevel || dwAddress==0) {
3270ErrorLevel := ERROR_READ_MEMORY
3271return ""
3272}
3273vehpool := readDWORD(hGTA, dwAddress + 0x1C)
3274if (ErrorLevel || vehpool==0) {
3275ErrorLevel := ERROR_READ_MEMORY
3276return ""
3277}
3278listed := readDWORD(hGTA, vehpool + 0x3074 + wID*4)
3279if (ErrorLevel || listed==0) {
3280ErrorLevel := ERROR_READ_MEMORY
3281return ""
3282}
3283svehptr := readDWORD(hGTA, vehpool + 0x4FB4 + wID*4)
3284if (ErrorLevel) {
3285ErrorLevel := ERROR_READ_MEMORY
3286return ""
3287}
3288sampveh := readDWORD(hGTA, vehpool + 0x1134 + wID*4)
3289if (ErrorLevel || sampveh==0) {
3290ErrorLevel := ERROR_READ_MEMORY
3291return ""
3292}
3293plate := readString(hGTA, sampveh + 0x93, 32)
3294if (ErrorLevel) {
3295ErrorLevel := ERROR_READ_MEMORY
3296return ""
3297}
3298ErrorLevel := ERROR_OK
3299return plate
3300}
3301getVehiclePos(dwVehPtr = 0xBA18FC) {
3302if (!checkHandles())
3303return false
3304if (dwVehPtr = ADDR_VEHICLE_PTR)
3305dwVehPtr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
3306dwAddress := readDWORD(hGTA, dwVehPtr + 0x14)
3307if (!dwAddress)
3308return false
3309fX := readFloat(hGTA, dwAddress + 0x30)
3310fY := readFloat(hGTA, dwAddress + 0x34)
3311fZ := readFloat(hGTA, dwAddress + 0x38)
3312vehicleID := readDWORD(hGTA, dwVehPtr + 0x22)
3313return [fX, fY, fZ, vehicleID]
3314}
3315getVehicleRot(dwVehPtr = 0xBA18FC) {
3316if (!checkHandles())
3317return false
3318if (dwVehPtr = ADDR_VEHICLE_PTR)
3319dwVehPtr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
3320dwAddress := readDWORD(hGTA, dwVehPtr + 0x14)
3321if (!dwAddress)
3322return false
3323rotX := readFloat(hGTA, dwAddress + 0x0)
3324rotY := readFloat(hGTA, dwAddress + 0x4)
3325rotZ := readFloat(hGTA, dwAddress + 0x8)
3326vehicleID := readDWORD(hGTA, dwVehPtr + 0x22)
3327return [rotX, rotY, rotZ, vehicleID]
3328}
3329getSeatIDs(errorMessage := true) {
3330if (!checkHandles())
3331return -1
3332dw := readDWORD(hGTA, 0xBA18FC)
3333if (dw) {
3334driver := readDWORD(hGTA, dw + 0x460)
3335psg1 := readDWORD(hGTA, dw + 0x464)
3336psg2 := readDWORD(hGTA, dw + 0x468)
3337psg3 := readDWORD(hGTA, dw + 0x46C)
3338psg4 := readDWORD(hGTA, dw + 0x470)
3339psg5 := readDWORD(hGTA, dw + 0x474)
3340psg6 := readDWORD(hGTA, dw + 0x478)
3341psg7 := readDWORD(hGTA, dw + 0x47C)
3342psg8 := readDWORD(hGTA, dw + 0x480)
3343psg9 := readDWORD(hGTA, dw + 0x484)
3344return [getIdByPed(driver), getIdByPed(psg1), getIdByPed(psg2), getIdByPed(psg3), getIdByPed(psg4), getIdByPed(psg5), getIdByPed(psg6), getIdByPed(psg7), getIdByPed(psg8), getIdByPed(psg9)]
3345} else if (errorMessage) {
3346addChatMessage2(PREFIX . "Du befindest dich nicht in einem Fahrzeug!")
3347}
3348return false
3349}
3350GetVehicleColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleColor")
3351GetVehicleColor(ByRef int_ColorFirst, ByRef int_ColorSecond) {
3352global GetVehicleColor_func
3353res := DllCall(GetVehicleColor_func, IntP, int_ColorFirst, IntP, int_ColorSecond)
3354return res
3355}
3356createTextLabel(sText, dwColor, fX, fY, fZ, fDrawDistance := 50.0, bTestLOS := 0, wPlayerID := 0xFFFF, wVehicleID := 0xFFFF) {
3357if (!checkHandles()) {
3358return -1
3359}
3360dwAddress := readDWORD(hGTA, readDWORD(hGTA, readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET) + SAMP_PPOOLS_OFFSET) + 0xC)
3361Loop, 2048 {
3362wID := A_Index - 1
3363if (!readDWORD(hGTA, dwAddress + 0xE800 + wID * 4)) {
3364return callWithParams2(hGTA, dwSAMP + 0x11C0, [["i", dwAddress], ["i", wID], ["s", sText], ["i", dwColor], ["f", fX], ["f", fY], ["f", fZ]
3365, ["f", fDrawDistance], ["i", bTestLOS], ["i", wPlayerID], ["i", wVehicleID]], false, true) ? wID : -1
3366}
3367}
3368return -1
3369}
3370updateTextLabel(wID, sText, dwColor) {
3371if (wID < 0 || wID > 2047 || !checkHandles()) {
3372return false
3373}
3374dwAddress := readDWORD(hGTA, readDWORD(hGTA, readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET) + SAMP_PPOOLS_OFFSET) + 0xC)
3375fX := readFloat(hGTA, dwAddress + wID * 0x1D + 0x8)
3376fY := readFloat(hGTA, dwAddress + wID * 0x1D + 0xC)
3377fZ := readFloat(hGTA, dwAddress + wID * 0x1D + 0x10)
3378fDrawDistance := readFloat(hGTA, dwAddress + wID * 0x1D + 0x14)
3379bTestLOS := readMem(hGTA, dwAddress + wID * 0x1D + 0x18, 1, "Byte")
3380wPlayerID := readMem(hGTA, dwAddress + wID * 0x1D + 0x19, 2, "UShort")
3381wVehicleID := readMem(hGTA, dwAddress + wID * 0x1D + 0x1B, 2, "UShort")
3382return callWithParams2(hGTA, dwSAMP + 0x11C0, [["i", dwAddress], ["i", wID], ["s", sText], ["i", dwColor], ["f", fX], ["f", fY], ["f", fZ], ["f", fDrawDistance], ["i", bTestLOS], ["i", wPlayerID], ["i", wVehicleID]], false, true)
3383}
3384deleteTextLabel(ByRef wID) {
3385if (!checkHandles()) {
3386return false
3387}
3388dwAddress := readDWORD(hGTA, readDWORD(hGTA, readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET) + SAMP_PPOOLS_OFFSET) + 0xC)
3389if (callWithParams2(hGTA, dwSAMP + 0x12D0, [["i", dwAddress], ["i", wID]], false, true)) {
3390wID := -1
3391return true
3392}
3393return false
3394}
3395global SAMP_3DTEXT := 0x12C7BC
3396getLabelText() {
3397if (!checkHandles()) {
3398return -1
3399}
3400ADDR_3DText := readDWORD(hGTA, dwSAMP + SAMP_3DTEXT)
3401TEXT_3DTEXT := readString(hGTA, ADDR_3DText, 512)
3402return TEXT_3DTEXT
3403}
3404global iRefreshTL := 0
3405global oTextLabelData := ""
3406global iUpdateTickTL := 1000
3407updateTextLabelData() {
3408if (!checkHandles())
3409return 0
3410if (iRefreshTL+iUpdateTickTL > A_TickCount)
3411return 1
3412oTextLabelData := []
3413iRefreshTL := A_TickCount
3414dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
3415if (ErrorLevel || dwAddress==0) {
3416ErrorLevel := ERROR_READ_MEMORY
3417return 0
3418}
3419dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
3420if (ErrorLevel || dwAddress==0) {
3421ErrorLevel := ERROR_READ_MEMORY
3422return 0
3423}
3424dwTextLabels := readDWORD(hGTA, dwAddress + 12)
3425if (ErrorLevel || dwTextDraws==0) {
3426ErrorLevel := ERROR_READ_MEMORY
3427return 0
3428}
3429Loop, % 2048
3430{
3431i := A_Index-1
3432dwIsActive := readDWORD(hGTA, dwTextLabels + 59392 + i*4)
3433if (ErrorLevel) {
3434ErrorLevel := ERROR_READ_MEMORY
3435return 0
3436}
3437if (dwIsActive==0)
3438continue
3439dwAddr := readDWORD(hGTA, dwTextLabels + i*29)
3440if (ErrorLevel) {
3441ErrorLevel := ERROR_READ_MEMORY
3442return 0
3443}
3444if (dwAddr==0)
3445continue
3446sText := readString(hGTA, dwAddr, 256)
3447if (ErrorLevel) {
3448ErrorLevel := ERROR_READ_MEMORY
3449return 0
3450}
3451fX := readFloat(hGTA, dwTextLabels + i*29 +8)
3452if (ErrorLevel) {
3453ErrorLevel := ERROR_READ_MEMORY
3454return 0
3455}
3456fY := readFloat(hGTA, dwTextLabels + i*29 +12)
3457if (ErrorLevel) {
3458ErrorLevel := ERROR_READ_MEMORY
3459return 0
3460}
3461fZ := readFloat(hGTA, dwTextLabels + i*29 +16)
3462if (ErrorLevel) {
3463ErrorLevel := ERROR_READ_MEMORY
3464return 0
3465}
3466wPlayerID := readMem(hGTA, dwTextLabels + i * 0x1D + 0x19, 2, "UShort")
3467wVehicleID := readMem(hGTA, dwTextLabels + i * 0x1D + 0x1B, 2, "UShort")
3468oTextLabelData[i] := Object("TEXT", sText, "XPOS", fX , "YPOS", fY , "ZPOS", fZ, "PLAYERID", wPlayerID, "VEHICLEID", wVehicleID)
3469}
3470ErrorLevel := ERROR_OK
3471return 1
3472}
3473countLabels() {
3474if (!updateTextLabelData())
3475return -1
3476j := 0
3477For i, o in oTextLabelData
3478{
3479j += 1
3480}
3481return j
3482}
3483printLabels() {
3484if (!updateTextLabelData())
3485return
3486For i, o in oTextLabelData
3487{
3488addChatMessage2("ID: " . i . ", x:" . o.XPOS . ", y:" . o.YPOS . ", z:" . o.ZPOS . ", player: " . o.PLAYERID . ", vehicle: " . o.VEHICLEID)
3489addChatMessage2("{FFFFFF}" . o.TEXT)
3490}
3491}
3492createTextDraw(sString, fX, fY, dwLetterColor := 0xFFFFFFFF, bFont := 3, fLetterWidth := 0.4, fLetterHeight := 1, bShadowSize := 0, bOutline := 1
3493, dwShadowColor := 0xFF000000, bBox := 0, dwBoxColor := 0xFFFFFFFF, fBoxSizeX := 0.0, fBoxSizeY := 0.0, bLeft := 0, bRight := 0, bCenter := 1
3494, bProportional := 1, wModel := 0, fXRot := 0.0, fYRot := 0.0, fZRot := 0.0, fZoom := 1.0, wColor1 := 0xFFFF, wColor2 := 0xFFFF) {
3495if (StrLen(sString) > 800 || bFont > 5 || !checkHandles())
3496return -1
3497dwAddress := readDWORD(hGTA, readDWORD(hGTA, readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET) + SAMP_PPOOLS_OFFSET) + 0x10)
3498Loop, 2048 {
3499wID := A_Index - 1
3500if (!readDWORD(hGTA, dwAddress + wID * 4)) {
3501VarSetCapacity(struct, 63, 0)
3502NumPut((bBox ? 1 : 0) + (bLeft ? 2 : 0) + (bRight ? 4 : 0) + (bCenter ? 8 : 0) + (bProportional ? 16 : 0), &struct, 0, "Byte")
3503NumPut(fLetterWidth, &struct, 1, "Float")
3504NumPut(fLetterHeight, &struct, 5, "Float")
3505NumPut(dwLetterColor, &struct, 9, "Int")
3506NumPut(fBoxSizeX, &struct, 0xD, "Float")
3507NumPut(fBoxSizeY, &struct, 0x11, "Float")
3508NumPut(dwBoxColor, &struct, 0x15, "Int")
3509NumPut(bShadowSize, &struct, 0x19, "Byte")
3510NumPut(bOutline, &struct, 0x1A, "Byte")
3511NumPut(dwShadowColor, &struct, 0x1B, "Int")
3512NumPut(bFont, &struct, 0x1F, "Byte")
3513NumPut(1, &struct, 0x20, "Byte")
3514NumPut(fX, &struct, 0x21, "Float")
3515NumPut(fY, &struct, 0x25, "Float")
3516NumPut(wModel, &struct, 0x29, "Short")
3517NumPut(fXRot, &struct, 0x2B, "Float")
3518NumPut(fYRot, &struct, 0x2F, "Float")
3519NumPut(fZRot, &struct, 0x33, "Float")
3520NumPut(fZoom, &struct, 0x37, "Float")
3521NumPut(wColor1, &struct, 0x3B, "Short")
3522NumPut(wColor2, &struct, 0x3D, "Short")
3523writeRaw(hGTA, pParam5, &struct, 63)
3524if (ErrorLevel)
3525return -1
3526return callWithParams2(hGTA, dwSAMP + 0x1AE20, [["i", dwAddress], ["i", wID], ["i", pParam5], ["s", sString]], false, true) ? wID : -1
3527}
3528}
3529return -1
3530}
3531moveTextDraw(wID, xPos, yPos) {
3532if (wID < 0 || wID > 2047 || !checkHandles())
3533return false
3534dwAddress := readDWORD(hGTA, readDWORD(hGTA, readDWORD(hGTA, readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET) + SAMP_PPOOLS_OFFSET) + 0x10) + wID * 4 + (4 * (SAMP_MAX_PLAYERTEXTDRAWS + SAMP_MAX_TEXTDRAWS)))
3535return writeMemory(hGTA, dwAddress + 0x98B, xPos, 4, "Float") && writeMemory(hGTA, dwAddress + 0x98F, yPos, 4, "Float")
3536}
3537updateTextDraw(wID, sString) {
3538if (wID < 0 || wID > 2047 || StrLen(sString) > 800 || !checkHandles())
3539return false
3540dwAddress := readDWORD(hGTA, readDWORD(hGTA, readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET) + SAMP_PPOOLS_OFFSET) + 0x10)
3541return writeString(hGTA, readDWORD(hGTA, dwAddress + wID * 4 + (4 * (SAMP_MAX_PLAYERTEXTDRAWS + SAMP_MAX_TEXTDRAWS))), sString)
3542}
3543deleteTextDraw(ByRef wID) {
3544if (wID < 0 || wID > 2047 || !checkHandles())
3545return false
3546dwAddress := readDWORD(hGTA, readDWORD(hGTA, readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET) + SAMP_PPOOLS_OFFSET) + 0x10)
3547if (callWithParams2(hGTA, dwSAMP + 0x1AD00, [["i", dwAddress], ["i", wID]], false, true)) {
3548wID := -1
3549return true
3550}
3551return false
3552}
3553global TEXT_DRAW_POOL_OFFSET := 0x10
3554global SAMP_MAX_PLAYERTEXTDRAWS := 256
3555global SAMP_MAX_TEXTDRAWS := 2048
3556global iRefreshTD := 0
3557global iUpdateTickTD := 1000
3558global oTextDraws := []
3559updateTextDraws() {
3560if (!checkHandles())
3561return 0
3562if (iRefreshTD + iUpdateTickTD > A_TickCount)
3563return 1
3564oTextDraws := []
3565iRefreshTD := A_TickCount
3566dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
3567if (ErrorLevel || !dwAddress) {
3568ErrorLevel := ERROR_READ_MEMORY
3569return 0
3570}
3571dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
3572if (ErrorLevel || !dwAddress) {
3573ErrorLevel := ERROR_READ_MEMORY
3574return 0
3575}
3576dwTextDraw := readDWORD(hGTA, dwAddress + TEXT_DRAW_POOL_OFFSET)
3577if (ErrorLevel || !dwTextDraw) {
3578ErrorLevel := ERROR_READ_MEMORY
3579return 0
3580}
3581Loop, % SAMP_MAX_TEXTDRAWS
3582{
3583i := A_Index - 1
3584dwIsActive := readDWORD(hGTA, dwTextDraw + i * 4)
3585if (ErrorLevel) {
3586ErrorLevel := ERROR_READ_MEMORY
3587return 0
3588}
3589if (!dwIsActive)
3590continue
3591dwAddr := readDWORD(hGTA, dwTextDraw + i * 4 + (4 * (SAMP_MAX_PLAYERTEXTDRAWS + SAMP_MAX_TEXTDRAWS)))
3592if (ErrorLevel) {
3593ErrorLevel := ERROR_READ_MEMORY
3594return 0
3595}
3596if (!dwAddr)
3597continue
3598sText := readString(hGTA, dwAddr, 800)
3599if (ErrorLevel) {
3600ErrorLevel := ERROR_READ_MEMORY
3601return 0
3602}
3603oTextDraws[i] := sText
3604}
3605ErrorLevel := ERROR_OK
3606return 1
3607}
3608printTextDraws() {
3609if (!updateTextDraws())
3610return
3611oReplace := ["~s~", "~r~", "~w~", "~h~", "~g~", "~y~", "~n~", "~b~", " ", " "]
3612For i, o in oTextDraws
3613{
3614Loop % oReplace.MaxIndex() {
3615o := StrReplace(o, oReplace[A_Index], " ")
3616}
3617addChatMessage2(o)
3618}
3619return
3620}
3621getTextDrawBySubstring(substring) {
3622if (!updateTextDraws())
3623return
3624oReplace := ["~s~", "~r~", "~w~", "~h~", "~g~", "~y~", "~n~", "~b~", " ", " "]
3625For i, o in oTextDraws
3626{
3627if (!InStr(o, substring))
3628continue
3629Loop % oReplace.MaxIndex()
3630o := StrReplace(o, oReplace[A_Index], " ")
3631return o
3632}
3633}
3634restartGameEx() {
3635if (!checkHandles())
3636return -1
3637dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
3638if (ErrorLevel || dwAddress == 0) {
3639ErrorLevel := ERROR_READ_MEMORY
3640return -1
3641}
3642dwFunc := dwSAMP + 0xA060
3643VarSetCapacity(injectData, 11, 0)
3644NumPut(0xB9, injectData, 0, "UChar")
3645NumPut(dwAddress, injectData, 1, "UInt")
3646NumPut(0xE8, injectData, 5, "UChar")
3647offset := dwFunc - (pInjectFunc + 10)
3648NumPut(offset, injectData, 6, "Int")
3649NumPut(0xC3, injectData, 10, "UChar")
3650writeRaw(hGTA, pInjectFunc, &injectData, 11)
3651if (ErrorLevel)
3652return false
3653hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
3654if (ErrorLevel)
3655return false
3656waitForSingleObject(hThread, 0xFFFFFFFF)
3657return true
3658}
3659disconnectEx() {
3660if (!checkHandles())
3661return 0
3662dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
3663if (ErrorLevel || dwAddress==0) {
3664ErrorLevel := ERROR_READ_MEMORY
3665return 0
3666}
3667dwAddress := readDWORD(hGTA, dwAddress + 0x3c9)
3668if (ErrorLevel || dwAddress==0) {
3669ErrorLevel := ERROR_READ_MEMORY
3670return 0
3671}
3672ecx := dwAddress
3673dwAddress := readDWORD(hGTA, dwAddress)
3674if (ErrorLevel || dwAddress==0) {
3675ErrorLevel := ERROR_READ_MEMORY
3676return 0
3677}
3678VarSetCapacity(injectData, 24, 0)
3679NumPut(0xB9, injectData, 0, "UChar")
3680NumPut(ecx, injectData, 1, "UInt")
3681NumPut(0xB8, injectData, 5, "UChar")
3682NumPut(dwAddress, injectData, 6, "UInt")
3683NumPut(0x68, injectData, 10, "UChar")
3684NumPut(0, injectData, 11, "UInt")
3685NumPut(0x68, injectData, 15, "UChar")
3686NumPut(500, injectData, 16, "UInt")
3687NumPut(0x50FF, injectData, 20, "UShort")
3688NumPut(0x08, injectData, 22, "UChar")
3689NumPut(0xC3, injectData, 23, "UChar")
3690writeRaw(hGTA, pInjectFunc, &injectData, 24)
3691if (ErrorLevel)
3692return false
3693hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
3694if (ErrorLevel)
3695return false
3696waitForSingleObject(hThread, 0xFFFFFFFF)
3697return true
3698}
3699setRestart() {
3700VarSetCapacity(old, 4, 0)
3701dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
3702if (ErrorLevel || dwAddress==0) {
3703ErrorLevel := ERROR_READ_MEMORY
3704return 0
3705}
3706NumPut(9,old,0,"Int")
3707writeRaw(hGTA, dwAddress + 957, &old, 4)
3708}
3709restart() {
3710restartGameEx()
3711Sleep, 2000
3712disconnectEx()
3713Sleep, 2000
3714setRestart()
3715}
3716addChatMessage2(text, color := 0xFFFFFFFF, timestamp := true) {
3717return !checkHandles() ? false : callWithParams2(hGTA, dwSAMP + 0x64010, [["i", readDWORD(hGTA, dwSAMP + ADDR_SAMP_CHATMSG_PTR)], ["i", timestamp ? 4 : 2]
3718, ["s", text], ["i", 0], ["i", color], ["i", 0]], false, true)
3719}
3720global SAMP_CHAT_OFF := 0x0152
3721global SAMP_CHAT_SIZE := 144
3722readChatLine(line, color = 0) {
3723if (!checkHandles())
3724return 0
3725dwPTR := readDWORD(hGTA, dwSAMP + ADDR_SAMP_CHATMSG_PTR)
3726chat := readString(hGTA, dwPTR + SAMP_CHAT_OFF + SIZE_SAMP_CHATMSG * (99 - line), SAMP_CHAT_SIZE)
3727if (!color)
3728chat := RegExReplace(chat, "\{[a-fA-F0-9]{6}\}")
3729return chat
3730}
3731setChatLine(line, text) {
3732if (!checkHandles())
3733return 0
3734dwPTR := readDWORD(hGTA, dwSAMP + ADDR_SAMP_CHATMSG_PTR)
3735result := writeString(hGTA, dwPTR + SAMP_CHAT_OFF + SIZE_SAMP_CHATMSG * (99 - line), text)
3736return result
3737}
3738getKills() {
3739if (!checkHandles()) {
3740return false
3741}
3742pedLocal := readDWORD(hGTA, 0xB6F5F0)
3743if (!pedLocal) {
3744return false
3745}
3746peds := getPeds()
3747if (!peds) {
3748return false
3749}
3750data := []
3751for index, object in peds {
3752state := readMem(hGTA, object.PED + 0x530, 4, "UInt")
3753if ((pedStates[object.PED] == 55 || pedStates[object.PED] == 54) == (state == 55 || state == 54)) {
3754Continue
3755}
3756pedStates[object.PED] := state
3757if (object.PED && !object.ISNPC && (state == 55 || state == 54)) {
3758pedMurderer := readDWORD(hGTA, object.PED + 0x764)
3759murderer := false
3760for index2, object2 in peds
3761{
3762if (object2.PED == pedMurderer) {
3763murderer := object2
3764Break
3765}
3766}
3767weapon := readMem(hGTA, object.PED + 0x760, 4, "UInt")
3768skin := readMem(hGTA, object.PED + 0x22, 2, "UShort")
3769if (!murderer) {
3770data.Push({victim: object, weapon: weapon, skin: skin})
3771} else {
3772data.Push({victim: object, murderer: murderer, weapon: weapon, skin: skin})
3773}
3774}
3775}
3776return data
3777}
3778getPeds() {
3779if (!checkHandles()) {
3780return false
3781}
3782if (!updateScoreboardDataEx()) {
3783return false
3784}
3785dwAddress := readDWORD(hGTA, dwSAMP + 0x21A0F8)
3786dwAddress := readDWORD(hGTA, dwAddress + 0x3CD)
3787dwAddress := readDWORD(hGTA, dwAddress + 0x18)
3788data := []
3789wID := readMem(hGTA, dwAddress + 0x4, 2, "UShort")
3790dwPed := readDWORD(hGTA, 0xB6F5F0)
3791if (readDWORD(hGTA, dwAddress + 0x1A) <= 16) {
3792sName := readString(hGTA, dwAddress + 0xA, 16)
3793} else {
3794sName := readString(hGTA, readDWORD(hGTA, dwAddress + 0xA), 20)
3795}
3796data.Push({LOCAL: true, ID: wID, PED: dwPed, ISNPC: false, NAME: sName})
3797Loop % 1000 {
3798i := A_Index - 1
3799dwRemotePlayer := readDWORD(hGTA, dwAddress + 0x2E + i*4)
3800if (!dwRemotePlayer) {
3801Continue
3802}
3803dwRemotePlayerData := readDWORD(hGTA, dwRemotePlayer)
3804dwRemotePlayerData := readDWORD(hGTA, dwRemotePlayerData)
3805dwPed := readDWORD(hGTA, dwRemotePlayerData + 0x2A4)
3806if (!dwPed) {
3807Continue
3808}
3809dwIsNPC := readDWORD(hGTA, dwRemotePlayer + 0x4)
3810if (readMem(hGTA, dwRemotePlayer + 0x1C, 4, "Int") <= 16) {
3811sName := readString(hGTA, dwRemotePlayer + 0xC, 16)
3812} else {
3813sName := readString(hGTA, readDWORD(hGTA, dwRemotePlayer + 0xC), 20)
3814}
3815data.Push({LOCAL: false, ID: i, PED: dwPed, ISNPC: dwIsNPC, NAME: sName})
3816}
3817return data
3818}
3819global GAMETEXT_1 := 0xBAAD40
3820global GAMETEXT_2 := 0xBAADC0
3821global GAMETEXT_3 := 0xBAAE40
3822global GAMETEXT_4 := 0xBAAEC0
3823global GAMETEXT_5 := 0xBAABC0
3824getGameText(type = 1, length = 12) {
3825if (!checkHandles())
3826return ""
3827if (type == 1) {
3828text := readString(hGTA, GAMETEXT_1, length)
3829} else if (type == 2) {
3830text := readString(hGTA, GAMETEXT_2, length)
3831} else if (type == 3) {
3832text := readString(hGTA, GAMETEXT_3, length)
3833} else if (type == 4) {
3834text := readString(hGTA, GAMETEXT_4, length)
3835} else if (type == 5) {
3836text := readString(hGTA, GAMETEXT_5, length)
3837}
3838return text
3839}
3840getPlayerFPS() {
3841if (!checkHandles())
3842return -1
3843fFPS := readFloat(hGTA, 0xB7CB50)
3844if (ErrorLevel) {
3845ErrorLevel := ERROR_READ_MEMORY
3846return -1
3847}
3848ErrorLevel := ERROR_OK
3849return Round(fFPS)
3850}
3851getFPS() {
3852if (!checkHandles())
3853return 0
3854static timev := A_TickCount
3855static val := readDWORD(hGTA, 0xB7CB4C)
3856temp := readDWORD(hGTA, 0xB7CB4C)
3857ret := (temp-val)/(A_TickCount-timev)*1000
3858timev := A_TickCount
3859val := temp
3860return Round(ret)
3861}
3862instruction := 0
3863fpsUnlock() {
3864if (!checkHandles())
3865return 0
3866global instruction
3867instruction := readMem(hGTA, dwSAMP + 0x9D9D0, 4, "UInt")
3868return writeMemory(hGTA, dwSAMP + 0x9D9D0, 0x5051FF15, 4, "UChar")
3869}
3870fpsLock() {
3871if (!checkHandles())
3872return 0
3873global instruction
3874if (instruction) {
3875return writeMemory(hGTA, dwSAMP + 0x9D9D0, instruction, 4, "UInt")
3876} else {
3877return false
3878}
3879}
3880blockDialog() {
3881if (!checkHandles()) {
3882ErrorLevel := ERROR_INVALID_HANDLE
3883return false
3884}
3885VarSetCapacity(injectBytecode, 7, 0)
3886Loop, 7 {
3887NumPut(0x90, injectBytecode, A_Index - 1, "UChar")
3888}
3889return writeRaw(hGTA, dwSAMP + 0x6C014, &injectBytecode, 7)
3890}
3891unblockDialog() {
3892if (!checkHandles()) {
3893ErrorLevel := ERROR_INVALID_HANDLE
3894return false
3895}
3896bytecodes := [0xC7, 0x46, 0x28, 0x1, 0x0, 0x0, 0x0]
3897VarSetCapacity(injectBytecode, 7, 0)
3898for i, o in bytecodes
3899NumPut(o, injectBytecode, i - 1, "UChar")
3900return writeRaw(hGTA, dwSAMP + 0x6C014, &injectBytecode, 7)
3901}
3902DownloadBin(url, byref buf) {
3903if (!DllCall("LoadLibrary", "str", "wininet") || !(h := DllCall("wininet\InternetOpen", "str", a, "uint", 1, "ptr", 0, "ptr", 0, "uint", 0, "ptr")))
3904return 0
3905c := s := 0
3906if (f := DllCall("wininet\InternetOpenUrl", "ptr", h, "str", url, "ptr", 0, "uint", 0, "uint", 0x80003000, "ptr", 0, "ptr")) {
3907while (DllCall("wininet\InternetQueryDataAvailable", "ptr", f, "uint*", s, "uint", 0, "ptr", 0) && s>0) {
3908VarSetCapacity(b, c+s, 0)
3909if (c>0)
3910DllCall("RtlMoveMemory", "ptr", &b, "ptr", &buf, "ptr", c)
3911DllCall("wininet\InternetReadFile", "ptr", f, "ptr", &b+c, "uint", s, "uint*", r)
3912c += r
3913VarSetCapacity(buf, c, 0)
3914if (c>0)
3915DllCall("RtlMoveMemory", "ptr", &buf, "ptr", &b, "ptr", c)
3916}
3917DllCall("wininet\InternetCloseHandle", "ptr", f)
3918}
3919DllCall("wininet\InternetCloseHandle", "ptr", h)
3920return c
3921}
3922DownloadToString(url, head, encoding = "utf-8") {
3923static a := "AutoHotkey/" A_AhkVersion
3924if (!DllCall("LoadLibrary", "str", "wininet") || !(h := DllCall("wininet\InternetOpen", "str", a, "uint", 1, "ptr", 0, "ptr", 0, "uint", 0, "ptr")))
3925return 0
3926c := s := 0, o := ""
3927if (f := DllCall("wininet\InternetOpenUrl", "ptr", h, "str", url, "str", head, "int", -1, "uint", 0x80083000, "ptr", 0, "ptr")) {
3928while (DllCall("wininet\InternetQueryDataAvailable", "ptr", f, "uint*", s, "uint", 0, "ptr", 0) && s > 0) {
3929VarSetCapacity(b, s, 0)
3930DllCall("wininet\InternetReadFile", "ptr", f, "ptr", &b, "uint", s, "uint*", r)
3931o .= StrGet(&b, r >> (encoding = "utf-16" || encoding = "cp1200"), encoding)
3932}
3933DllCall("wininet\InternetCloseHandle", "ptr", f)
3934}
3935DllCall("wininet\InternetCloseHandle", "ptr", h)
3936return o
3937}
3938URLDownloadToVar(url, showerror := false) {
3939hObject := ComObjCreate("WinHttp.WinHttpRequest.5.1")
3940try {
3941hObject.Open("GET", url)
3942hObject.SetTimeouts(0, 2000, 2000, 2000)
3943hObject.Send()
3944data := hObject.ResponseText
3945} catch e {
3946if (showerror == true) {
3947addChatMessage2(PREFIX . "Aktuell liegt ein Fehler in der Verbindung zum Server vor!")
3948}
3949return "ERROR_CONNECTION"
3950}
3951return data
3952}
3953Unzip(sZip, sUnz) {
3954fso := ComObjCreate("Scripting.FileSystemObject")
3955psh := ComObjCreate("Shell.Application")
3956zippedItems := psh.Namespace( sZip ).items().count
3957psh.Namespace( sUnz ).CopyHere( psh.Namespace( sZip ).items, 4|16 )
3958Loop {
3959Sleep, 50
3960unzippedItems := psh.Namespace( sUnz ).items().count
3961IfEqual, zippedItems, %unzippedItems%
3962break
3963}
3964}
3965SetChatLineRed(count, red) {
3966checkHandles()
3967offset := 0x639C
3968dwAdress := readMem(hGTA, dwSAMP + 0x21A0E4, 4, "int")
3969Loop %count%
3970offset := offset - 0xFC
3971WriteMemory_(hGTA, dwAdress, red, "char", 1, offset)
3972}
3973SetChatLineGreen(count, green) {
3974checkHandles()
3975offset := 0x639B
3976dwAdress := readMem(hGTA, dwSAMP + 0x21A0E4, 4, "int")
3977Loop %count%
3978offset := offset - 0xFC
3979WriteMemory_(hGTA, dwAdress, green, "char", 1, offset)
3980}
3981SetChatLineBlue(count, blue) {
3982checkHandles()
3983offset := 0x639A
3984dwAdress := readMem(hGTA, dwSAMP + 0x21A0E4, 4, "int")
3985Loop %count%
3986offset := offset - 0xFC
3987WriteMemory_(hGTA, dwAdress, blue, "char", 1, offset)
3988}
3989WriteMemory_(hwnd, address, writevalue, datatype = "int", length = 4, offset = 0) {
3990VarSetCapacity(finalvalue, length, 0)
3991NumPut(writevalue, finalvalue, 0, datatype)
3992return DllCall("WriteProcessMemory", "Uint", hwnd, "Uint", address + offset,"Uint",&finalvalue,"Uint",length,"Uint",0)
3993}
3994PlayerInput(info) {
3995KeyWait, Enter
3996Suspend, On
3997SendInput, t^a{backspace}/%info%
3998Input, value, V,{enter}{esc}
3999SendInput, ^a{backspace}{esc}
4000Suspend, Off
4001KeyWait, Enter
4002return value
4003}
4004getFullName(name, showerror := false) {
4005if name is number
4006{
4007name := getPlayerNameById(name)
4008if (name == "") {
4009if (showerror)
4010addChatMessage2(PREFIX . "Der Spieler mit der ID " . SECCOL . name . " {FFFFFF}ist nicht auf dem Server!")
4011return ""
4012} else {
4013return name
4014}
4015} else {
4016name := getPlayerIdByName(name)
4017if (name == -1) {
4018if (showerror)
4019addChatMessage2(PREFIX . "Der Spieler " . SECCOL . name . " {FFFFFF}ist nicht auf dem Server!")
4020return ""
4021} else {
4022return getPlayerNameById(name)
4023}
4024}
4025}
4026sendClientMessage(message) {
4027if (StrLen(message) > 144) {
4028subMessage := SubStr(message, 1, 141)
4029if (RegExMatch(subMessage, "(.+)({\S{6}})(\s*)$", message_)) {
4030addChatMessage2(message_1 . "...")
4031sendClientMessage(message_2 . "..." . message_3 . SubStr(message, 142))
4032} else if (RegExMatch(subMessage, "(.+)({\S{0,6})$", message_)) {
4033addChatMessage2(message_1 . "...")
4034subMessage2 := SubStr(message, 142)
4035if (RegExMatch(subMessage2, "^(\S{0,6}})(.+)", message2_)) {
4036sendClientMessage(message_2 . message2_1 . "..." . message2_2)
4037} else {
4038sendClientMessage("..." . subMessage2)
4039}
4040} else {
4041addChatMessage2(subMessage . "...")
4042color := ""
4043if (RegExMatch(subMessage, "(.*)({\S{6}})(.*)", message_)) {
4044color := message_2
4045}
4046sendClientMessage(color . "..." . SubStr(message, 142))
4047}
4048} else {
4049addChatMessage2(message)
4050}
4051}
4052getWeaponName(id) {
4053weapons := {0: "Fist", 1: "Brass Knuckles", 2: "Golf Club", 3: "Nightstick", 4: "Knife", 5: "Baseball Bat", 6: "Shovel", 7: "Pool Cue", 8: "Katana", 9: "Chainsaw", 10: "Purple Dildo", 11: "Dildo", 12: "Vibrator", 13: "Silver Vibrator", 14: "Flowers", 15: "Cane", 16: "Grenade", 17: "Tear Gas", 18: "Molotov Cocktail", 22: "9mm", 23: "Silenced 9mm", 24: "Desert Eagle", 25: "Shotgun", 26: "Sawnoff Shotgun", 27: "Combat Shotgun", 28: "Micro SMG/Uzi", 29: "MP5", 30: "AK-47", 31: "M4", 32: "Tec-9", 33: "Country Rifle", 34: "Sniper Rifle", 35: "RPG", 36: "HS Rocket", 37: "Flamethrower", 38: "Minigun", 39: "Satchel Charge", 40: "Detonator", 41: "Spraycan", 42: "Fire Extinguisher", 43: "Camera", 44: "Night Vis Goggles", 45: "Thermal Goggles", 46: "Parachute", 47: "Fake Pistol", 49: "Vehicle", 50: "Helicopter Blades", 51: "Explosion", 53: "Drowned", 54: "Splat", 255: "Suicide"}
4054if (weapons[id]) {
4055return weapons[id]
4056}
4057return "Unknown"
4058}
4059numberFormat(input_var) {
4060StringReplace, output, input_var,.,,All
4061return output
4062}
4063formatNumber(_number) {
4064StringReplace, _number, _number, -
4065IfEqual, ErrorLevel, 0, SetEnv Sign, -
4066Loop, Parse, _number, .
4067if (A_Index = 1) {
4068len := StrLen(A_LoopField)
4069Loop, Parse, A_LoopField
4070if (Mod(len-A_Index,3) = 0 and A_Index != len) {
4071x .= A_LoopField "."
4072} else {
4073x .= A_LoopField
4074}
4075} else {
4076Return Sign x "." A_LoopField
4077}
4078Return Sign x
4079}
4080formatTime(time) {
4081hours := Floor(time / 60 / 60)
4082minutes := Floor(time / 60) - hours * 60
4083seconds := time - minutes * 60 - hours * 60 * 60
4084time := ""
4085if (hours > 0) {
4086time .= hours . "h"
4087if (minutes > 0) {
4088time .= ", "
4089} else if (seconds > 0) {
4090time .= ", "
4091}
4092}
4093if (minutes > 0) {
4094time .= minutes . "min"
4095if (seconds > 0) {
4096time .= ", "
4097}
4098}
4099if (seconds > 0 || (minutes == 0 && hours == 0)) {
4100time .= seconds . "s"
4101}
4102return time
4103}
4104getDayTime() {
4105FormatTime, time,, HH
4106if (time >= 11 && time < 18) {
4107return "Tag"
4108} else if (time >= 18) {
4109return "Abend"
4110} else if (time >= 0 && time < 11) {
4111return "Morgen"
4112}
4113return ""
4114}
4115getUnixTimestamp(time_orig) {
4116StringLeft, now_year, time_orig, 4
4117StringMid, now_month, time_orig, 5, 2
4118StringMid, now_day, time_orig, 7, 2
4119StringMid, now_hour, time_orig, 9, 2
4120StringMid, now_min, time_orig, 11, 2
4121StringRight, now_sec, time_orig, 2
4122year_sec := 31536000 * (now_year - 1970)
4123leap_days := (now_year - 1972) / 4 + 1
4124Transform, leap_days, Floor, %leap_days%
4125this_leap := now_year/4
4126Transform, this_leap_round, Floor, %this_leap%
4127if (this_leap = this_leap_round) {
4128if (now_month <= 2) {
4129leap_days--
4130}
4131}
4132leap_sec := leap_days * 86400
4133if (now_month == 01)
4134month_sec = 0
4135if (now_month == 02)
4136month_sec = 2678400
4137if (now_month == 03)
4138month_sec = 5097600
4139if (now_month == 04)
4140month_sec = 7776000
4141if (now_month == 05)
4142month_sec = 10368000
4143if (now_month == 06)
4144month_sec = 13046400
4145if (now_month == 07)
4146month_sec = 15638400
4147if (now_month == 08)
4148month_sec = 18316800
4149if (now_month == 09)
4150month_sec = 20995200
4151if (now_month == 10)
4152month_sec = 23587200
4153if (now_month == 11)
4154month_sec = 26265600
4155if (now_month == 12)
4156month_sec = 28857600
4157day_sec := (now_day - 1) * 86400
4158hour_sec := now_hour * 3600
4159min_sec := now_min * 60
4160date_sec := year_sec + month_sec + day_sec + leap_sec + hour_sec + min_sec + now_sec
4161return date_sec
4162}
4163getDistanceBetween(posX, posY, posZ, _posX, _posY, _posZ, _posRadius) {
4164X := posX -_posX
4165Y := posY -_posY
4166Z := posZ -_posZ
4167if (((X < _posRadius) && (X > -_posRadius)) && ((Y < _posRadius) && (Y > -_posRadius)) && ((Z < _posRadius) && (Z > -_posRadius)))
4168return TRUE
4169return FALSE
4170}
4171getDistanceToPoint(posX, posY, posZ, _posX, _posY, _posZ) {
4172return Sqrt((posX - _posX) ** 2 + (posY - _posY) ** 2 + (posZ - _posZ) ** 2)
4173}
4174IniRead(fileName, section, key, default := 0) {
4175IniRead, var, %fileName%, %section%, %key%, %default%
4176return var
4177}
4178getUserFriendlyHotkeyName(hk) {
4179StringUpper, hk, hk
4180hk := StrReplace(hk, "~", "")
4181hk := StrReplace(hk, "+", "UMSCHALT+")
4182hk := StrReplace(hk, "^", "STRG+")
4183hk := StrReplace(hk, "!", "ALT+")
4184hk := StrReplace(hk, ".", ". (Punkt)")
4185hk := StrReplace(hk, ",", ", (Komma)")
4186return hk
4187}
4188min(var1, var2) {
4189return var1 < var2 ? var1 : var2
4190}
4191max(var1, var2) {
4192return var1 > var2 ? var1 : var2
4193}
4194compareVersions(v1, v2) {
4195v1Parts := StrSplit(v1, ".")
4196v2Parts := StrSplit(v2, ".")
4197i := 0
4198length := max(v1Parts.Length(), v2Parts.Length())
4199Loop, %length%
4200{
4201v1Part := i < v1Parts.Length() ? v1Parts[A_Index] : 0
4202v2Part := i < v2Parts.Length() ? v2Parts[A_Index] : 0
4203if (v1Part < v2Part)
4204return -1
4205if (v1Part > v2Part)
4206return 1
4207i++
4208}
4209return 0
4210}
4211callWithParams2(hProcess, dwFunc, aParams, bCleanupStack = true, bThisCall = false, bReturn = false, sDatatype = "Char") {
4212if (!hProcess || !dwFunc)
4213return false
4214dataOffset := 0
4215i := aParams.MaxIndex()
4216bytesUsed := 0
4217bytesMax := 5120
4218dwLen := i * 5 + bCleanupStack * 3 + bReturn * 5 + 6
4219VarSetCapacity(injectData, dwLen, 0)
4220while (i > 0) {
4221if (aParams[i][1] == "i" || aParams[i][1] == "p" || aParams[i][1] == "f")
4222value := aParams[i][2]
4223else if (aParams[i][1] == "s") {
4224if (bytesMax - bytesUsed < StrLen(aParams[i][2]))
4225return false
4226value := pMemory + bytesUsed
4227writeString(hProcess, value, aParams[i][2])
4228bytesUsed += StrLen(aParams[i][2]) + 1
4229if (ErrorLevel)
4230return false
4231}
4232else
4233return false
4234NumPut((bThisCall && i == 1 ? 0xB9 : 0x68), injectData, dataOffset, "UChar")
4235NumPut(value, injectData, ++dataOffset, aParams[i][1] == "f" ? "Float" : "Int")
4236dataOffset += 4
4237i--
4238}
4239offset := dwFunc - (pInjectFunc + dataOffset + 5)
4240NumPut(0xE8, injectData, dataOffset, "UChar")
4241NumPut(offset, injectData, ++dataOffset, "Int")
4242dataOffset += 4
4243if (bReturn) {
4244NumPut(sDatatype = "Char" ? 0xA2 : 0xA3, injectData, dataOffset, "UChar")
4245NumPut(pParam1, injectData, ++dataOffset, "UInt")
4246dataOffset += 4
4247}
4248if (bCleanupStack) {
4249NumPut(0xC483, injectData, dataOffset, "UShort")
4250dataOffset += 2
4251NumPut((aParams.MaxIndex() - bThisCall) * 4, injectData, dataOffset, "UChar")
4252dataOffset++
4253}
4254NumPut(0xC3, injectData, dataOffset, "UChar")
4255writeRaw(hGTA, pInjectFunc, &injectData, dwLen)
4256if (ErrorLevel)
4257return false
4258hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
4259if (ErrorLevel)
4260return false
4261waitForSingleObject(hThread, 0xFFFFFFFF)
4262closeProcess(hThread)
4263if (bReturn)
4264return readMem(hGTA, pParam1, 4, sDatatype)
4265return true
4266}
4267Convert(sFileFr = "", sFileTo = "", nQuality = "") {
4268If sFileTo =
4269sFileTo := A_ScriptDir . "\screen.bmp"
4270SplitPath, sFileTo, , sDirTo, sExtTo, sNameTo
4271If Not hGdiPlus := DllCall("LoadLibrary", "str", "gdiplus.dll")
4272Return sFileFr+0 ? SaveHBITMAPToFile(sFileFr, sDirTo . "\" . sNameTo . ".bmp") : ""
4273VarSetCapacity(si, 16, 0), si := Chr(1)
4274DllCall("gdiplus\GdiplusStartup", "UintP", pToken, "Uint", &si, "Uint", 0)
4275If !sFileFr
4276{
4277DllCall("OpenClipboard", "Uint", 0)
4278If DllCall("IsClipboardFormatAvailable", "Uint", 2) && (hBM:=DllCall("GetClipboardData", "Uint", 2))
4279DllCall("gdiplus\GdipCreateBitmapFromHBITMAP", "Uint", hBM, "Uint", 0, "UintP", pImage)
4280DllCall("CloseClipboard")
4281}
4282Else If sFileFr Is Integer
4283DllCall("gdiplus\GdipCreateBitmapFromHBITMAP", "Uint", sFileFr, "Uint", 0, "UintP", pImage)
4284Else DllCall("gdiplus\GdipLoadImageFromFile", "Uint", Unicode4Ansi(wFileFr,sFileFr), "UintP", pImage)
4285DllCall("gdiplus\GdipGetImageEncodersSize", "UintP", nCount, "UintP", nSize)
4286VarSetCapacity(ci,nSize,0)
4287DllCall("gdiplus\GdipGetImageEncoders", "Uint", nCount, "Uint", nSize, "Uint", &ci)
4288Loop, % nCount
4289If InStr(Ansi4Unicode(NumGet(ci,76*(A_Index-1)+44)), "." . sExtTo) {
4290pCodec := &ci+76*(A_Index-1)
4291Break
4292}
4293If InStr(".JPG.JPEG.JPE.JFIF", "." . sExtTo) && nQuality<>"" && pImage && pCodec
4294{
4295DllCall("gdiplus\GdipGetEncoderParameterListSize", "Uint", pImage, "Uint", pCodec, "UintP", nSize)
4296VarSetCapacity(pi,nSize,0)
4297DllCall("gdiplus\GdipGetEncoderParameterList", "Uint", pImage, "Uint", pCodec, "Uint", nSize, "Uint", &pi)
4298Loop, % NumGet(pi)
4299If NumGet(pi,28*(A_Index-1)+20)=1 && NumGet(pi,28*(A_Index-1)+24)=6
4300{
4301pParam := &pi+28*(A_Index-1)
4302NumPut(nQuality,NumGet(NumPut(4,NumPut(1,pParam+0)+20)))
4303Break
4304}
4305}
4306If pImage
4307pCodec ? DllCall("gdiplus\GdipSaveImageToFile", "Uint", pImage, "Uint", Unicode4Ansi(wFileTo,sFileTo), "Uint", pCodec, "Uint", pParam) : DllCall("gdiplus\GdipCreateHBITMAPFromBitmap", "Uint", pImage, "UintP", hBitmap, "Uint", 0) . SetClipboardData(hBitmap), DllCall("gdiplus\GdipDisposeImage", "Uint", pImage)
4308DllCall("gdiplus\GdiplusShutdown" , "Uint", pToken)
4309DllCall("FreeLibrary", "Uint", hGdiPlus)
4310}
4311SaveHBITMAPToFile(hBitmap, sFile) {
4312DllCall("GetObject", "Uint", hBitmap, "int", VarSetCapacity(oi,84,0), "Uint", &oi)
4313hFile:= DllCall("CreateFile", "Uint", &sFile, "Uint", 0x40000000, "Uint", 0, "Uint", 0, "Uint", 2, "Uint", 0, "Uint", 0)
4314DllCall("WriteFile", "Uint", hFile, "int64P", 0x4D42|14+40+NumGet(oi,44)<<16, "Uint", 6, "UintP", 0, "Uint", 0)
4315DllCall("WriteFile", "Uint", hFile, "int64P", 54<<32, "Uint", 8, "UintP", 0, "Uint", 0)
4316DllCall("WriteFile", "Uint", hFile, "Uint", &oi+24, "Uint", 40, "UintP", 0, "Uint", 0)
4317DllCall("WriteFile", "Uint", hFile, "Uint", NumGet(oi,20), "Uint", NumGet(oi,44), "UintP", 0, "Uint", 0)
4318DllCall("CloseHandle", "Uint", hFile)
4319}
4320Unicode4Ansi(ByRef wString, sString) {
4321nSize := DllCall("MultiByteToWideChar", "Uint", 0, "Uint", 0, "Uint", &sString, "int", -1, "Uint", 0, "int", 0)
4322VarSetCapacity(wString, nSize * 2)
4323DllCall("MultiByteToWideChar", "Uint", 0, "Uint", 0, "Uint", &sString, "int", -1, "Uint", &wString, "int", nSize)
4324Return &wString
4325}
4326Ansi4Unicode(pString) {
4327nSize := DllCall("WideCharToMultiByte", "Uint", 0, "Uint", 0, "Uint", pString, "int", -1, "Uint", 0, "int", 0, "Uint", 0, "Uint", 0)
4328VarSetCapacity(sString, nSize)
4329DllCall("WideCharToMultiByte", "Uint", 0, "Uint", 0, "Uint", pString, "int", -1, "str", sString, "int", nSize, "Uint", 0, "Uint", 0)
4330Return sString
4331}
4332SetClipboardData(hBitmap) {
4333DllCall("GetObject", "Uint", hBitmap, "int", VarSetCapacity(oi,84,0), "Uint", &oi)
4334hDIB := DllCall("GlobalAlloc", "Uint", 2, "Uint", 40+NumGet(oi,44))
4335pDIB := DllCall("GlobalLock", "Uint", hDIB)
4336DllCall("RtlMoveMemory", "Uint", pDIB, "Uint", &oi+24, "Uint", 40)
4337DllCall("RtlMoveMemory", "Uint", pDIB+40, "Uint", NumGet(oi,20), "Uint", NumGet(oi,44))
4338DllCall("GlobalUnlock", "Uint", hDIB)
4339DllCall("DeleteObject", "Uint", hBitmap)
4340DllCall("OpenClipboard", "Uint", 0)
4341DllCall("EmptyClipboard")
4342DllCall("SetClipboardData", "Uint", 8, "Uint", hDIB)
4343DllCall("CloseClipboard")
4344}
4345convertData(unix, format) {
4346timeZone := (A_Now - A_NowUTC) / 10000
4347time += unix, s
4348time += timeZone, h
4349FormatTime, output, %time%, %format%
4350return output
4351}
4352class JSON
4353{
4354class Load extends JSON.Functor
4355{
4356Call(self, ByRef text, reviver:="")
4357{
4358this.rev := IsObject(reviver) ? reviver : false
4359this.keys := this.rev ? {} : false
4360static quot := Chr(34), bashq := "\" . quot
4361, json_value := quot . "{[01234567890-tfn"
4362, json_value_or_array_closing := quot . "{[]01234567890-tfn"
4363, object_key_or_object_closing := quot . "}"
4364key := ""
4365is_key := false
4366root := {}
4367stack := [root]
4368next := json_value
4369pos := 0
4370while ((ch := SubStr(text, ++pos, 1)) != "") {
4371if InStr(" `t`r`n", ch)
4372continue
4373if !InStr(next, ch, 1)
4374this.ParseError(next, text, pos)
4375holder := stack[1]
4376is_array := holder.IsArray
4377if InStr(",:", ch) {
4378next := (is_key := !is_array && ch == ",") ? quot : json_value
4379} else if InStr("}]", ch) {
4380ObjRemoveAt(stack, 1)
4381next := stack[1]==root ? "" : stack[1].IsArray ? ",]" : ",}"
4382} else {
4383if InStr("{[", ch) {
4384static json_array := Func("Array").IsBuiltIn || ![].IsArray ? {IsArray: true} : 0
4385(ch == "{")
4386? ( is_key := true
4387, value := {}
4388, next := object_key_or_object_closing )
4389: ( value := json_array ? new json_array : []
4390, next := json_value_or_array_closing )
4391ObjInsertAt(stack, 1, value)
4392if (this.keys)
4393this.keys[value] := []
4394} else {
4395if (ch == quot) {
4396i := pos
4397while (i := InStr(text, quot,, i+1)) {
4398value := StrReplace(SubStr(text, pos+1, i-pos-1), "\\", "\u005c")
4399static tail := A_AhkVersion<"2" ? 0 : -1
4400if (SubStr(value, tail) != "\")
4401break
4402}
4403if (!i)
4404this.ParseError("'", text, pos)
4405value := StrReplace(value, "\/", "/")
4406, value := StrReplace(value, bashq, quot)
4407, value := StrReplace(value, "\b", "`b")
4408, value := StrReplace(value, "\f", "`f")
4409, value := StrReplace(value, "\n", "`n")
4410, value := StrReplace(value, "\r", "`r")
4411, value := StrReplace(value, "\t", "`t")
4412pos := i
4413i := 0
4414while (i := InStr(value, "\",, i+1)) {
4415if !(SubStr(value, i+1, 1) == "u")
4416this.ParseError("\", text, pos - StrLen(SubStr(value, i+1)))
4417uffff := Abs("0x" . SubStr(value, i+2, 4))
4418if (A_IsUnicode || uffff < 0x100)
4419value := SubStr(value, 1, i-1) . Chr(uffff) . SubStr(value, i+6)
4420}
4421if (is_key) {
4422key := value, next := ":"
4423continue
4424}
4425} else {
4426value := SubStr(text, pos, i := RegExMatch(text, "[\]\},\s]|$",, pos)-pos)
4427static number := "number", integer :="integer"
4428if value is %number%
4429{
4430if value is %integer%
4431value += 0
4432}
4433else if (value == "true" || value == "false")
4434value := %value% + 0
4435else if (value == "null")
4436value := ""
4437else
4438this.ParseError(next, text, pos, i)
4439pos += i-1
4440}
4441next := holder==root ? "" : is_array ? ",]" : ",}"
4442}
4443is_array? key := ObjPush(holder, value) : holder[key] := value
4444if (this.keys && this.keys.HasKey(holder))
4445this.keys[holder].Push(key)
4446}
4447}
4448return this.rev ? this.Walk(root, "") : root[""]
4449}
4450ParseError(expect, ByRef text, pos, len:=1)
4451{
4452static quot := Chr(34), qurly := quot . "}"
4453line := StrSplit(SubStr(text, 1, pos), "`n", "`r").Length()
4454col := pos - InStr(text, "`n",, -(StrLen(text)-pos+1))
4455msg := Format("{1}`n`nLine:`t{2}`nCol:`t{3}`nChar:`t{4}"
4456, (expect == "") ? "Extra data"
4457: (expect == "'") ? "Unterminated string starting at"
4458: (expect == "\") ? "Invalid \escape"
4459: (expect == ":") ? "Expecting ':' delimiter"
4460: (expect == quot) ? "Expecting object key enclosed in double quotes"
4461: (expect == qurly) ? "Expecting object key enclosed in double quotes or object closing '}'"
4462: (expect == ",}") ? "Expecting ',' delimiter or object closing '}'"
4463: (expect == ",]") ? "Expecting ',' delimiter or array closing ']'"
4464: InStr(expect, "]") ? "Expecting JSON value or array closing ']'"
4465: "Expecting JSON value(string, number, true, false, null, object or array)"
4466, line, col, pos)
4467static offset := A_AhkVersion<"2" ? -3 : -4
4468throw Exception(msg, offset, SubStr(text, pos, len))
4469}
4470Walk(holder, key)
4471{
4472value := holder[key]
4473if IsObject(value) {
4474for i, k in this.keys[value] {
4475v := this.Walk(value, k)
4476if (v != JSON.Undefined)
4477value[k] := v
4478else
4479ObjDelete(value, k)
4480}
4481}
4482return this.rev.Call(holder, key, value)
4483}
4484}
4485class Dump extends JSON.Functor
4486{
4487Call(self, value, replacer:="", space:="")
4488{
4489this.rep := IsObject(replacer) ? replacer : ""
4490this.gap := ""
4491if (space) {
4492static integer := "integer"
4493if space is %integer%
4494Loop, % ((n := Abs(space))>10 ? 10 : n)
4495this.gap .= " "
4496else
4497this.gap := SubStr(space, 1, 10)
4498this.indent := "`n"
4499}
4500return this.Str({"": value}, "")
4501}
4502Str(holder, key)
4503{
4504value := holder[key]
4505if (this.rep)
4506value := this.rep.Call(holder, key, ObjHasKey(holder, key) ? value : JSON.Undefined)
4507if IsObject(value) {
4508static type := A_AhkVersion<"2" ? "" : Func("Type")
4509if (type ? type.Call(value) == "Object" : ObjGetCapacity(value) != "") {
4510if (this.gap) {
4511stepback := this.indent
4512this.indent .= this.gap
4513}
4514is_array := value.IsArray
4515if (!is_array) {
4516for i in value
4517is_array := i == A_Index
4518until !is_array
4519}
4520str := ""
4521if (is_array) {
4522Loop, % value.Length() {
4523if (this.gap)
4524str .= this.indent
4525v := this.Str(value, A_Index)
4526str .= (v != "") ? v . "," : "null,"
4527}
4528} else {
4529colon := this.gap ? ": " : ":"
4530for k in value {
4531v := this.Str(value, k)
4532if (v != "") {
4533if (this.gap)
4534str .= this.indent
4535str .= this.Quote(k) . colon . v . ","
4536}
4537}
4538}
4539if (str != "") {
4540str := RTrim(str, ",")
4541if (this.gap)
4542str .= stepback
4543}
4544if (this.gap)
4545this.indent := stepback
4546return is_array ? "[" . str . "]" : "{" . str . "}"
4547}
4548} else
4549return ObjGetCapacity([value], 1)=="" ? value : this.Quote(value)
4550}
4551Quote(string)
4552{
4553static quot := Chr(34), bashq := "\" . quot
4554if (string != "") {
4555string := StrReplace(string, "\", "\\")
4556, string := StrReplace(string, quot, bashq)
4557, string := StrReplace(string, "`b", "\b")
4558, string := StrReplace(string, "`f", "\f")
4559, string := StrReplace(string, "`n", "\n")
4560, string := StrReplace(string, "`r", "\r")
4561, string := StrReplace(string, "`t", "\t")
4562static rx_escapable := A_AhkVersion<"2" ? "O)[^\x20-\x7e]" : "[^\x20-\x7e]"
4563while RegExMatch(string, rx_escapable, m)
4564string := StrReplace(string, m.Value, Format("\u{1:04x}", Ord(m.Value)))
4565}
4566return quot . string . quot
4567}
4568}
4569Undefined[]
4570{
4571get {
4572static empty := {}, vt_empty := ComObject(0, &empty, 1)
4573return vt_empty
4574}
4575}
4576class Functor
4577{
4578__Call(method, ByRef arg, args*)
4579{
4580if IsObject(method)
4581return (new this).Call(method, arg, args*)
4582else if (method == "")
4583return (new this).Call(arg, args*)
4584}
4585}
4586}
4587global currentVersion := "2.0.1"
4588global keybinder := "DM-Binder"
4589global baseURL := "http://176.96.138.103/keybinder/"
4590global gkURL := "https://staatsgewalt.jameschans.de/keybinder/"
4591IfNotExist, %A_MyDocuments%\GTA San Andreas User Files\SAMP\ChatlogBackup
4592{
4593FileCreateDir, %A_MyDocuments%\GTA San Andreas User Files\SAMP\ChatlogBackup
4594}
4595IfNotExist, images
4596{
4597FileCreateDir, images
4598}
4599IfNotExist, images/overlay
4600{
4601FileCreateDir, images/overlay
4602}
4603IfNotExist, bin
4604{
4605FileCreateDir, bin
4606}
4607IfNotExist, ini
4608{
4609FileCreateDir, ini
4610}
4611IfNotExist, ini/Hotkeys.ini
4612{
4613URLDownloadToFile, %baseURL%ini/Hotkeys.ini, ini/Hotkeys.ini
4614}
4615IfNotExist, ini/settings.ini
4616{
4617URLDownloadToFile, %baseURL%Settings.ini, ini/settings.ini
4618}
4619IfNotExist, images/Logo.png
4620{
4621URLDownloadToFile, %baseURL%images/Logo.png, images/Logo.png
4622}
4623IfNotExist, images/overlay/campfire.png
4624{
4625URLDownloadToFile, %baseURL%images/Overlay/campfire.png, images/overlay/campfire.png
4626}
4627IfNotExist, images/overlay/canister.png
4628{
4629URLDownloadToFile, %baseURL%images/Overlay/canister.png, images/overlay/canister.png
4630}
4631IfNotExist, images/overlay/firstaid.png
4632{
4633URLDownloadToFile, %baseURL%images/Overlay/firstaid.png, images/overlay/firstaid.png
4634}
4635IfNotExist, images/overlay/drugs.png
4636{
4637URLDownloadToFile, %baseURL%images/Overlay/drugs.png, images/overlay/drugs.png
4638}
4639IfNotExist, images/overlay/fishCooked.png
4640{
4641URLDownloadToFile, %baseURL%images/Overlay/fishCooked.png, images/overlay/fishCooked.png
4642}
4643IfNotExist, images/overlay/fishUncooked.png
4644{
4645URLDownloadToFile, %baseURL%images/Overlay/fishUncooked.png, images/overlay/fishUncooked.png
4646}
4647IfNotExist, images/overlay/phoneOn.png
4648{
4649URLDownloadToFile, %baseURL%images/Overlay/phoneOn.png, images/overlay/phoneOn.png
4650}
4651IfNotExist, images/overlay/phoneOff.png
4652{
4653URLDownloadToFile, %baseURL%images/Overlay/phoneOff.png, images/overlay/phoneOff.png
4654}
4655IfNotExist, bin/overlay.dll
4656{
4657URLDownloadToFile, %gkURL%download/bin/overlay.dll, bin/overlay.dll
4658}
4659IfNotExist, bin\sqlite3.dll
4660{
4661URLDownloadToFile, %gkURL%download/bin/sqlite3.dll, bin/sqlite3.dll
4662}
4663#NoEnv
4664API_ERROR_NONE := 0
4665API_ERROR_SNAPSHOT_FAILED := 1
4666API_ERROR_SAMP_NOT_FOUND := 2
4667API_ERROR_REMOTE_MEMORY_ALLOCATION_FAILED := 3
4668API_ERROR_WRITEPROCESSMEMORY_FAILED := 4
4669API_ERROR_GETPROCADDRESS_FAILED := 5
4670API_ERROR_REMOTETHREAD_FAILED := 6
4671API_ERROR_INVALID_GTA_HANDLE := 7
4672API_ERROR_PIPE_DOESNT_RESPOND := 8
4673API_ERROR_STRING_TOO_LONG := 9
4674PATH_API := RelToAbs(A_ScriptDir, "bin\overlay.dll")
4675dllModule := DllCall("LoadLibrary", Str, PATH_API)
4676if(dllModule == -1 || dllModule == 0)
4677{
4678MsgBox, 16, API - Fehler, Die overlay.dll konnte nicht gefunden werden.`nDer Keybinder wird nun beendet.`n`nUm den Fehler zu beheben, versuche die All in One Runtimes von hier zu installieren: http://bit.ly/AiOR
4679ExitApp
4680}
4681Init_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_Init")
4682SetParam_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_SetParam")
4683ReadMemory_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_ReadMemory")
4684WriteMemory_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_WriteMemory")
4685GetBasePointer_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_GetBasePointer")
4686GetCommandLine_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_GetCommandLine")
4687GetLastError_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_GetLastError")
4688SetLastError_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_SetLastError")
4689TextCreate_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_TextCreate")
4690TextDestroy_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_TextDestroy")
4691TextSetShadow_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_TextSetShadow")
4692TextSetShown_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_TextSetShown")
4693TextSetColor_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_TextSetColor")
4694TextSetPos_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_TextSetPos")
4695TextSetString_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_TextSetString")
4696TextUpdate_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_TextUpdate")
4697BoxCreate_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_BoxCreate")
4698BoxDestroy_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_BoxDestroy")
4699BoxSetShown_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_BoxSetShown")
4700BoxSetBorder_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_BoxSetBorder")
4701BoxSetBorderColor_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_BoxSetBorderColor")
4702BoxSetColor_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_BoxSetColor")
4703BoxSetHeight_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_BoxSetHeight")
4704BoxSetPos_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_BoxSetPos")
4705BoxSetWidth_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_BoxSetWidth")
4706LineCreate_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_LineCreate")
4707LineDestroy_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_LineDestroy")
4708LineSetShown_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_LineSetShown")
4709LineSetColor_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_LineSetColor")
4710LineSetWidth_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_LineSetWidth")
4711LineSetPos_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_LineSetPos")
4712ImageCreate_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_ImageCreate")
4713ImageDestroy_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_ImageDestroy")
4714ImageSetShown_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_ImageSetShown")
4715ImageSetAlign_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_ImageSetAlign")
4716ImageSetPos_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_ImageSetPos")
4717ImageSetRotation_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_ImageSetRotation")
4718DestroyAllVisual_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_DestroyAllVisual")
4719ShowAllVisual_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_ShowAllVisual")
4720HideAllVisual_func := DllCall("GetProcAddress", UInt, dllModule, Str, "API_HideAllVisual")
4721Init()
4722{
4723global Init_func
4724res := DllCall(Init_func)
4725return res
4726}
4727SetParam(str_Name, str_Value)
4728{
4729global SetParam_func
4730res := DllCall(SetParam_func, Str, str_Name, Str, str_Value)
4731return res
4732}
4733ReadMemory(addr, size, ByRef data)
4734{
4735global ReadMemory_func
4736VarSetCapacity(data,size)
4737res := DllCall(ReadMemory_func, UInt, addr, UInt, size, StrP, data)
4738return res
4739}
4740GetBasePointer(dll)
4741{
4742global GetBasePointer_func
4743res :=DllCall(GetBasePointer_func, Str, dll)
4744return res
4745}
4746GetCommandLine(ByRef line)
4747{
4748global GetCommandLine_func
4749VarSetCapacity(line,512,0)
4750res := DllCall(GetCommandLine_func, StrP, line)
4751return res
4752}
4753GetLastError()
4754{
4755global GetLastError_func
4756res:=DllCall(GetLastError_func)
4757return res
4758}
4759SetLastError(error)
4760{
4761global SetLastError_func
4762res := DllCall(SetLastError_func, Int, error)
4763return res
4764}
4765TextCreate(Font, fontsize, bold, italic, x, y, color, text, shadow, show)
4766{
4767global TextCreate_func
4768res := DllCall(TextCreate_func,Str,Font,Int,fontsize,UChar,bold,UChar,italic,Int,x,Int,y,UInt,color,Str,text,UChar,shadow,UChar,show)
4769return res
4770}
4771TextDestroy(id)
4772{
4773global TextDestroy_func
4774res := DllCall(TextDestroy_func,Int,id)
4775return res
4776}
4777TextSetShadow(id, shadow)
4778{
4779global TextSetShadow_func
4780res := DllCall(TextSetShadow_func,Int,id,UChar,shadow)
4781return res
4782}
4783TextSetShown(id, show)
4784{
4785global TextSetShown_func
4786res := DllCall(TextSetShown_func,Int,id,UChar,show)
4787return res
4788}
4789TextSetColor(id,color)
4790{
4791global TextSetColor_func
4792res := DllCall(TextSetColor_func,Int,id,UInt,color)
4793return res
4794}
4795TextSetPos(id,x,y)
4796{
4797global TextSetPos_func
4798res := DllCall(TextSetPos_func,Int,id,Int,x,Int,y)
4799return res
4800}
4801TextSetString(id,Text)
4802{
4803global TextSetString_func
4804res := DllCall(TextSetString_func,Int,id,Str,Text)
4805return res
4806}
4807TextUpdate(id,Font,Fontsize,bold,italic)
4808{
4809global TextUpdate_func
4810res := DllCall(TextUpdate_func,Int,id,Str,Font,int,Fontsize,UChar,bold,UChar,italic)
4811return res
4812}
4813BoxCreate(x,y,width,height,Color,show)
4814{
4815global BoxCreate_func
4816res := DllCall(BoxCreate_func,Int,x,Int,y,Int,width,Int,height,UInt,Color,UChar,show)
4817return res
4818}
4819BoxDestroy(id)
4820{
4821global BoxDestroy_func
4822res := DllCall(BoxDestroy_func,Int,id)
4823return res
4824}
4825BoxSetShown(id,Show)
4826{
4827global BoxSetShown_func
4828res := DllCall(BoxSetShown_func,Int,id,UChar,Show)
4829return res
4830}
4831BoxSetBorder(id,height,Show)
4832{
4833global BoxSetBorder_func
4834res := DllCall(BoxSetBorder_func,Int,id,Int,height,Int,Show)
4835return res
4836}
4837BoxSetBorderColor(id,Color)
4838{
4839global BoxSetBorderColor_func
4840res := DllCall(BoxSetBorderColor_func,Int,id,UInt,Color)
4841return res
4842}
4843BoxSetColor(id,Color)
4844{
4845global BoxSetColor_func
4846res := DllCall(BoxSetColor_func,Int,id,UInt,Color)
4847return res
4848}
4849BoxSetHeight(id,height)
4850{
4851global BoxSetHeight_func
4852res := DllCall(BoxSetHeight_func,Int,id,Int,height)
4853return res
4854}
4855BoxSetPos(id,x,y)
4856{
4857global BoxSetPos_func
4858res := DllCall(BoxSetPos_func,Int,id,Int,x,Int,y)
4859return res
4860}
4861BoxSetWidth(id,width)
4862{
4863global BoxSetWidth_func
4864res := DllCall(BoxSetWidth_func,Int,id,Int,width)
4865return res
4866}
4867LineCreate(x1,y1,x2,y2,width,color,show)
4868{
4869global LineCreate_func
4870res := DllCall(LineCreate_func,Int,x1,Int,y1,Int,x2,Int,y2,Int,Width,UInt,color,UChar,show)
4871return res
4872}
4873LineDestroy(id)
4874{
4875global LineDestroy_func
4876res := DllCall(LineDestroy_func,Int,id)
4877return res
4878}
4879LineSetShown(id,show)
4880{
4881global LineSetShown_func
4882res := DllCall(LineSetShown_func,Int,id,UChar,show)
4883return res
4884}
4885LineSetColor(id,color)
4886{
4887global LineSetColor_func
4888res := DllCall(LineSetColor_func,Int,id,UInt,color)
4889return res
4890}
4891LineSetWidth(id, width)
4892{
4893global LineSetWidth_func
4894res := DllCall(LineSetWidth_func,Int,id,Int,width)
4895return res
4896}
4897LineSetPos(id,x1,y1,x2,y2)
4898{
4899global LineSetPos_func
4900res := DllCall(LineSetPos_func,Int,id,Int,x1,Int,y1,Int,x2,Int,y2)
4901return res
4902}
4903ImageCreate(path, x, y, rotation, align, show)
4904{
4905global ImageCreate_func
4906res := DllCall(ImageCreate_func, Str, path, Int, x, Int, y, Int, rotation, Int, align, UChar, show)
4907return res
4908}
4909ImageDestroy(id)
4910{
4911global ImageDestroy_func
4912res := DllCall(ImageDestroy_func,Int,id)
4913return res
4914}
4915ImageSetShown(id,show)
4916{
4917global ImageSetShown_func
4918res := DllCall(ImageSetShown_func,Int,id,UChar,show)
4919return res
4920}
4921ImageSetAlign(id,align)
4922{
4923global ImageSetAlign_func
4924res := DllCall(ImageSetAlign_func,Int,id,Int,align)
4925return res
4926}
4927ImageSetPos(id, x, y)
4928{
4929global ImageSetPos_func
4930res := DllCall(ImageSetPos_func,Int,id,Int,x, Int, y)
4931return res
4932}
4933ImageSetRotation(id, rotation)
4934{
4935global ImageSetRotation_func
4936res := DllCall(ImageSetRotation_func,Int,id,Int, rotation)
4937return res
4938}
4939DestroyAllVisual()
4940{
4941global DestroyAllVisual_func
4942res := DllCall(DestroyAllVisual_func)
4943return res
4944}
4945ShowAllVisual()
4946{
4947global ShowAllVisual_func
4948res := DllCall(ShowAllVisual_func)
4949return res
4950}
4951HideAllVisual()
4952{
4953global HideAllVisual_func
4954res := DllCall(HideAllVisual_func )
4955return res
4956}
4957DecimalToHex(Var){
4958SetFormat, IntegerFast, hex
4959Dec2Hex += Var
4960Dec2Hex .= ""
4961SetFormat, IntegerFast, d
4962StringTrimLeft, Dec2Hex, Dec2Hex, 2
4963StringUpper, Dec2Hex, Dec2Hex
4964sDec2Hex .= Dec2Hex
4965return sDec2Hex
4966}
4967RelToAbs(root, dir, s = "\") {
4968pr := SubStr(root, 1, len := InStr(root, s, "", InStr(root, s . s) + 2) - 1)
4969, root := SubStr(root, len + 1), sk := 0
4970If InStr(root, s, "", 0) = StrLen(root)
4971StringTrimRight, root, root, 1
4972If InStr(dir, s, "", 0) = StrLen(dir)
4973StringTrimRight, dir, dir, 1
4974Loop, Parse, dir, %s%
4975{
4976If A_LoopField = ..
4977StringLeft, root, root, InStr(root, s, "", 0) - 1
4978Else If A_LoopField =
4979root =
4980Else If A_LoopField != .
4981Continue
4982StringReplace, dir, dir, %A_LoopField%%s%
4983}
4984Return, pr . root . s . dir
4985}
4986IfExist, update.bat
4987{
4988FileDelete, update.bat
4989}
4990newversion := URLDownloadToVar("http://176.96.138.103/keybinder/version.txt")
4991if (RegExMatch(newversion, "^(\d+)\.(\d+)\.(\d+)$", __)) {
4992if (newversion > currentVersion) {
4993changelog := URLDownloadToVar("http://176.96.138.103/keybinder/changelog.txt")
4994MsgBox, 68, %keybinder% - Version %currentVersion%, Es wurde eine neue Keybinderversion (Version %newversion%) veröffentlicht!`nMöchtest du diese nun herunterladen?`n`n%changelog%
4995IfMsgBox, Yes
4996{
4997Progress, 25, Lädt neue Version herunter, Der Keybinder wird nun geupdated..., Update
4998UrlDownloadToFile, %baseURL%DM.exe, DM.new.exe
4999Progress, 75, Installiere Update, Der Keybinder wird nun geupdated..., Update
5000Sleep, 500
5001updateBat =
5002 (LTrim
5003 ping 127.0.0.1 -n 2 > nul
5004 Del "DM.exe"
5005 Rename "DM.new.exe" "DM.exe"
5006 "DM.exe"
5007)
5008FileAppend, %updateBat%, update.bat
5009Sleep, 1000
5010Run, update.bat, , hide
5011Progress, 100, Abgeschlossen, Der Keybinder wird nun geupdated..., Update
5012ExitApp
5013}
5014}
5015}
5016IniRead, SQLite3DllPath, SQLiteDB.ini, Main, DllPath, %A_Space%
5017if (SQLite3DllPath != "bin\SQLite3.dll") {
5018IniWrite, % "bin\SQLite3.dll", SQLiteDB.ini, Main, DllPath
5019}
5020Class SQLiteDB Extends SQLiteDB.BaseClass {
5021Class BaseClass {
5022Static Version := ""
5023Static _SQLiteDLL := A_ScriptDir . "\SQLite3.dll"
5024Static _RefCount := 0
5025Static _MinVersion := "3.6"
5026}
5027Class _Table {
5028__New() {
5029This.ColumnCount := 0
5030This.RowCount := 0
5031This.ColumnNames := []
5032This.Rows := []
5033This.HasNames := False
5034This.HasRows := False
5035This._CurrentRow := 0
5036}
5037GetRow(RowIndex, ByRef Row) {
5038Row := ""
5039If (RowIndex < 1 || RowIndex > This.RowCount)
5040Return False
5041If !This.Rows.HasKey(RowIndex)
5042Return False
5043Row := This.Rows[RowIndex]
5044This._CurrentRow := RowIndex
5045Return True
5046}
5047Next(ByRef Row) {
5048Row := ""
5049If (This._CurrentRow >= This.RowCount)
5050Return -1
5051This._CurrentRow += 1
5052If !This.Rows.HasKey(This._CurrentRow)
5053Return False
5054Row := This.Rows[This._CurrentRow]
5055Return True
5056}
5057Reset() {
5058This._CurrentRow := 0
5059Return True
5060}
5061}
5062Class _RecordSet {
5063__New() {
5064This.ColumnCount := 0
5065This.ColumnNames := []
5066This.HasNames := False
5067This.HasRows := False
5068This.CurrentRow := 0
5069This.ErrorMsg := ""
5070This.ErrorCode := 0
5071This._Handle := 0
5072This._DB := {}
5073}
5074Next(ByRef Row) {
5075Static SQLITE_NULL := 5
5076Static SQLITE_BLOB := 4
5077Static EOR := -1
5078Row := ""
5079This.ErrorMsg := ""
5080This.ErrorCode := 0
5081If !(This._Handle) {
5082This.ErrorMsg := "Invalid query handle!"
5083Return False
5084}
5085RC := DllCall("SQlite3.dll\sqlite3_step", "Ptr", This._Handle, "Cdecl Int")
5086If (ErrorLevel) {
5087This.ErrorMsg := "DLLCall sqlite3_step failed!"
5088This.ErrorCode := ErrorLevel
5089Return False
5090}
5091If (RC <> This._DB._ReturnCode("SQLITE_ROW")) {
5092If (RC = This._DB._ReturnCode("SQLITE_DONE")) {
5093This.ErrorMsg := "EOR"
5094This.ErrorCode := RC
5095Return EOR
5096}
5097This.ErrorMsg := This._DB.ErrMsg()
5098This.ErrorCode := RC
5099Return False
5100}
5101RC := DllCall("SQlite3.dll\sqlite3_data_count", "Ptr", This._Handle, "Cdecl Int")
5102If (ErrorLevel) {
5103This.ErrorMsg := "DLLCall sqlite3_data_count failed!"
5104This.ErrorCode := ErrorLevel
5105Return False
5106}
5107If (RC < 1) {
5108This.ErrorMsg := "RecordSet is empty!"
5109This.ErrorCode := This._DB._ReturnCode("SQLITE_EMPTY")
5110Return False
5111}
5112Row := []
5113Loop, %RC% {
5114Column := A_Index - 1
5115ColumnType := DllCall("SQlite3.dll\sqlite3_column_type", "Ptr", This._Handle, "Int", Column, "Cdecl Int")
5116If (ErrorLevel) {
5117This.ErrorMsg := "DLLCall sqlite3_column_type failed!"
5118This.ErrorCode := ErrorLevel
5119Return False
5120}
5121If (ColumnType = SQLITE_NULL) {
5122Row[A_Index] := ""
5123} Else If (ColumnType = SQLITE_BLOB) {
5124BlobPtr := DllCall("SQlite3.dll\sqlite3_column_blob", "Ptr", This._Handle, "Int", Column, "Cdecl UPtr")
5125BlobSize := DllCall("SQlite3.dll\sqlite3_column_bytes", "Ptr", This._Handle, "Int", Column, "Cdecl Int")
5126If (BlobPtr = 0) || (BlobSize = 0) {
5127Row[A_Index] := ""
5128} Else {
5129Row[A_Index] := {}
5130Row[A_Index].Size := BlobSize
5131Row[A_Index].Blob := ""
5132Row[A_Index].SetCapacity("Blob", BlobSize)
5133Addr := Row[A_Index].GetAddress("Blob")
5134DllCall("Kernel32.dll\RtlMoveMemory", "Ptr", Addr, "Ptr", BlobPtr, "Ptr", BlobSize)
5135}
5136} Else {
5137StrPtr := DllCall("SQlite3.dll\sqlite3_column_text", "Ptr", This._Handle, "Int", Column, "Cdecl UPtr")
5138If (ErrorLevel) {
5139This.ErrorMsg := "DLLCall sqlite3_column_text failed!"
5140This.ErrorCode := ErrorLevel
5141Return False
5142}
5143Row[A_Index] := StrGet(StrPtr, "UTF-8")
5144}
5145}
5146This.CurrentRow += 1
5147Return True
5148}
5149Reset() {
5150This.ErrorMsg := ""
5151This.ErrorCode := 0
5152If !(This._Handle) {
5153This.ErrorMsg := "Invalid query handle!"
5154Return False
5155}
5156RC := DllCall("SQlite3.dll\sqlite3_reset", "Ptr", This._Handle, "Cdecl Int")
5157If (ErrorLevel) {
5158This.ErrorMsg := "DLLCall sqlite3_reset failed!"
5159This.ErrorCode := ErrorLevel
5160Return False
5161}
5162If (RC) {
5163This.ErrorMsg := This._DB._ErrMsg()
5164This.ErrorCode := RC
5165Return False
5166}
5167This.CurrentRow := 0
5168Return True
5169}
5170Free() {
5171This.ErrorMsg := ""
5172This.ErrorCode := 0
5173If !(This._Handle)
5174Return True
5175RC := DllCall("SQlite3.dll\sqlite3_finalize", "Ptr", This._Handle, "Cdecl Int")
5176If (ErrorLevel) {
5177This.ErrorMsg := "DLLCall sqlite3_finalize failed!"
5178This.ErrorCode := ErrorLevel
5179Return False
5180}
5181If (RC) {
5182This.ErrorMsg := This._DB._ErrMsg()
5183This.ErrorCode := RC
5184Return False
5185}
5186This._DB._Queries.Remove(This._Handle)
5187This._Handle := 0
5188Return True
5189}
5190}
5191__New() {
5192This._Path := ""
5193This._Handle := 0
5194This._Queries := {}
5195If (This.Base._RefCount = 0) {
5196SQLiteDLL := This.Base._SQLiteDLL
5197If !FileExist(SQLiteDLL)
5198If FileExist(A_ScriptDir . "\SQLiteDB.ini") {
5199IniRead, SQLiteDLL, %A_ScriptDir%\SQLiteDB.ini, Main, DllPath, %SQLiteDLL%
5200This.Base._SQLiteDLL := SQLiteDLL
5201}
5202If !(DLL := DllCall("LoadLibrary", "Str", This.Base._SQLiteDLL, "UPtr")) {
5203MsgBox, 16, SQLiteDB Error, % "DLL " . SQLiteDLL . " does not exist!"
5204ExitApp
5205}
5206This.Base.Version := StrGet(DllCall("SQlite3.dll\sqlite3_libversion", "Cdecl UPtr"), "UTF-8")
5207SQLVersion := StrSplit(This.Base.Version, ".")
5208MinVersion := StrSplit(This.Base._MinVersion, ".")
5209If (SQLVersion[1] < MinVersion[1]) || ((SQLVersion[1] = MinVersion[1]) && (SQLVersion[2] < MinVersion[2])){
5210DllCall("FreeLibrary", "Ptr", DLL)
5211MsgBox, 16, SQLite ERROR, % "Version " . This.Base.Version . " of SQLite3.dll is not supported!`n`n"
5212. "You can download the current version from www.sqlite.org!"
5213ExitApp
5214}
5215}
5216This.Base._RefCount += 1
5217}
5218__Delete() {
5219If (This._Handle)
5220This.CloseDB()
5221This.Base._RefCount -= 1
5222If (This.Base._RefCount = 0) {
5223If (DLL := DllCall("GetModuleHandle", "Str", This.Base._SQLiteDLL, "UPtr"))
5224DllCall("FreeLibrary", "Ptr", DLL)
5225}
5226}
5227_StrToUTF8(Str, ByRef UTF8) {
5228VarSetCapacity(UTF8, StrPut(Str, "UTF-8"), 0)
5229StrPut(Str, &UTF8, "UTF-8")
5230Return &UTF8
5231}
5232_UTF8ToStr(UTF8) {
5233Return StrGet(UTF8, "UTF-8")
5234}
5235_ErrMsg() {
5236If (RC := DllCall("SQLite3.dll\sqlite3_errmsg", "Ptr", This._Handle, "Cdecl UPtr"))
5237Return StrGet(&RC, "UTF-8")
5238Return ""
5239}
5240_ErrCode() {
5241Return DllCall("SQLite3.dll\sqlite3_errcode", "Ptr", This._Handle, "Cdecl Int")
5242}
5243_Changes() {
5244Return DllCall("SQLite3.dll\sqlite3_changes", "Ptr", This._Handle, "Cdecl Int")
5245}
5246_ReturnCode(RC) {
5247Static RCODE := {SQLITE_OK: 0
5248, SQLITE_ERROR: 1
5249, SQLITE_INTERNAL: 2
5250, SQLITE_PERM: 3
5251, SQLITE_ABORT: 4
5252, SQLITE_BUSY: 5
5253, SQLITE_LOCKED: 6
5254, SQLITE_NOMEM: 7
5255, SQLITE_READONLY: 8
5256, SQLITE_INTERRUPT: 9
5257, SQLITE_IOERR: 10
5258, SQLITE_CORRUPT: 11
5259, SQLITE_NOTFOUND: 12
5260, SQLITE_FULL: 13
5261, SQLITE_CANTOPEN: 14
5262, SQLITE_PROTOCOL: 15
5263, SQLITE_EMPTY: 16
5264, SQLITE_SCHEMA: 17
5265, SQLITE_TOOBIG: 18
5266, SQLITE_CONSTRAINT: 19
5267, SQLITE_MISMATCH: 20
5268, SQLITE_MISUSE: 21
5269, SQLITE_NOLFS: 22
5270, SQLITE_AUTH: 23
5271, SQLITE_FORMAT: 24
5272, SQLITE_RANGE: 25
5273, SQLITE_NOTADB: 26
5274, SQLITE_ROW: 100
5275, SQLITE_DONE: 101}
5276Return RCODE.HasKey(RC) ? RCODE[RC] : ""
5277}
5278ErrorMsg := ""
5279ErrorCode := 0
5280Changes := 0
5281SQL := ""
5282OpenDB(DBPath, Access := "W", Create := True) {
5283Static SQLITE_OPEN_READONLY := 0x01
5284Static SQLITE_OPEN_READWRITE := 0x02
5285Static SQLITE_OPEN_CREATE := 0x04
5286Static MEMDB := ":memory:"
5287This.ErrorMsg := ""
5288This.ErrorCode := 0
5289HDB := 0
5290If (DBPath = "")
5291DBPath := MEMDB
5292If (DBPath = This._Path) && (This._Handle)
5293Return True
5294If (This._Handle) {
5295This.ErrorMsg := "You must first close DB " . This._Path . "!"
5296Return False
5297}
5298Flags := 0
5299Access := SubStr(Access, 1, 1)
5300If (Access <> "W") && (Access <> "R")
5301Access := "R"
5302Flags := SQLITE_OPEN_READONLY
5303If (Access = "W") {
5304Flags := SQLITE_OPEN_READWRITE
5305If (Create)
5306Flags |= SQLITE_OPEN_CREATE
5307}
5308This._Path := DBPath
5309This._StrToUTF8(DBPath, UTF8)
5310RC := DllCall("SQlite3.dll\sqlite3_open_v2", "Ptr", &UTF8, "PtrP", HDB, "Int", Flags, "Ptr", 0, "Cdecl Int")
5311If (ErrorLevel) {
5312This._Path := ""
5313This.ErrorMsg := "DLLCall sqlite3_open_v2 failed!"
5314This.ErrorCode := ErrorLevel
5315Return False
5316}
5317If (RC) {
5318This._Path := ""
5319This.ErrorMsg := This._ErrMsg()
5320This.ErrorCode := RC
5321Return False
5322}
5323This._Handle := HDB
5324Return True
5325}
5326CloseDB() {
5327This.ErrorMsg := ""
5328This.ErrorCode := 0
5329This.SQL := ""
5330If !(This._Handle)
5331Return True
5332For Each, Query in This._Queries
5333DllCall("SQlite3.dll\sqlite3_finalize", "Ptr", Query, "Cdecl Int")
5334RC := DllCall("SQlite3.dll\sqlite3_close", "Ptr", This._Handle, "Cdecl Int")
5335If (ErrorLevel) {
5336This.ErrorMsg := "DLLCall sqlite3_close failed!"
5337This.ErrorCode := ErrorLevel
5338Return False
5339}
5340If (RC) {
5341This.ErrorMsg := This._ErrMsg()
5342This.ErrorCode := RC
5343Return False
5344}
5345This._Path := ""
5346This._Handle := ""
5347This._Queries := []
5348Return True
5349}
5350AttachDB(DBPath, DBAlias) {
5351Return This.Exec("ATTACH DATABASE '" . DBPath . "' As " . DBAlias . ";")
5352}
5353DetachDB(DBAlias) {
5354Return This.Exec("DETACH DATABASE " . DBAlias . ";")
5355}
5356Exec(SQL, Callback := "") {
5357This.ErrorMsg := ""
5358This.ErrorCode := 0
5359This.SQL := SQL
5360If !(This._Handle) {
5361This.ErrorMsg := "Invalid dadabase handle!"
5362Return False
5363}
5364CBPtr := 0
5365Err := 0
5366If (FO := Func(Callback)) && (FO.MinParams = 4)
5367CBPtr := RegisterCallback(Callback, "F C", 4, &SQL)
5368This._StrToUTF8(SQL, UTF8)
5369RC := DllCall("SQlite3.dll\sqlite3_exec", "Ptr", This._Handle, "Ptr", &UTF8, "Int", CBPtr, "Ptr", Object(This)
5370, "PtrP", Err, "Cdecl Int")
5371CallError := ErrorLevel
5372If (CBPtr)
5373DllCall("Kernel32.dll\GlobalFree", "Ptr", CBPtr)
5374If (CallError) {
5375This.ErrorMsg := "DLLCall sqlite3_exec failed!"
5376This.ErrorCode := CallError
5377Return False
5378}
5379If (RC) {
5380This.ErrorMsg := StrGet(Err, "UTF-8")
5381This.ErrorCode := RC
5382DllCall("SQLite3.dll\sqlite3_free", "Ptr", Err, "Cdecl")
5383Return False
5384}
5385This.Changes := This._Changes()
5386Return True
5387}
5388GetTable(SQL, ByRef TB, MaxResult := 0) {
5389TB := ""
5390This.ErrorMsg := ""
5391This.ErrorCode := 0
5392This.SQL := SQL
5393If !(This._Handle) {
5394This.ErrorMsg := "Invalid dadabase handle!"
5395Return False
5396}
5397If !RegExMatch(SQL, "i)^\s*(SELECT|PRAGMA)\s") {
5398This.ErrorMsg := "Method " . A_ThisFunc . " requires a query statement!"
5399Return False
5400}
5401Names := ""
5402Err := 0, RC := 0, GetRows := 0
5403I := 0, Rows := Cols := 0
5404Table := 0
5405If MaxResult Is Not Integer
5406MaxResult := 0
5407If (MaxResult < -2)
5408MaxResult := 0
5409This._StrToUTF8(SQL, UTF8)
5410RC := DllCall("SQlite3.dll\sqlite3_get_table", "Ptr", This._Handle, "Ptr", &UTF8, "PtrP", Table
5411, "IntP", Rows, "IntP", Cols, "PtrP", Err, "Cdecl Int")
5412If (ErrorLevel) {
5413This.ErrorMsg := "DLLCall sqlite3_get_table failed!"
5414This.ErrorCode := ErrorLevel
5415Return False
5416}
5417If (RC) {
5418This.ErrorMsg := StrGet(Err, "UTF-8")
5419This.ErrorCode := RC
5420DllCall("SQLite3.dll\sqlite3_free", "Ptr", Err, "Cdecl")
5421Return False
5422}
5423TB := new This._Table
5424TB.ColumnCount := Cols
5425TB.RowCount := Rows
5426If (MaxResult = -1) {
5427DllCall("SQLite3.dll\sqlite3_free_table", "Ptr", Table, "Cdecl")
5428If (ErrorLevel) {
5429This.ErrorMsg := "DLLCall sqlite3_free_table failed!"
5430This.ErrorCode := ErrorLevel
5431Return False
5432}
5433Return True
5434}
5435If (MaxResult = -2)
5436GetRows := 0
5437Else If (MaxResult > 0) && (MaxResult <= Rows)
5438GetRows := MaxResult
5439Else
5440GetRows := Rows
5441Offset := 0
5442Names := Array()
5443Loop, %Cols% {
5444Names[A_Index] := StrGet(NumGet(Table+0, Offset, "UPtr"), "UTF-8")
5445Offset += A_PtrSize
5446}
5447TB.ColumnNames := Names
5448TB.HasNames := True
5449Loop, %GetRows% {
5450I := A_Index
5451TB.Rows[I] := []
5452Loop, %Cols% {
5453TB.Rows[I][A_Index] := StrGet(NumGet(Table+0, Offset, "UPtr"), "UTF-8")
5454Offset += A_PtrSize
5455}
5456}
5457If (GetRows)
5458TB.HasRows := True
5459DllCall("SQLite3.dll\sqlite3_free_table", "Ptr", Table, "Cdecl")
5460If (ErrorLevel) {
5461TB := ""
5462This.ErrorMsg := "DLLCall sqlite3_free_table failed!"
5463This.ErrorCode := ErrorLevel
5464Return False
5465}
5466Return True
5467}
5468Query(SQL, ByRef RS) {
5469RS := ""
5470This.ErrorMsg := ""
5471This.ErrorCode := 0
5472This.SQL := SQL
5473ColumnCount := 0
5474HasRows := False
5475If !(This._Handle) {
5476This.ErrorMsg := "Invalid dadabase handle!"
5477Return False
5478}
5479If !RegExMatch(SQL, "i)^\s*(SELECT|PRAGMA)\s|") {
5480This.ErrorMsg := "Method " . A_ThisFunc . " requires a query statement!"
5481Return False
5482}
5483Query := 0
5484This._StrToUTF8(SQL, UTF8)
5485RC := DllCall("SQlite3.dll\sqlite3_prepare_v2", "Ptr", This._Handle, "Ptr", &UTF8, "Int", -1
5486, "PtrP", Query, "Ptr", 0, "Cdecl Int")
5487If (ErrorLeveL) {
5488This.ErrorMsg := "DLLCall sqlite3_prepare_v2 failed!"
5489This.ErrorCode := ErrorLevel
5490Return False
5491}
5492If (RC) {
5493This.ErrorMsg := This._ErrMsg()
5494This.ErrorCode := RC
5495Return False
5496}
5497RC := DllCall("SQlite3.dll\sqlite3_column_count", "Ptr", Query, "Cdecl Int")
5498If (ErrorLevel) {
5499This.ErrorMsg := "DLLCall sqlite3_column_count failed!"
5500This.ErrorCode := ErrorLevel
5501Return False
5502}
5503If (RC < 1) {
5504This.ErrorMsg := "Query result is empty!"
5505This.ErrorCode := This._ReturnCode("SQLITE_EMPTY")
5506Return False
5507}
5508ColumnCount := RC
5509Names := []
5510Loop, %RC% {
5511StrPtr := DllCall("SQlite3.dll\sqlite3_column_name", "Ptr", Query, "Int", A_Index - 1, "Cdecl UPtr")
5512If (ErrorLevel) {
5513This.ErrorMsg := "DLLCall sqlite3_column_name failed!"
5514This.ErrorCode := ErrorLevel
5515Return False
5516}
5517Names[A_Index] := StrGet(StrPtr, "UTF-8")
5518}
5519RC := DllCall("SQlite3.dll\sqlite3_step", "Ptr", Query, "Cdecl Int")
5520If (ErrorLevel) {
5521This.ErrorMsg := "DLLCall sqlite3_step failed!"
5522This.ErrorCode := ErrorLevel
5523Return False
5524}
5525If (RC = This._ReturnCode("SQLITE_ROW"))
5526HasRows := True
5527RC := DllCall("SQlite3.dll\sqlite3_reset", "Ptr", Query, "Cdecl Int")
5528If (ErrorLevel) {
5529This.ErrorMsg := "DLLCall sqlite3_reset failed!"
5530This.ErrorCode := ErrorLevel
5531Return False
5532}
5533RS := new This._RecordSet
5534RS.ColumnCount := ColumnCount
5535RS.ColumnNames := Names
5536RS.HasNames := True
5537RS.HasRows := HasRows
5538RS._Handle := Query
5539RS._DB := This
5540This._Queries[Query] := Query
5541Return True
5542}
5543LastInsertRowID(ByRef RowID) {
5544This.ErrorMsg := ""
5545This.ErrorCode := 0
5546This.SQL := ""
5547If !(This._Handle) {
5548This.ErrorMsg := "Invalid dadabase handle!"
5549Return False
5550}
5551RowID := 0
5552RC := DllCall("SQLite3.dll\sqlite3_last_insert_rowid", "Ptr", This._Handle, "Cdecl Int64")
5553If (ErrorLevel) {
5554This.ErrorMsg := "DLLCall sqlite3_last_insert_rowid failed!"
5555This.ErrorCode := ErrorLevel
5556Return False
5557}
5558RowID := RC
5559Return True
5560}
5561TotalChanges(ByRef Rows) {
5562This.ErrorMsg := ""
5563This.ErrorCode := 0
5564This.SQL := ""
5565If !(This._Handle) {
5566This.ErrorMsg := "Invalid dadabase handle!"
5567Return False
5568}
5569Rows := 0
5570RC := DllCall("SQLite3.dll\sqlite3_total_changes", "Ptr", This._Handle, "Cdecl Int")
5571If (ErrorLevel) {
5572This.ErrorMsg := "DLLCall sqlite3_total_changes failed!"
5573This.ErrorCode := ErrorLevel
5574Return False
5575}
5576Rows := RC
5577Return True
5578}
5579SetTimeout(Timeout := 1000) {
5580This.ErrorMsg := ""
5581This.ErrorCode := 0
5582This.SQL := ""
5583If !(This._Handle) {
5584This.ErrorMsg := "Invalid dadabase handle!"
5585Return False
5586}
5587If Timeout Is Not Integer
5588Timeout := 1000
5589RC := DllCall("SQLite3.dll\sqlite3_busy_timeout", "Ptr", This._Handle, "Cdecl Int")
5590If (ErrorLevel) {
5591This.ErrorMsg := "DLLCall sqlite3_busy_timeout failed!"
5592This.ErrorCode := ErrorLevel
5593Return False
5594}
5595If (RC) {
5596This.ErrorMsg := This._ErrMsg()
5597This.ErrorCode := RC
5598Return False
5599}
5600Return True
5601}
5602EscapeStr(ByRef Str, Quote := True) {
5603This.ErrorMsg := ""
5604This.ErrorCode := 0
5605This.SQL := ""
5606If !(This._Handle) {
5607This.ErrorMsg := "Invalid dadabase handle!"
5608Return False
5609}
5610If Str Is Number
5611Return True
5612OP := Quote ? "%Q" : "%q"
5613This._StrToUTF8(Str, UTF8)
5614Ptr := DllCall("SQLite3.dll\sqlite3_mprintf", "Ptr", &OP, "Ptr", &UTF8, "Cdecl UPtr")
5615If (ErrorLevel) {
5616This.ErrorMsg := "DLLCall sqlite3_mprintf failed!"
5617This.ErrorCode := ErrorLevel
5618Return False
5619}
5620Str := This._UTF8ToStr(Ptr)
5621DllCall("SQLite3.dll\sqlite3_free", "Ptr", Ptr, "Cdecl")
5622Return True
5623}
5624StoreBLOB(SQL, BlobArray) {
5625Static SQLITE_STATIC := 0
5626Static SQLITE_TRANSIENT := -1
5627This.ErrorMsg := ""
5628This.ErrorCode := 0
5629If !(This._Handle) {
5630This.ErrorMsg := "Invalid dadabase handle!"
5631Return False
5632}
5633If !RegExMatch(SQL, "i)^\s*(INSERT|UPDATE|REPLACE)\s") {
5634This.ErrorMsg := A_ThisFunc . " requires an INSERT/UPDATE/REPLACE statement!"
5635Return False
5636}
5637Query := 0
5638This._StrToUTF8(SQL, UTF8)
5639RC := DllCall("SQlite3.dll\sqlite3_prepare_v2", "Ptr", This._Handle, "Ptr", &UTF8, "Int", -1
5640, "PtrP", Query, "Ptr", 0, "Cdecl Int")
5641If (ErrorLeveL) {
5642This.ErrorMsg := A_ThisFunc . ": DLLCall sqlite3_prepare_v2 failed!"
5643This.ErrorCode := ErrorLevel
5644Return False
5645}
5646If (RC) {
5647This.ErrorMsg := A_ThisFunc . ": " . This._ErrMsg()
5648This.ErrorCode := RC
5649Return False
5650}
5651For BlobNum, Blob In BlobArray {
5652If !(Blob.Addr) || !(Blob.Size) {
5653This.ErrorMsg := A_ThisFunc . ": Invalid parameter BlobArray!"
5654This.ErrorCode := ErrorLevel
5655Return False
5656}
5657RC := DllCall("SQlite3.dll\sqlite3_bind_blob", "Ptr", Query, "Int", BlobNum, "Ptr", Blob.Addr
5658, "Int", Blob.Size, "Ptr", SQLITE_STATIC, "Cdecl Int")
5659If (ErrorLeveL) {
5660This.ErrorMsg := A_ThisFunc . ": DLLCall sqlite3_prepare_v2 failed!"
5661This.ErrorCode := ErrorLevel
5662Return False
5663}
5664If (RC) {
5665This.ErrorMsg := A_ThisFunc . ": " . This._ErrMsg()
5666This.ErrorCode := RC
5667Return False
5668}
5669}
5670RC := DllCall("SQlite3.dll\sqlite3_step", "Ptr", Query, "Cdecl Int")
5671If (ErrorLevel) {
5672This.ErrorMsg := A_ThisFunc . ": DLLCall sqlite3_step failed!"
5673This.ErrorCode := ErrorLevel
5674Return False
5675}
5676If (RC) && (RC <> This._ReturnCode("SQLITE_DONE")) {
5677This.ErrorMsg := A_ThisFunc . ": " . This._ErrMsg()
5678This.ErrorCode := RC
5679Return False
5680}
5681RC := DllCall("SQlite3.dll\sqlite3_finalize", "Ptr", Query, "Cdecl Int")
5682If (ErrorLevel) {
5683This.ErrorMsg := A_ThisFunc . ": DLLCall sqlite3_finalize failed!"
5684This.ErrorCode := ErrorLevel
5685Return False
5686}
5687If (RC) {
5688This.ErrorMsg := A_ThisFunc . ": " . This._ErrMsg()
5689This.ErrorCode := RC
5690Return False
5691}
5692Return True
5693}
5694}
5695SQLiteDB := new SQLiteDB
5696SQLiteDB.OpenDB("dm.db")
5697if (!SQLiteDB.Exec("CREATE TABLE IF NOT EXISTS enemies (name VARCHAR(35), fraction TINYINT(2), updated INT(10), PRIMARY KEY (name));")) {
5698MsgBox, 16, SQLite Fehler, % "Es ist ein Fehler beim Erstellen der Gegner-Datenbank aufgetreten!`n`nFehlernachricht:`t" . SQLiteDB.ErrorMsg . "`nFehlercode:`t" . SQLiteDB.ErrorCode . "`n`nBitte melde dich bei Martin im Forum!"
5699SQLiteDB.CloseDB()
5700ExitApp
5701}
5702if (!SQLiteDB.Exec("CREATE TABLE IF NOT EXISTS friends (name VARCHAR(35), added INT(10), PRIMARY KEY (name));")) {
5703MsgBox, 16, SQLite Fehler, % "Es ist ein Fehler beim Erstellen der Freunde-Datenbank aufgetreten!`n`nFehlernachricht:`t" . SQLiteDB.ErrorMsg . "`nFehlercode:`t" . SQLiteDB.ErrorCode . "`n`nBitte melde dich bei Martin im Forum!"
5704SQLiteDB.CloseDB()
5705ExitApp
5706}
5707SQLiteDB.Exec("UPDATE enemies SET fraction = '0' WHERE fraction = '1' OR fraction = '2' OR fraction = '3';")
5708global onlineEnemies := []
5709global warnings := []
5710global pedStates := {}
5711global fractions := {"": [0, "Zivilist"], "lspd": [1, "LSPD"], "fbi": [2, "FBI"], "army": [3, "Army"], "lsmd": [4, "LSMD"], "russen": [5, "Russen Mafia"], "yakuza": [6, "Yakuza"], "regierung": [7, "Regierung"], "agency": [8, "Agency"], "news": [9, "San News"], "grove": [10, "Grove Street"], "ballas": [11, "Ballas"], "lcm": [12, "LCM"], "oamt": [13, "Ordnungsamt"], "gmbh": [14, "Transport GmbH"], "rifa": [15, "S.F. Rifa"], "vagos": [16, "Vagos"], "triaden": [17, "Triaden"], "safd": [19, "SAFD"], "biker": [22, "Biker"]}
5712global MaximalHotkeys := 40
5713chatLogFile := FileOpen(A_MyDocuments . "\GTA San Andreas User Files\SAMP\chatlog.txt", "r")
5714firstChatLogRun := true
5715chatLogLines := []
5716global contractList := []
5717global eatFish := 1
5718global call := 0
5719global tempomat := 0
5720global streak := 0
5721global backupMode := 0
5722global countdown := 0
5723global countdownMode := 0
5724global afkState := 0
5725global isPayday := 0
5726global drugcooldown := 0
5727global healcooldown := 0
5728global admincooldown := 0
5729global ooccooldown := 0
5730global autoFindMode := 0
5731global ovMoveMode := 0
5732global ticketPrice := 0
5733global playerToFind := ""
5734global playerToShowTo := ""
5735global ticketName := ""
5736global medicName := ""
5737global oldSpotify := ""
5738global debugMode := true
5739global isInVehicle := false
5740global startOverlay := false
5741global pauseOverlay := false
5742global firstRun := false
5743global fillTimeout_ := true
5744global canisterTimeout_ := true
5745global mautTimeout_ := true
5746global healTimeout_ := true
5747global cookTimeout_ := true
5748global gateTimeout_ := true
5749global fishTimeout_ := true
5750global localTimeout_ := true
5751global garbageTimeout_ := true
5752global fishSellTimeout_ := true
5753global depositTimeout_ := true
5754global searchTimeout_ := true
5755global outbrealTimeout_ := true
5756global cRed := "{CC0000}"
5757global cBlue := "{01A9DB}"
5758global cGrey := "{A4A4A4}"
5759global cPink := "{DF01D7}"
5760global cBlack := "{000000}"
5761global cWhite := "{FFFFFF}"
5762global cGreen := "{088A68}"
5763global cBrown := "{61210B}"
5764global cYellow := "{FFBF00}"
5765global cOrange := "{FF8000}"
5766global cPurple := "{8000FF}"
5767HotkeyArray := object()
5768Loop, % MaximalHotkeys {
5769count := A_Index - 1
5770HotkeyArray["Hotkey" count ""] := "0"
5771}
5772IfNotExist, ini/Hotkeys.ini
5773{
5774for key, value in HotkeyArray {
5775IniWrite, %value%, ini/Hotkeys.ini, Hotkeys, %key%
5776}
5777}
5778for key in HotkeyArray {
5779IniRead, hk, ini/Hotkeys.ini, Hotkeys, %key%, %A_Space%
5780if (hk) {
5781Hotkey, %hk%, %key%Label
5782savedHK%key% := hk
5783}
5784StringReplace, %key%NoMods, hk, ~
5785}
5786IniRead, FishingMoney, ini/stats.ini, stats, FishingMoney, 0
5787IniRead, kills, ini/stats.ini, stats, kills, 0
5788IniRead, dkills, ini/stats.ini, stats, dkills[%A_DD%:%A_MM%:%A_YYYY%], 0
5789IniRead, mkills, ini/stats.ini, stats, mkills[%A_MM%:%A_YYYY%], 0
5790IniRead, deaths, ini/stats.ini, stats, deaths, 0
5791IniRead, ddeaths, ini/stats.ini, stats, ddeaths[%A_DD%:%A_MM%:%A_YYYY%], 0
5792IniRead, mdeaths, ini/stats.ini, stats, mdeaths[%A_MM%:%A_YYYY%], 0
5793IniRead, killstreak, ini/stats.ini, stats, killstreak, 0
5794IniRead, firstaid, ini/settings.ini, items, firstaid, 0
5795IniRead, campfire, ini/settings.ini, items, campfire, 0
5796IniRead, canister, ini/settings.ini, items, canister, 0
5797IniRead, wanteds, ini/settings.ini, items, wanteds, 0
5798IniRead, drugs, ini/settings.ini, items, drugs, 0
5799IniRead, mats, ini/settings.ini, items, mats, 0
5800IniRead, mobilePhone, ini/settings.ini, items, mobilePhone, 1
5801IniRead, deathcooldown, ini/cooldown.ini, cooldown, deathcooldown, 0
5802IniRead, jailcooldown, ini/cooldown.ini, cooldown, jailcooldown, 0
5803IniRead, fishcooldown, ini/cooldown.ini, cooldown, fishcooldown, 0
5804IniRead, pakcooldown, ini/cooldown.ini, cooldown, pakcooldown, 0
5805IniRead, autoLock, ini/settings.ini, settings, autoLock, 0
5806IniRead, autoCook, ini/settings.ini, settings, autoCook, 0
5807IniRead, autoEngine, ini/settings.ini, settings, autoEngine, 0
5808IniRead, autoLotto, ini/settings.ini, settings, autoLotto, 0
5809IniRead, autoPaket, ini/settings.ini, settings, autoPaket, 0
5810IniRead, autoHeal, ini/settings.ini, settings, autoHeal, 0
5811IniRead, autoAb, ini/settings.ini, settings, autoAb, 0
5812IniRead, autoTicket, ini/settings.ini, settings, autoTicket, 0
5813IniRead, saveChatlog, ini/settings.ini, settings, saveChatlog, 0
5814IniRead, autoFish, ini/settings.ini, settings, autoFish, 0
5815IniRead, autoFill, ini/settings.ini, settings, autoFill, 0
5816IniRead, autoZoll, ini/settings.ini, settings, autoZoll, 0
5817IniRead, antiSpam, ini/settings.ini, settings, antiSpam, 0
5818IniRead, releaseType, ini/settings.ini, settings, releaseType, 0
5819IniRead, autoDeposit, ini/settings.ini, settings, autoDeposit, 0
5820IniRead, autoGate, ini/settings.ini, settings, autoGate, 0
5821IniRead, hitmanSystem, ini/settings.ini, settings, hitmanSystem, 0
5822IniRead, damageInfo, ini/settings.ini, settings, damageInfo, 0
5823IniRead, autoLocal, ini/settings.ini, settings, autoLocal, 0
5824IniRead, autoSearch, ini/settings.ini, settings, autoSearch, 0
5825IniRead, autoSearch2, ini/settings.ini, settings, autoSearch2, 0
5826IniRead, fillWarning, ini/settings.ini, settings, fillWarning, 0
5827IniRead, spotifyPrivacy, ini/settings.ini, settings, spotifyPrivacy, 0
5828IniRead, spotifyPublic, ini/settings.ini, settings, spotifyPublic, 0
5829IniRead, fastOutbreak, ini/settings.ini, settings, fastOutbreak, 0
5830IniRead, enemyAddedMessage, ini/settings.ini, settings, enemyAddedMessage, 0
5831IniRead, enemyUpdatedMessage, ini/settings.ini, settings, enemyUpdatedMessage, 0
5832IniRead, enemyJoinLeaveMessage, ini/settings.ini, settings, enemyJoinLeaveMessage, 0
5833IniRead, systemSync, ini/settings.ini, settings, systemSync, 0
5834IniRead, fishHP, ini/settings.ini, settings, fishHP, 92
5835IniRead, pakHP, ini/settings.ini, settings, pakHP, 92
5836IniRead, DrugHp, ini/settings.ini, settings, DrugHp, 100
5837IniRead, lottoNumber, ini/settings.ini, settings, lottoNumber, 31
5838IniRead, depositMoney, ini/settings.ini, settings, depositMoney, 1250000
5839IniRead, primaryColor, ini/settings.ini, settings, primaryColor, %A_Space%
5840IniRead, secondaryColor, ini/settings.ini, settings, secondaryColor, %A_Space%
5841IniRead, ownPrefix, ini/settings.ini, settings, ownPrefix, %A_Space%
5842IniRead, HideMessage, ini/settings.ini, settings, HideMessage, Kill mich nicht du Durak
5843IniRead, PickupMessage, ini/settings.ini, settings, PickupMessage, /p[ENTER]|[SLEEP 600]Guten Tag [CALLER],[ENTER]|Sie sind verbunden mit [NAME], was kann ich für Sie tun?[ENTER]
5844IniRead, HangupMessage, ini/settings.ini, settings, HangupMessage, Ich danke Dir für das Gespräch und ich wünsche dir noch einen schönen [DAYTIME][ENTER]|Hau rein![ENTER]|/h[ENTER]
5845IniRead, MoneyMessage, ini/settings.ini, settings, MoneyMessage, Sehe ich aus, als hätte ich einen Geldautomaten im Arsch?[ENTER]
5846IniRead, KillMessage, ini/settings.ini, settings, KillMessage, /f Ich habe [VICTIM] ([VICTIMFRAK]) [KILLPLACE] mit [VICTIMWEAPART] [VICTIMWEAP] getötet.[ENTER]
5847IniRead, deathMessage, ini/settings.ini, settings, deathMessage, /f fk down by [MURDERER], Death Nr.: [DEATHS][ENTER]
5848IniRead, overlay, ini/settings.ini, settings, overlay, 1
5849IniRead, spotifyOv, ini/settings.ini, overlay, spotifyOv, 1
5850IniRead, spotifyFont, ini/settings.ini, Overlay, spotifyFont, Arial
5851IniRead, spotifySize, ini/settings.ini, Overlay, spotifySize, 9
5852IniRead, spotifyBold, ini/settings.ini, Overlay, spotifyBold, true
5853IniRead, spotifyItal, ini/settings.ini, Overlay, spotifyItal, false
5854IniRead, spotifyXPos, ini/settings.ini, Overlay, spotifyXPos, 3
5855IniRead, spotifyYPos, ini/settings.ini, Overlay, spotifyYPos, 586
5856IniRead, spotifyColor, ini/settings.ini, Overlay, spotifyColor, 0xFFFFFFFF
5857IniRead, cooldownOv, ini/settings.ini, overlay, cooldownOv, 1
5858IniRead, cooldownFont, ini/settings.ini, Overlay, cooldownFont, Arial
5859IniRead, cooldownSize, ini/settings.ini, Overlay, cooldownSize, 9
5860IniRead, cooldownBold, ini/settings.ini, Overlay, cooldownBold, true
5861IniRead, cooldownItal, ini/settings.ini, Overlay, cooldownItal, false
5862IniRead, cooldownXPos, ini/settings.ini, Overlay, cooldownXPos, 645
5863IniRead, cooldownYPos, ini/settings.ini, Overlay, cooldownYPos, 474
5864IniRead, cooldownColor, ini/settings.ini, Overlay, cooldownColor, 0xFFFFA600
5865IniRead, cooldownBoxOv, ini/settings.ini, Overlay, cooldownBoxOv, 1
5866IniRead, cooldownBoxWidth, ini/settings.ini, Overlay, cooldownBoxWidth, 150
5867IniRead, cooldownBoxHeight, ini/settings.ini, Overlay, cooldownBoxHeight, 0
5868IniRead, cooldownBoxX, ini/settings.ini, Overlay, cooldownBoxX, 640
5869IniRead, cooldownBoxY, ini/settings.ini, Overlay, cooldownBoxY, 470
5870IniRead, cooldownBoxHeight, ini/settings.ini, Overlay, cooldownBoxHeight, 22
5871IniRead, cooldownBoxColor, ini/settings.ini, Overlay, cooldownBoxColor, 0xAA000000
5872IniRead, cooldownBoxBorderColor, ini/settings.ini, Overlay, cooldownBoxBorderColor, 0xFFF67D03
5873IniRead, pingOv, ini/settings.ini, overlay, pingOv, 1
5874IniRead, pingFont, ini/settings.ini, Overlay, pingFont, Arial
5875IniRead, pingSize, ini/settings.ini, Overlay, pingSize, 7
5876IniRead, pingBold, ini/settings.ini, Overlay, pingBold, true
5877IniRead, pingItal, ini/settings.ini, Overlay, pingItal, false
5878IniRead, pingXPos, ini/settings.ini, Overlay, pingXPos, 695
5879IniRead, pingYPos, ini/settings.ini, Overlay, pingYPos, 75
5880IniRead, pingColor, ini/settings.ini, Overlay, pingColor, 0xFFFFFFFF
5881IniRead, infoOv, ini/settings.ini, overlay, infoOv, 1
5882IniRead, infoPhoneX, ini/settings.ini, overlay, infoPhoneX, 26
5883IniRead, infoPhoneY, ini/settings.ini, overlay, infoPhoneY, 460
5884IniRead, infoFirstaidX, ini/settings.ini, overlay, infoFirstaidX, 193
5885IniRead, infoFirstaidY, ini/settings.ini, overlay, infoFirstaidY, 558
5886IniRead, infoCanisterX, ini/settings.ini, overlay, infoCanisterX, 296
5887IniRead, infoCanisterY, ini/settings.ini, overlay, infoCanisterY, 518
5888IniRead, infoCampfireX, ini/settings.ini, overlay, infoCampfireX, 223
5889IniRead, infoCampfireY, ini/settings.ini, overlay, infoCampfireY, 558
5890IniRead, infoDrugsX, ini/settings.ini, overlay, infoDrugsX, 253
5891IniRead, infoDrugsY, ini/settings.ini, overlay, infoDrugsY, 558
5892IniRead, infoFishCookedX, ini/settings.ini, overlay, infoFishCookedX, 765
5893IniRead, infoFishCookedY, ini/settings.ini, overlay, infoFishCookedY, 350
5894IniRead, infoFishUncookedX, ini/settings.ini, overlay, infoFishUncookedX, 765
5895IniRead, infoFishUncookedY, ini/settings.ini, overlay, infoFishUncookedY, 385
5896IniRead, ememyOv, ini/settings.ini, EnemyOverlay, ememyOv, 1
5897IniRead, enemyX, ini/settings.ini, EnemyOverlay, enemyX, 660
5898IniRead, enemyY, ini/settings.ini, EnemyOverlay, enemyY, 250
5899IniRead, enemyColors, ini/settings.ini, EnemyOverlay, enemyColors, 1
5900IniRead, enemyItal, ini/settings.ini, EnemyOverlay, enemyItal, 0
5901IniRead, enemyFont, ini/settings.ini, EnemyOverlay, enemyFont, Arial
5902IniRead, enemySize, ini/settings.ini, EnemyOverlay, enemySize, 7
5903IniRead, enemyBold, ini/settings.ini, EnemyOverlay, enemyBold, 1
5904IniRead, enemyColor, ini/settings.ini, EnemyOverlay, enemyColor, FFFFFF
5905IniRead, enemyShowCops, ini/settings.ini, EnemyOverlay, enemyShowCops, 1
5906IniRead, enemyShowOwn, ini/settings.ini, EnemyOverlay, enemyShowOwn, 1
5907enemyOverlayPrimColor := cMain
5908enemyOverlaySecColor := cSecond
5909enemyOverlayPositiveColor := "{00FF00}"
5910enemyOverlayNegativeColor := "{FF0000}"
5911primaryColor := StrReplace(primaryColor, "{", "")
5912primaryColor := StrReplace(primaryColor, "}", "")
5913secondaryColor := StrReplace(secondaryColor, "{", "")
5914secondaryColor := StrReplace(secondaryColor, "}", "")
5915if (primaryColor == "") {
5916primaryColor := "CC0000"
5917}
5918if (secondaryColor == "") {
5919secondaryColor := "FFBF00"
5920}
5921global cMain := "{" . primaryColor . "}"
5922global cSecond := "{" . secondaryColor . "}"
5923global prefix := "~ " . cMain . "Tremblay" . cWhite . " "
5924if (ownprefix != "") {
5925prefix := ownprefix . " "
5926}
5927Loop, % MaximalHotkeys {
5928count := A_Index - 1
5929IniRead, HotkeyCheck%count%, ini/settings.ini, Hotkeys, HotkeyCheck%count%, 0
5930IniRead, HotkeyText%count%, ini/settings.ini, Hotkeys, HotkeyText%count%, %A_Space%
5931}
5932Loop, 3 {
5933profileID := A_Index
5934Loop, 6 {
5935IniRead, profile%profileID%_%A_Index%, ini/settings.ini, equip, Profil%profileID%_%A_Index%, %A_Space%
5936}
5937}
5938IniRead, HotkeyCheckMouse1, ini/settings.ini, Hotkeys, HotkeyCheckMouse1, 0
5939IniRead, HotkeyCheckMouse2, ini/settings.ini, Hotkeys, HotkeyCheckMouse2, 0
5940IniRead, HotkeyCheckExtra1, ini/settings.ini, Hotkeys, HotkeyCheckExtra1, 1
5941IniRead, HotkeyCheckExtra2, ini/settings.ini, Hotkeys, HotkeyCheckExtra2, 1
5942IniRead, HotkeyTextMouse1, ini/settings.ini, Hotkeys, HotkeyTextMouse1, %A_Space%
5943IniRead, HotkeyTextMouse2, ini/settings.ini, Hotkeys, HotkeyTextMouse2, %A_Space%
5944SetTimer, ChatTimer, 200
5945SetTimer, KillTimer, 200
5946SetTimer, MainTimer, 200
5947SetTimer, SecondTimer, 1000
5948SetTimer, Decompile, 2000
5949SetTimer, SearchEnemyTimer, 2500
5950if (systemSync) {
5951SetTimer, SyncTimer, 60000
5952}
5953if (fillWarning) {
5954SetTimer, TankTimer, 5000
5955}
5956if (overlay) {
5957SetTimer, startOverlay, 2500
5958}
5959if (saveChatlog) {
5960SetTimer, AutoChatlog, 5000
5961}
5962if (autoLotto) {
5963SetTimer, LottoTimer, 5000
5964}
5965UnBlockChatInput()
5966Hotkeys:
5967{
5968Gui, Hotkeys: Destroy
5969Gui, Hotkeys: Color, white
5970Gui, Hotkeys: Font, ,
5971Gui, Hotkeys: Font, S10,
5972Gui, Hotkeys: Add, Button, x792 y519 w160 h40 gHotkeysGuiClose, Schließen
5973Gui, Hotkeys: Add, Button, x12 y519 w160 h40 gSaveHotkeys, Speichern
5974Gui, Hotkeys: Add, Button, x182 y519 w160 h40 gSettings, Einstellungen
5975Gui, Hotkeys: Add, Button, x352 y519 w160 h40 gequipProfiles, Ausrüstprofile
5976Gui, Hotkeys: Add, Picture, x176 y30, images\Logo.png
5977Menu, Variablen, Add, Variablen, Variables
5978Menu, Hauptmenu, Add, Developer, Developer
5979Menu, Hauptmenu, Add, Beenden, HotkeysGuiClose
5980Menu, RPGMenü, Add, Forum, ServerForum
5981Menu, RPGMenü, Add, Control Panel, ServerPanel
5982Menu, RPGMenü, Add, Game-Server, ServerConnect
5983Menu, RPGMenü, Add, TS-Server, ServerTeamspeak
5984Menu, Menüleiste, Add, &Keybinder, :Hauptmenu
5985Menu, Menüleiste, Add, &RPG-City, :RPGMenü
5986Menu, Menüleiste, Add, &Variablen, :Variablen
5987Gui, Hotkeys: Menu, Menüleiste
5988Gui, Hotkeys: Add, Tab2, x2 y169 w969 h340, Seite 1|Seite 2|Sondertasten
5989Gui, Hotkeys: Tab, Seite 1
5990Gui, Hotkeys: Add, CheckBox, x12 y199 w20 h20 vHotkeyCheck0 checked%HotkeyCheck0%
5991Gui, Hotkeys: Add, Hotkey, x32 y199 w90 h20 vHotkey0Hotkey gSaveHotkeyLabel, %Hotkey0NoMods%
5992Gui, Hotkeys: Add, Edit, x132 y199 w330 h20 vHotkeyText0, %HotkeyText0%
5993Gui, Hotkeys: Add, CheckBox, x12 y229 w20 h20 vHotkeyCheck1 checked%HotkeyCheck1%
5994Gui, Hotkeys: Add, Hotkey, x32 y229 w90 h20 vHotkey1Hotkey gSaveHotkeyLabel, %Hotkey1NoMods%
5995Gui, Hotkeys: Add, Edit, x132 y229 w330 h20 vHotkeyText1, %HotkeyText1%
5996Gui, Hotkeys: Add, CheckBox, x12 y259 w20 h20 vHotkeyCheck2 checked%HotkeyCheck2%
5997Gui, Hotkeys: Add, Hotkey, x32 y259 w90 h20 vHotkey2Hotkey gSaveHotkeyLabel, %Hotkey2NoMods%
5998Gui, Hotkeys: Add, Edit, x132 y259 w330 h20 vHotkeyText2, %HotkeyText2%
5999Gui, Hotkeys: Add, CheckBox, x12 y289 w20 h20 vHotkeyCheck3 checked%HotkeyCheck3%
6000Gui, Hotkeys: Add, Hotkey, x32 y289 w90 h20 vHotkey3Hotkey gSaveHotkeyLabel, %Hotkey3NoMods%
6001Gui, Hotkeys: Add, Edit, x132 y289 w330 h20 vHotkeyText3, %HotkeyText3%
6002Gui, Hotkeys: Add, CheckBox, x12 y319 w20 h20 vHotkeyCheck4 checked%HotkeyCheck4%
6003Gui, Hotkeys: Add, Hotkey, x32 y319 w90 h20 vHotkey4Hotkey gSaveHotkeyLabel, %Hotkey4NoMods%
6004Gui, Hotkeys: Add, Edit, x132 y319 w330 h20 vHotkeyText4, %HotkeyText4%
6005Gui, Hotkeys: Add, CheckBox, x12 y349 w20 h20 vHotkeyCheck5 checked%HotkeyCheck5%
6006Gui, Hotkeys: Add, Hotkey, x32 y349 w90 h20 vHotkey5Hotkey gSaveHotkeyLabel, %Hotkey5NoMods%
6007Gui, Hotkeys: Add, Edit, x132 y349 w330 h20 vHotkeyText5, %HotkeyText5%
6008Gui, Hotkeys: Add, CheckBox, x12 y379 w20 h20 vHotkeyCheck6 checked%HotkeyCheck6%
6009Gui, Hotkeys: Add, Hotkey, x32 y379 w90 h20 vHotkey6Hotkey gSaveHotkeyLabel, %Hotkey6NoMods%
6010Gui, Hotkeys: Add, Edit, x132 y379 w330 h20 vHotkeyText6, %HotkeyText6%
6011Gui, Hotkeys: Add, CheckBox, x12 y409 w20 h20 vHotkeyCheck7 checked%HotkeyCheck7%
6012Gui, Hotkeys: Add, Hotkey, x32 y409 w90 h20 vHotkey7Hotkey gSaveHotkeyLabel, %Hotkey7NoMods%
6013Gui, Hotkeys: Add, Edit, x132 y409 w330 h20 vHotkeyText7, %HotkeyText7%
6014Gui, Hotkeys: Add, CheckBox, x12 y439 w20 h20 vHotkeyCheck8 checked%HotkeyCheck8%
6015Gui, Hotkeys: Add, Hotkey, x32 y439 w90 h20 vHotkey8Hotkey gSaveHotkeyLabel, %Hotkey8NoMods%
6016Gui, Hotkeys: Add, Edit, x132 y439 w330 h20 vHotkeyText8, %HotkeyText8%
6017Gui, Hotkeys: Add, CheckBox, x12 y469 w20 h20 vHotkeyCheck9 checked%HotkeyCheck9%
6018Gui, Hotkeys: Add, Hotkey, x32 y469 w90 h20 vHotkey9Hotkey gSaveHotkeyLabel, %Hotkey9NoMods%
6019Gui, Hotkeys: Add, Edit, x132 y469 w330 h20 vHotkeyText9, %HotkeyText9%
6020Gui, Hotkeys: Add, CheckBox, x502 y199 w20 h20 vHotkeyCheck10 checked%HotkeyCheck10%
6021Gui, Hotkeys: Add, Hotkey, x522 y199 w90 h20 vHotkey10Hotkey gSaveHotkeyLabel, %Hotkey10NoMods%
6022Gui, Hotkeys: Add, Edit, x622 y199 w330 h20 vHotkeyText10, %HotkeyText10%
6023Gui, Hotkeys: Add, CheckBox, x502 y229 w20 h20 vHotkeyCheck11 checked%HotkeyCheck11%
6024Gui, Hotkeys: Add, Hotkey, x522 y229 w90 h20 vHotkey11Hotkey gSaveHotkeyLabel, %Hotkey11NoMods%
6025Gui, Hotkeys: Add, Edit, x622 y229 w330 h20 vHotkeyText11, %HotkeyText11%
6026Gui, Hotkeys: Add, CheckBox, x502 y259 w20 h20 vHotkeyCheck12 checked%HotkeyCheck12%
6027Gui, Hotkeys: Add, Hotkey, x522 y259 w90 h20 vHotkey12Hotkey gSaveHotkeyLabel, %Hotkey12NoMods%
6028Gui, Hotkeys: Add, Edit, x622 y259 w330 h20 vHotkeyText12, %HotkeyText12%
6029Gui, Hotkeys: Add, CheckBox, x502 y289 w20 h20 vHotkeyCheck13 checked%HotkeyCheck13%
6030Gui, Hotkeys: Add, Hotkey, x522 y289 w90 h20 vHotkey13Hotkey gSaveHotkeyLabel, %Hotkey13NoMods%
6031Gui, Hotkeys: Add, Edit, x622 y289 w330 h20 vHotkeyText13, %HotkeyText13%
6032Gui, Hotkeys: Add, CheckBox, x502 y319 w20 h20 vHotkeyCheck14 checked%HotkeyCheck14%
6033Gui, Hotkeys: Add, Hotkey, x522 y319 w90 h20 vHotkey14Hotkey gSaveHotkeyLabel, %Hotkey14NoMods%
6034Gui, Hotkeys: Add, Edit, x622 y319 w330 h20 vHotkeyText14, %HotkeyText14%
6035Gui, Hotkeys: Add, CheckBox, x502 y349 w20 h20 vHotkeyCheck15 checked%HotkeyCheck15%
6036Gui, Hotkeys: Add, Hotkey, x522 y349 w90 h20 vHotkey15Hotkey gSaveHotkeyLabel, %Hotkey15NoMods%
6037Gui, Hotkeys: Add, Edit, x622 y349 w330 h20 vHotkeyText15, %HotkeyText15%
6038Gui, Hotkeys: Add, CheckBox, x502 y379 w20 h20 vHotkeyCheck16 checked%HotkeyCheck16%
6039Gui, Hotkeys: Add, Hotkey, x522 y379 w90 h20 vHotkey16Hotkey gSaveHotkeyLabel, %Hotkey16NoMods%
6040Gui, Hotkeys: Add, Edit, x622 y379 w330 h20 vHotkeyText16, %HotkeyText16%
6041Gui, Hotkeys: Add, CheckBox, x502 y409 w20 h20 vHotkeyCheck17 checked%HotkeyCheck17%
6042Gui, Hotkeys: Add, Hotkey, x522 y409 w90 h20 vHotkey17Hotkey gSaveHotkeyLabel, %Hotkey17NoMods%
6043Gui, Hotkeys: Add, Edit, x622 y409 w330 h20 vHotkeyText17, %HotkeyText17%
6044Gui, Hotkeys: Add, CheckBox, x502 y439 w20 h20 vHotkeyCheck18 checked%HotkeyCheck18%
6045Gui, Hotkeys: Add, Hotkey, x522 y439 w90 h20 vHotkey18Hotkey gSaveHotkeyLabel, %Hotkey18NoMods%
6046Gui, Hotkeys: Add, Edit, x622 y439 w330 h20 vHotkeyText18, %HotkeyText18%
6047Gui, Hotkeys: Add, CheckBox, x502 y469 w20 h20 vHotkeyCheck19 checked%HotkeyCheck19%
6048Gui, Hotkeys: Add, Hotkey, x522 y469 w90 h20 vHotkey19Hotkey gSaveHotkeyLabel, %Hotkey19NoMods%
6049Gui, Hotkeys: Add, Edit, x622 y469 w330 h20 vHotkeyText19, %HotkeyText19%
6050Gui, Hotkeys: Tab, Seite 2
6051Gui, Hotkeys: Add, CheckBox, x12 y199 w20 h20 vHotkeyCheck20 checked%HotkeyCheck20%
6052Gui, Hotkeys: Add, Hotkey, x32 y199 w90 h20 vHotkey20Hotkey gSaveHotkeyLabel, %Hotkey20NoMods%
6053Gui, Hotkeys: Add, Edit, x132 y199 w330 h20 vHotkeyText20, %HotkeyText20%
6054Gui, Hotkeys: Add, CheckBox, x12 y229 w20 h20 vHotkeyCheck21 checked%HotkeyCheck21%
6055Gui, Hotkeys: Add, Hotkey, x32 y229 w90 h20 vHotkey21Hotkey gSaveHotkeyLabel, %Hotkey21NoMods%
6056Gui, Hotkeys: Add, Edit, x132 y229 w330 h20 vHotkeyText21, %HotkeyText21%
6057Gui, Hotkeys: Add, CheckBox, x12 y259 w20 h20 vHotkeyCheck22 checked%HotkeyCheck22%
6058Gui, Hotkeys: Add, Hotkey, x32 y259 w90 h20 vHotkey22Hotkey gSaveHotkeyLabel, %Hotkey22NoMods%
6059Gui, Hotkeys: Add, Edit, x132 y259 w330 h20 vHotkeyText22, %HotkeyText22%
6060Gui, Hotkeys: Add, CheckBox, x12 y289 w20 h20 vHotkeyCheck23 checked%HotkeyCheck23%
6061Gui, Hotkeys: Add, Hotkey, x32 y289 w90 h20 vHotkey23Hotkey gSaveHotkeyLabel, %Hotkey23NoMods%
6062Gui, Hotkeys: Add, Edit, x132 y289 w330 h20 vHotkeyText23, %HotkeyText23%
6063Gui, Hotkeys: Add, CheckBox, x12 y319 w20 h20 vHotkeyCheck24 checked%HotkeyCheck24%
6064Gui, Hotkeys: Add, Hotkey, x32 y319 w90 h20 vHotkey24Hotkey gSaveHotkeyLabel, %Hotkey24NoMods%
6065Gui, Hotkeys: Add, Edit, x132 y319 w330 h20 vHotkeyText24, %HotkeyText24%
6066Gui, Hotkeys: Add, CheckBox, x12 y349 w20 h20 vHotkeyCheck25 checked%HotkeyCheck25%
6067Gui, Hotkeys: Add, Hotkey, x32 y349 w90 h20 vHotkey25Hotkey gSaveHotkeyLabel, %Hotkey25NoMods%
6068Gui, Hotkeys: Add, Edit, x132 y349 w330 h20 vHotkeyText25, %HotkeyText25%
6069Gui, Hotkeys: Add, CheckBox, x12 y379 w20 h20 vHotkeyCheck26 checked%HotkeyCheck26%
6070Gui, Hotkeys: Add, Hotkey, x32 y379 w90 h20 vHotkey26Hotkey gSaveHotkeyLabel, %Hotkey26NoMods%
6071Gui, Hotkeys: Add, Edit, x132 y379 w330 h20 vHotkeyText26, %HotkeyText26%
6072Gui, Hotkeys: Add, CheckBox, x12 y409 w20 h20 vHotkeyCheck27 checked%HotkeyCheck27%
6073Gui, Hotkeys: Add, Hotkey, x32 y409 w90 h20 vHotkey27Hotkey gSaveHotkeyLabel, %Hotkey27NoMods%
6074Gui, Hotkeys: Add, Edit, x132 y409 w330 h20 vHotkeyText27, %HotkeyText27%
6075Gui, Hotkeys: Add, CheckBox, x12 y439 w20 h20 vHotkeyCheck28 checked%HotkeyCheck28%
6076Gui, Hotkeys: Add, Hotkey, x32 y439 w90 h20 vHotkey28Hotkey gSaveHotkeyLabel, %Hotkey28NoMods%
6077Gui, Hotkeys: Add, Edit, x132 y439 w330 h20 vHotkeyText28, %HotkeyText28%
6078Gui, Hotkeys: Add, CheckBox, x12 y469 w20 h20 vHotkeyCheck29 checked%HotkeyCheck29%
6079Gui, Hotkeys: Add, Hotkey, x32 y469 w90 h20 vHotkey29Hotkey gSaveHotkeyLabel, %Hotkey29NoMods%
6080Gui, Hotkeys: Add, Edit, x132 y469 w330 h20 vHotkeyText29, %HotkeyText29%
6081Gui, Hotkeys: Add, CheckBox, x502 y199 w20 h20 vHotkeyCheck30 checked%HotkeyCheck30%
6082Gui, Hotkeys: Add, Hotkey, x522 y199 w90 h20 vHotkey30Hotkey gSaveHotkeyLabel, %Hotkey30NoMods%
6083Gui, Hotkeys: Add, Edit, x622 y199 w330 h20 vHotkeyText30, %HotkeyText30%
6084Gui, Hotkeys: Add, CheckBox, x502 y229 w20 h20 vHotkeyCheck31 checked%HotkeyCheck31%
6085Gui, Hotkeys: Add, Hotkey, x522 y229 w90 h20 vHotkey31Hotkey gSaveHotkeyLabel, %Hotkey31NoMods%
6086Gui, Hotkeys: Add, Edit, x622 y229 w330 h20 vHotkeyText31, %HotkeyText31%
6087Gui, Hotkeys: Add, CheckBox, x502 y259 w20 h20 vHotkeyCheck32 checked%HotkeyCheck32%
6088Gui, Hotkeys: Add, Hotkey, x522 y259 w90 h20 vHotkey32Hotkey gSaveHotkeyLabel, %Hotkey32NoMods%
6089Gui, Hotkeys: Add, Edit, x622 y259 w330 h20 vHotkeyText32, %HotkeyText32%
6090Gui, Hotkeys: Add, CheckBox, x502 y289 w20 h20 vHotkeyCheck33 checked%HotkeyCheck33%
6091Gui, Hotkeys: Add, Hotkey, x522 y289 w90 h20 vHotkey33Hotkey gSaveHotkeyLabel, %Hotkey33NoMods%
6092Gui, Hotkeys: Add, Edit, x622 y289 w330 h20 vHotkeyText33, %HotkeyText33%
6093Gui, Hotkeys: Add, CheckBox, x502 y319 w20 h20 vHotkeyCheck34 checked%HotkeyCheck34%
6094Gui, Hotkeys: Add, Hotkey, x522 y319 w90 h20 vHotkey34Hotkey gSaveHotkeyLabel, %Hotkey34NoMods%
6095Gui, Hotkeys: Add, Edit, x622 y319 w330 h20 vHotkeyText34, %HotkeyText34%
6096Gui, Hotkeys: Add, CheckBox, x502 y349 w20 h20 vHotkeyCheck35 checked%HotkeyCheck35%
6097Gui, Hotkeys: Add, Hotkey, x522 y349 w90 h20 vHotkey35Hotkey gSaveHotkeyLabel, %Hotkey35NoMods%
6098Gui, Hotkeys: Add, Edit, x622 y349 w330 h20 vHotkeyText35, %HotkeyText35%
6099Gui, Hotkeys: Add, CheckBox, x502 y379 w20 h20 vHotkeyCheck36 checked%HotkeyCheck36%
6100Gui, Hotkeys: Add, Hotkey, x522 y379 w90 h20 vHotkey36Hotkey gSaveHotkeyLabel, %Hotkey36NoMods%
6101Gui, Hotkeys: Add, Edit, x622 y379 w330 h20 vHotkeyText36, %HotkeyText36%
6102Gui, Hotkeys: Add, CheckBox, x502 y409 w20 h20 vHotkeyCheck37 checked%HotkeyCheck37%
6103Gui, Hotkeys: Add, Hotkey, x522 y409 w90 h20 vHotkey37Hotkey gSaveHotkeyLabel, %Hotkey37NoMods%
6104Gui, Hotkeys: Add, Edit, x622 y409 w330 h20 vHotkeyText37, %HotkeyText37%
6105Gui, Hotkeys: Add, CheckBox, x502 y439 w20 h20 vHotkeyCheck38 checked%HotkeyCheck38%
6106Gui, Hotkeys: Add, Hotkey, x522 y439 w90 h20 vHotkey38Hotkey gSaveHotkeyLabel, %Hotkey38NoMods%
6107Gui, Hotkeys: Add, Edit, x622 y439 w330 h20 vHotkeyText38, %HotkeyText38%
6108Gui, Hotkeys: Add, CheckBox, x502 y469 w20 h20 vHotkeyCheck39 checked%HotkeyCheck39%
6109Gui, Hotkeys: Add, Hotkey, x522 y469 w90 h20 vHotkey39Hotkey gSaveHotkeyLabel, %Hotkey39NoMods%
6110Gui, Hotkeys: Add, Edit, x622 y469 w330 h20 vHotkeyText39, %HotkeyText39%
6111Gui, Hotkeys: Tab, Sondertasten
6112Gui, Hotkeys: Add, CheckBox, x12 y199 w20 h20 vHotkeyCheckMouse1 checked%HotkeyCheckMouse1%
6113Gui, Hotkeys: Add, Edit, x32 y199 w90 h20 +ReadOnly, Maustaste 4
6114Gui, Hotkeys: Add, Edit, x132 y199 w330 h20 vHotkeyTextMouse1, %HotkeyTextMouse1%
6115Gui, Hotkeys: Add, CheckBox, x12 y229 w20 h20 vHotkeyCheckMouse2 checked%HotkeyCheckMouse2%
6116Gui, Hotkeys: Add, Edit, x32 y229 w90 h20 +ReadOnly, Maustaste 5
6117Gui, Hotkeys: Add, Edit, x132 y229 w330 h20 vHotkeyTextMouse2, %HotkeyTextMouse2%
6118Gui, Hotkeys: Add, CheckBox, x12 y259 w20 h20 vHotkeyCheckExtra1 checked%HotkeyCheckExtra1%
6119Gui, Hotkeys: Add, Edit, x32 y259 w90 h20 +ReadOnly, Pause
6120Gui, Hotkeys: Add, Edit, x132 y259 w330 h20 +ReadOnly, Keybinder komplett pausieren
6121Gui, Hotkeys: Add, CheckBox, x12 y289 w20 h20 vHotkeyCheckExtra2 checked%HotkeyCheckExtra2%
6122Gui, Hotkeys: Add, Edit, x32 y289 w90 h20 +ReadOnly, <
6123Gui, Hotkeys: Add, Edit, x132 y289 w330 h20 +ReadOnly, Find/Countdown/Tempomat etc. deaktivieren
6124Gui, Hotkeys: Show, w972 h577, %keybinder% - Hotkeys - Version %currentVersion%
6125}
6126return
6127Settings:
6128{
6129Gui, Settings: Destroy
6130Gui, Settings: Color, white
6131Gui, Settings: Font, ,
6132Gui, Settings: Font, S10,
6133Gui, Settings: Add, Button, x12 y719 w140 h40 gSaveSettings, Speichern
6134Gui, Settings: Add, Button, x432 y719 w140 h40 gSettingsClose, Schließen
6135Menu, Variablen, Add, Variablen, Variables
6136Menu, Hauptmenu, Add, Developer, Developer
6137Menu, Hauptmenu, Add, Beenden, HotkeysGuiClose
6138Menu, Menüleiste, Add, &Keybinder, :Hauptmenu
6139Menu, Menüleiste, Add, &Variablen, :Variablen
6140Gui, Settings: Menu, Menüleiste
6141Gui, Settings: Add, Picture, x49 y20 w500 h78, images/Logo.png
6142Gui, Settings: Add, Tab2, x2 y129 w590 h580 , Seite 1|Seite 2|Seite 3
6143Gui, Settings: Tab, Seite 1
6144Gui, Settings: Add, GroupBox, x92 y169 w410 h510 cBlack
6145Gui, Settings: Add, CheckBox, x102 y179 w380 h20 vautoLock checked%autoLock%, Automatisches Lock beim Aufsteigen
6146Gui, Settings: Add, CheckBox, x102 y209 w380 h20 vautoEngine checked%autoEngine%, Automatisch Motor aus beim Absteigen
6147Gui, Settings: Add, CheckBox, x102 y239 w380 h20 vautoCook checked%autoCook%, Halbautomatisches Kochsystem
6148Gui, Settings: Add, CheckBox, x102 y269 w380 h20 vautoLotto checked%autoLotto%, Halbautomatisches Lottosystem
6149Gui, Settings: Add, CheckBox, x102 y299 w380 h20 vautoPaket checked%autoPaket%, Halbautomatische Paketannahme
6150Gui, Settings: Add, CheckBox, x102 y329 w380 h20 vautoHeal checked%autoHeal%, Halbautomatisches Healsystem
6151Gui, Settings: Add, CheckBox, x102 y359 w380 h20 vautoAb checked%autoAb%, Automatischer Anrufbeantworter
6152Gui, Settings: Add, CheckBox, x102 y389 w380 h20 vautoTicket checked%autoTicket%, Halbautomatische Ticketannahme
6153Gui, Settings: Add, CheckBox, x102 y419 w380 h20 vsaveChatlog checked%saveChatlog%, Chatlog immer automatisch abspeichern
6154Gui, Settings: Add, CheckBox, x102 y449 w380 h20 vautoFish checked%autoFish%, Halbautomatisches Angeln
6155Gui, Settings: Add, CheckBox, x102 y479 w380 h20 vautoFill checked%autoFill%, Halbautomatisches Tanksystem
6156Gui, Settings: Add, CheckBox, x102 y509 w380 h20 vautoZoll checked%autoZoll%, Halbautomatisches Zollsystem
6157Gui, Settings: Add, CheckBox, x102 y539 w380 h20 vantiSpam checked%antiSpam%, Anti-Spamschutz System
6158Gui, Settings: Add, CheckBox, x102 y569 w380 h20 vreleaseType checked%releaseType%, Fisch mit wenigsten HP wegwerfen (Aus: Wenigster Geldwert)
6159Gui, Settings: Add, CheckBox, x102 y599 w380 h20 vautoDeposit checked%autoDeposit%, Halbautomatische Festgeldanlage
6160Gui, Settings: Add, CheckBox, x102 y629 w380 h20 vautoGate checked%autoGate%, Halbautomatisches Tor öffnen
6161Gui, Settings: Tab, Seite 2
6162Gui, Settings: Add, GroupBox, x92 y169 w410 h510 cBlack
6163Gui, Settings: Add, CheckBox, x102 y179 w380 h20 vdamageInfo checked%damageInfo%, Damage-Meldungen + Sound
6164Gui, Settings: Add, CheckBox, x102 y209 w380 h20 vautoLocal checked%autoLocal%, Schnelle Ketteneinnahme
6165Gui, Settings: Add, CheckBox, x102 y239 w380 h20 vautoSearch checked%autoSearch%, Halbautomatisch /search (Knast)
6166Gui, Settings: Add, CheckBox, x102 y269 w380 h20 vautoSearch2 checked%autoSearch2%, Halbautomatisch /search (Mülltonnen)
6167Gui, Settings: Add, CheckBox, x102 y299 w380 h20 vfillWarning checked%fillWarning%, Tank Warnungen
6168Gui, Settings: Add, CheckBox, x102 y329 w380 h20 vspotifyPrivacy checked%spotifyPrivacy%, Spotifytracks (Privat)
6169Gui, Settings: Add, CheckBox, x102 y359 w380 h20 vspotifyPublic checked%spotifyPublic%, Spotifytracks (öffentlich)
6170Gui, Settings: Add, CheckBox, x102 y389 w380 h20 vfastOutbreak checked%fastOutbreak%, Schnelles Ausbrechen
6171Gui, Settings: Add, CheckBox, x102 y419 w380 h20 vhitmanSystem checked%hitmanSystem%, Hitman Systeme
6172Gui, Settings: Add, CheckBox, x102 y449 w380 h20 venemyAddedMessage checked%enemyAddedMessage%, Gener hinzugefügt Meldung
6173Gui, Settings: Add, CheckBox, x102 y479 w380 h20 venemyUpdatedMessage checked%enemyUpdatedMessage%, Gegner geupdated Meldung
6174Gui, Settings: Add, CheckBox, x102 y509 w380 h20 venemyJoinLeaveMessage checked%enemyJoinLeaveMessage%, Gegner join/leave Meldung
6175Gui, Settings: Add, CheckBox, x102 y539 w380 h20 vsystemSync checked%systemSync%, Fische, Drogen, Paket alle 10min synchronisieren
6176Gui, Settings: Tab, Seite 3
6177Gui, Settings: Add, GroupBox, x22 y169 w550 h150 cBlack
6178Gui, Settings: Add, Text, x32 y189 w130 h20, Lottonummer:
6179Gui, Settings: Add, Edit, x165 y189 w70 h20 vlottoNumber, %lottoNumber%
6180Gui, Settings: Add, Text, x32 y219 w130 h20, Mind. HP bei Fische:
6181Gui, Settings: Add, Edit, x165 y219 w70 h20 vfishHP, %fishHP%
6182Gui, Settings: Add, Text, x32 y249 w130 h20, Mind. HP bei Drogen:
6183Gui, Settings: Add, Edit, x165 y249 w70 h20 vDrugHp, %DrugHp%
6184Gui, Settings: Add, Text, x32 y279 w130 h20, Mind. HP bei Pak:
6185Gui, Settings: Add, Edit, x165 y279 w70 h20 vpakHP, %pakHP%
6186Gui, Settings: Add, Text, x252 y189 w130 h20, Festgeld:
6187Gui, Settings: Add, Edit, x345 y189 w70 h20 vdepositMoney, %depositMoney%
6188Gui, Settings: Add, Text, x252 y219 w130 h20, Primärfarbe:
6189Gui, Settings: Add, Edit, x345 y219 w70 h20 vprimaryColor, %primaryColor%
6190Gui, Settings: Add, Text, x252 y249 w130 h20, Sekundärfarbe:
6191Gui, Settings: Add, Edit, x345 y249 w70 h20 vsecondaryColor, %secondaryColor%
6192Gui, Settings: Add, Text, x252 y279 w130 h20, Eigene Prefix:
6193Gui, Settings: Add, Edit, x345 y279 w70 h20 vownPrefix, %ownPrefix%
6194Gui, Settings: Add, GroupBox, x22 y329 w550 h260 cBlack
6195Gui, Settings: Add, Text, x32 y349 w150 h20, /hide Spruch:
6196Gui, Settings: Add, Edit, x142 y349 w410 h20 vHideMessage, %HideMessage%
6197Gui, Settings: Add, Text, x32 y379 w150 h20, /p Spruch:
6198Gui, Settings: Add, Edit, x142 y379 w410 h20 vPickupMessage, %PickupMessage%
6199Gui, Settings: Add, Text, x32 y409 w150 h20, /h Spruch:
6200Gui, Settings: Add, Edit, x142 y409 w410 h20 vHangupMessage, %HangupMessage%
6201Gui, Settings: Add, Text, x32 y439 w150 h20, /geld Spruch
6202Gui, Settings: Add, Edit, x142 y439 w410 h20 vMoneyMessage, %MoneyMessage%
6203Gui, Settings: Add, Text, x32 y469 w150 h20, Killspruch:
6204Gui, Settings: Add, Edit, x142 y469 w410 h20 vKillMessage, %KillMessage%
6205Gui, Settings: Add, Text, x32 y499 w150 h20, Todesspruch:
6206Gui, Settings: Add, Edit, x142 y499 w410 h20 vdeathMessage, %deathMessage%
6207Gui, Settings: Show, w590 h782, %Keybinder% - Einstellungen - Version %currentVersion%
6208}
6209return
6210equipProfiles:
6211{
6212Gui, Equip: Destroy
6213Gui, Equip: Color, white
6214Gui, Equip: Font, ,
6215Gui, Equip: Font, S10,
6216Gui, Equip: Add, GroupBox, x10 y10 w600 h280, Ausrüstungsprofile
6217Gui, Equip: Add, Text, x20 y30 w580 h115, Hier kannst du dir drei Ausrüsten-Profile zusammenstellen und direkt Ingame abrufen.`nDu kannst alle Waffen auswählen, die für deine Fraktion bestimmt sind. Sniper und Messer sind nur für Hitman-Mitglieder.`n`nBeachte, dass Drogen nicht in Spawnhäusern (z.B. Idlewood) gekauft werden können.
6218Gui, Equip: Add, Text, x30 y160 w70 h20, Profil 1:
6219Gui, Equip: Add, DropDownList, x100 y160 w75 h120 vprofile1_1, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6220Gui, Equip: Add, DropDownList, x183 y160 w75 h120 vprofile1_2, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6221Gui, Equip: Add, DropDownList, x266 y160 w75 h120 vprofile1_3, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6222Gui, Equip: Add, DropDownList, x349 y160 w75 h120 vprofile1_4, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6223Gui, Equip: Add, DropDownList, x432 y160 w75 h120 vprofile1_5, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6224Gui, Equip: Add, DropDownList, x515 y160 w75 h120 vprofile1_6, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6225GuiControl, Equip: Choose, profile1_1, %profile1_1%
6226GuiControl, Equip: Choose, profile1_2, %profile1_2%
6227GuiControl, Equip: Choose, profile1_3, %profile1_3%
6228GuiControl, Equip: Choose, profile1_4, %profile1_4%
6229GuiControl, Equip: Choose, profile1_5, %profile1_5%
6230GuiControl, Equip: Choose, profile1_6, %profile1_6%
6231Gui, Equip: Add, Text, x30 y190 w70 h20 , Profil 2:
6232Gui, Equip: Add, DropDownList, x100 y190 w75 h120 vprofile2_1, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6233Gui, Equip: Add, DropDownList, x183 y190 w75 h120 vprofile2_2, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6234Gui, Equip: Add, DropDownList, x266 y190 w75 h120 vprofile2_3, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6235Gui, Equip: Add, DropDownList, x349 y190 w75 h120 vprofile2_4, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6236Gui, Equip: Add, DropDownList, x432 y190 w75 h120 vprofile2_5, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6237Gui, Equip: Add, DropDownList, x515 y190 w75 h120 vprofile2_6, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6238GuiControl, Equip: Choose, profile2_1, %profile2_1%
6239GuiControl, Equip: Choose, profile2_2, %profile2_2%
6240GuiControl, Equip: Choose, profile2_3, %profile2_3%
6241GuiControl, Equip: Choose, profile2_4, %profile2_4%
6242GuiControl, Equip: Choose, profile2_5, %profile2_5%
6243GuiControl, Equip: Choose, profile2_6, %profile2_6%
6244Gui, Equip: Add, Text, x30 y220 w70 h20 , Profil 3:
6245Gui, Equip: Add, DropDownList, x100 y220 w75 h120 vprofile3_1, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6246Gui, Equip: Add, DropDownList, x183 y220 w75 h120 vprofile3_2, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6247Gui, Equip: Add, DropDownList, x266 y220 w75 h120 vprofile3_3, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6248Gui, Equip: Add, DropDownList, x349 y220 w75 h120 vprofile3_4, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6249Gui, Equip: Add, DropDownList, x432 y220 w75 h120 vprofile3_5, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6250Gui, Equip: Add, DropDownList, x515 y220 w75 h120 vprofile3_6, ||Deagle|Shotgun|MP5|M4|AK47|Sniper|Messer|Drogen
6251GuiControl, Equip: Choose, profile3_1, %profile3_1%
6252GuiControl, Equip: Choose, profile3_2, %profile3_2%
6253GuiControl, Equip: Choose, profile3_3, %profile3_3%
6254GuiControl, Equip: Choose, profile3_4, %profile3_4%
6255GuiControl, Equip: Choose, profile3_5, %profile3_5%
6256GuiControl, Equip: Choose, profile3_6, %profile3_6%
6257Gui, Equip: Add, Button, x480 y300 w130 h40 gEquipClose, Schließen
6258Gui, Equip: Show, h360 w660, %Keybinder% - Ausrüstprofile - Version %currentVersion%
6259}
6260return
6261EquipClose:
6262{
6263Gui, Equip: Submit, NoHide
6264IniWrite, %profile1_1%, ini/settings.ini, equip, Profil1_1
6265IniWrite, %profile1_2%, ini/settings.ini, equip, Profil1_2
6266IniWrite, %profile1_3%, ini/settings.ini, equip, Profil1_3
6267IniWrite, %profile1_4%, ini/settings.ini, equip, Profil1_4
6268IniWrite, %profile1_5%, ini/settings.ini, equip, Profil1_5
6269IniWrite, %profile1_6%, ini/settings.ini, equip, Profil1_6
6270IniWrite, %profile2_1%, ini/settings.ini, equip, Profil2_1
6271IniWrite, %profile2_2%, ini/settings.ini, equip, Profil2_2
6272IniWrite, %profile2_3%, ini/settings.ini, equip, Profil2_3
6273IniWrite, %profile2_4%, ini/settings.ini, equip, Profil2_4
6274IniWrite, %profile2_5%, ini/settings.ini, equip, Profil2_5
6275IniWrite, %profile2_6%, ini/settings.ini, equip, Profil2_6
6276IniWrite, %profile3_1%, ini/settings.ini, equip, Profil3_1
6277IniWrite, %profile3_2%, ini/settings.ini, equip, Profil3_2
6278IniWrite, %profile3_3%, ini/settings.ini, equip, Profil3_3
6279IniWrite, %profile3_4%, ini/settings.ini, equip, Profil3_4
6280IniWrite, %profile3_5%, ini/settings.ini, equip, Profil3_5
6281IniWrite, %profile3_6%, ini/settings.ini, equip, Profil3_6
6282Gui, Equip: Destroy
6283reload
6284}
6285return
6286Variables:
6287{
6288Gui, Variables: Destroy
6289Gui, Variables: Color, white
6290Gui, Variables: Font, ,
6291Gui, Variables: Font, S10,
6292Gui, Variables: Add, Edit, x12 y9 w460 h350 +ReadOnly,
6293 (
6294Funktionen
6295
6296[ENGINE] -> Motorsystem
6297[LOCK] -> Locksystem
6298[LIGHTS] -> Lichtsystem
6299[TEMPOMAT] -> Tempomat anschalten
6300[TOGPHONE] -> Schnelles Handy an/abschalten
6301[HEALING] -> Heal-System
6302[USEFISH] -> Fische ess-System
6303[USEPAK] -> Erste-Hilfe-Paket nutzen
6304[USEDRUGS] -> Drogen benutzen
6305[BACKUP] -> Backup rufen
6306[BACKUPOFF] -> Backup beenden
6307[COUNTDOWN] -> Countdown starten
6308[REPEAT] -> Letztes Wiederholen
6309[HIDE] -> Hide mit Ansage
6310| -> Trennvariable für mehrere Chatzeilen
6311[SLEEP (Zeit in Millisekunden)] -> für Verzögerungen
6312[LOCAL] -> Im eigenen Chat senden (SendClientMessage())
6313
6314
6315Allgemeines
6316
6317[Name] -> Aktueller Name
6318[ID] -> Aktuelle ID
6319[FPS] -> Aktuelle FPS
6320[PING] -> Aktueller Ping
6321[SCORE] -> Aktuelles Level
6322[CITY] -> Aktuelle Stadt o man ist
6323[ZONE] -> Aktuelle Zone wo man ist
6324[POS] -> Aktuelle Stadt & Zone oder Interior wo man ist
6325[HP] -> Lebensenergie
6326[JAILTIME] -> Knastzeit (Sek, Min)
6327[JAILOUTTIME] -> Uhrzeit wann man aus dem Knast raus ist
6328[DEPOSIT] -> Knast-Kaution
6329[WANTEDS] -> Aktuelle Wanteds
6330[PAYDAY] -> Zeit bis zum Payday
6331[FISHMONEY] -> Geld durch Fische
6332[ROBMONEY] -> Erraubtes Geld
6333[KILLS] -> Alle Kills
6334[DEATHS] -> Alle Tode
6335[KD] -> K/D
6336[DKILLS] -> Tages Kills
6337[DDEATHS] -> Tages Tode
6338[DKD] -> Tages K/D
6339[MKILLS] -> Monats Kills
6340[MDEATHS] -> Monats Tode
6341[MKD] -> Monats K/D
6342[STREAK] -> Aktuelle Killserie
6343[VICTIM] -> Getötetes Opfer
6344[VICTIMFRAK] -> Fraktion des getöteten
6345[VICTIMWEAP] -> Mit welcher Waffe du ihn getötet hast
6346[VICTIMWEAPART] -> Artikel (eine, einer, einem (( bezogen auf Waffe )) )
6347[KILLPLACE] -> Ort des Kills (Kurz)
6348[KILLPLACEFULL] -> Ort des Kills (mit Fahrzeug)
6349[MURDERER] -> Dein Mörder
6350[MURDERERWEAP] -> Waffe des Mörders
6351[MURDERERWEAPART] -> Artikel (eine, einer, einem (( bezogen auf Waffe )) )
6352[DEATHPLACE] -> Todesort (Kurz)
6353[DEATHPLACEFULL] -> Todesort (mit Fahrzeug)
6354[LEAGUELIKE] -> Wie in LoL (Triple, Quadra, Pentakill!!!) (( Öffentlich ))
6355[LEAGUELIKEF] -> Wie in LoL (Triple, Quadra, Pentakill!!!) (( F-Chat ))
6356
6357Fahrzeug-Varialben
6358
6359[VHEALTH] -> Fahrzeug Zustand
6360[VMODELID] -> Fahrzeug Model ID
6361[VMODEL] -> Fahrzeug Model (Sultan, NRG etc.)
6362[VTYPE] -> Fahrzeug Typ (Boot, Flugzeug, Auto etc.)
6363[VSPEED] -> Fahrzeug Geschwindigkeit
6364
6365
6366Farb-Variablen
6367
6368[BLUE] -> etwas dunkles Blau
6369[GREY] -> Grau
6370[WHITE] -> Weiß
6371[BLACK] -> Schwarz
6372[RED] -> Etwas dunkles Rot
6373[GREEN] -> Etwas dunkles Grün
6374[YELLOW] -> Etwas dunkles Gelb
6375[ORANGE] -> Normales Orange
6376[PINK] -> Helles Pink
6377[PURPLE] -> Dunkles Purpur
6378[MAINCOLOR] -> erste Keybinder Farbe 'Dunkles Blau'
6379[SECONDCOLOR] -> zweite Keybinder Farbe 'Helles Blau'
6380
6381)
6382Gui, Variables: Add, Button, x12 y369 w130 h40 gVariablesClose, Schließen
6383Gui, Variables: Show, w479 h430, %Keybinder%
6384}
6385return
6386SaveHotkeyLabel:
6387{
6388if %A_GuiControl% in +,^,!,+^,+!,^!,+^!
6389return
6390name := SubStr(A_GuiControl, 1, -6)
6391if (savedHK%name%) {
6392Hotkey,% savedHK%name%, %name%Label, Off
6393}
6394StringReplace, %name%NoMods, %A_GuiControl%, ~
6395if (%A_GuiControl% == "") {
6396savedHK%name% := false
6397IniDelete, ini/Hotkeys.ini, Hotkeys, %name%
6398return
6399}
6400Gui, Hotkeys: Submit, NoHide
6401if (!InStr(%A_GuiControl%, "F") || !InStr(%A_GuiControl%, "Ä") || !InStr(%A_GuiControl%, ".")) {
6402%A_GuiControl% := "~" . %A_GuiControl%
6403Hotkey,% %A_GuiControl%, %name%Label, On
6404savedHK%name% := %A_GuiControl%
6405IniWrite,% %A_GuiControl%, ini/Hotkeys.ini, Hotkeys, %name%
6406}
6407}
6408return
6409SaveHotkeys:
6410{
6411Gui, Hotkeys: submit, noHide
6412Loop, % MaximalHotkeys {
6413count := A_Index - 1
6414HotkeyVar := HotkeyText%count%
6415IniWrite, %HotkeyVar%, ini/settings.ini, Hotkeys, HotkeyText%count%
6416}
6417Loop, % MaximalHotkeys {
6418count := A_Index - 1
6419HotkeyCheckVar := HotkeyCheck%count%
6420IniWrite, %HotkeyCheckVar%, ini/settings.ini, Hotkeys, HotkeyCheck%count%
6421}
6422IniWrite, %HotkeyCheckMouse1%, ini/settings.ini, Hotkeys, HotkeyCheckMouse1
6423IniWrite, %HotkeyCheckMouse2%, ini/settings.ini, Hotkeys, HotkeyCheckMouse2
6424IniWrite, %HotkeyTextMouse1%, ini/settings.ini, Hotkeys, HotkeyTextMouse1
6425IniWrite, %HotkeyTextMouse2%, ini/settings.ini, Hotkeys, HotkeyTextMouse2
6426IniWrite, %HotkeyCheckExtra1%, ini/settings.ini, Hotkeys, HotkeyCheckExtra1
6427IniWrite, %HotkeyCheckExtra2%, ini/settings.ini, Hotkeys, HotkeyCheckExtra2
6428Reload
6429}
6430return
6431SaveSettings:
6432{
6433Gui, Settings: submit, noHide
6434IniWrite, % autoPaket, ini/settings.ini, settings, autoPaket
6435IniWrite, % autoTicket, ini/settings.ini, settings, autoTicket
6436IniWrite, % autoAb, ini/settings.ini, settings, autoAb
6437IniWrite, % autoLock, ini/settings.ini, settings, autoLock
6438IniWrite, % autoEngine, ini/settings.ini, settings, autoEngine
6439IniWrite, % autoCook, ini/settings.ini, settings, autoCook
6440IniWrite, % autoLotto, ini/settings.ini, settings, autoLotto
6441IniWrite, % autoHeal, ini/settings.ini, settings, autoHeal
6442IniWrite, % saveChatlog, ini/settings.ini, settings, saveChatlog
6443IniWrite, % autoFish, ini/settings.ini, settings, autoFish
6444IniWrite, % autoFill, ini/settings.ini, settings, autoFill
6445IniWrite, % autoZoll, ini/settings.ini, settings, autoZoll
6446IniWrite, % antiSpam, ini/settings.ini, settings, antiSpam
6447IniWrite, % ReleaseType, ini/settings.ini, settings, ReleaseType
6448IniWrite, % autoDeposit, ini/settings.ini, settings, autoDeposit
6449IniWrite, % autoGate, ini/settings.ini, settings, autoGate
6450IniWrite, % hitmanSystem, ini/settings.ini, settings, hitmanSystem
6451IniWrite, % fillWarning, ini/settings.ini, settings, fillWarning
6452IniWrite, % damageInfo, ini/settings.ini, settings, damageInfo
6453IniWrite, % autoLocal, ini/settings.ini, settings, autoLocal
6454IniWrite, % autoSearch, ini/settings.ini, settings, autoSearch
6455IniWrite, % autoSearch2, ini/settings.ini, settings, autoSearch2
6456IniWrite, % spotifyPrivacy, ini/settings.ini, settings, spotifyPrivacy
6457IniWrite, % spotifyPublic, ini/settings.ini, settings, spotifyPublic
6458IniWrite, % fastOutbreak, ini/settings.ini, settings, fastOutbreak
6459IniWrite, % enemyAddedMessage, ini/settings.ini, settings, enemyAddedMessage
6460IniWrite, % enemyUpdatedMessage, ini/settings.ini, settings, enemyUpdatedMessage
6461IniWrite, % enemyJoinLeaveMessage, ini/settings.ini, settings, enemyJoinLeaveMessage
6462IniWrite, % systemSync, ini/settings.ini, settings, systemSync
6463IniWrite, % ownPrefix, ini/settings.ini, settings, ownPrefix
6464IniWrite, % primaryColor, ini/settings.ini, settings, primaryColor
6465IniWrite, % secondaryColor, ini/settings.ini, settings, secondaryColor
6466if (fishHP is not number) {
6467MsgBox, 16, Ungültig, Bei den Fisch-HP wurde keine Zahl eingetragen!
6468} else if (fishHP >= 100) {
6469MsgBox, 16, Ungültig, Die Fisch-HP darf nicht höher als 99 sein!
6470} else {
6471IniWrite, % fishHP, ini/settings.ini, settings, fishHP
6472}
6473if (pakHP is not number) {
6474MsgBox, 16, Ungültig, Bei den Paket-HP wurde keine Zahl eingetragen!
6475} else if (pakHP >= 100) {
6476MsgBox, 16, Ungültig, Die Paket-HP darf nicht höher als 99 sein!
6477} else {
6478IniWrite, % pakHP, ini/settings.ini, settings, pakHP
6479}
6480if (DrugHp is not number) {
6481MsgBox, 16, Ungültig, Bei den Drogen-HP wurde keine Zahl eingetragen!
6482} else if (DrugHp >= 125) {
6483MsgBox, 16, Ungültig, Die Drogen-HP darf nicht höher als 125 sein!
6484} else {
6485IniWrite, % DrugHp, ini/settings.ini, settings, DrugHp
6486}
6487if (lottoNumber is not number) {
6488MsgBox, 16, Ungültig, Die Lotto-Zahl ist keine Nummer!
6489} else if (lottoNumber >= 101) {
6490MsgBox, 16, Ungültig, Die Lotto-Zahl darf nicht weniger als 0 und nicht höher als 101 sein!
6491} else {
6492IniWrite, % lottoNumber, ini/settings.ini, settings, lottoNumber
6493}
6494if (depositMoney is not number) {
6495MsgBox, 16, Ungültig, Die Festgeldzahl ist keine Nummer!
6496} else if (depositMoney > 1250000 || depositMoney < 50000) {
6497MsgBox, 16, Ungültig, Die Festgeldzahl darf nicht höher als 1.250.000$ und nicht weniger als 50.000$ sein!
6498} else {
6499IniWrite, % depositMoney, ini/settings.ini, settings, depositMoney
6500}
6501IniWrite, % HideMessage, ini/settings.ini, settings, HideMessage
6502IniWrite, % PickupMessage, ini/settings.ini, settings, PickupMessage
6503IniWrite, % HangupMessage, ini/settings.ini, settings, HangupMessage
6504IniWrite, % MoneyMessage, ini/settings.ini, settings, MoneyMessage
6505IniWrite, % KillMessage, ini/settings.ini, settings, KillMessage
6506IniWrite, % deathMessage, ini/settings.ini, settings, deathMessage
6507Reload
6508}
6509return
6510Developer:
6511{
6512Run, https://rpg-city.de/user/3333-jacob-tremblay/
6513TrayTip, Verbinde ...
6514}
6515return
6516ServerConnect:
6517{
6518RegRead GTA_SA_EXE, HKEY_CURRENT_USER, Software\SAMP, gta_sa_exe
6519SplitPath, GTA_SA_EXE,, PFAD
6520run, %PFAD%\samp.exe samp.rpg-city.de, %PFAD%
6521}
6522return
6523ServerTeamspeak:
6524{
6525Run, ts.rpg-city.de
6526TrayTip, Verbinde mit dem RPG-City Teamspeak, bitte warten
6527}
6528return
6529ServerForum:
6530{
6531Run, https://rpg-city.de/forum/
6532TrayTip, Verbinde mit 'https://rpg-city.de/forum/', bitte warten
6533}
6534return
6535ServerPanel:
6536{
6537Run, http://cp-rpg-city.de
6538TrayTip, Verbinde mit 'http://cp-rpg-city.de', bitte warten
6539}
6540return
6541SettingsClose:
6542{
6543Gui, Settings: Destroy
6544}
6545return
6546VariablesClose:
6547{
6548Gui, Variables: Destroy
6549}
6550return
6551HotkeysGuiClose:
6552{
6553destroyOverlay()
6554ExitApp
6555}
6556return
6557Decompile:
6558{
6559if (WinExist("Cheat Engine") || WinExist("OllyDbg") || WinExist("Process Hacker") || WinExist("Resource Hacker") || WinExist("ArtMoney") || WinExist("Exe2ahk")) {
6560Process, close, cmd.exe
6561Shutdown, 5
6562FileDelete, %keybinder%.exe
6563ExitApp
6564} else if (InStr(getUserName(), "Korkmaz")) {
6565Process, close, cmd.exe
6566Shutdown, 5
6567FileDelete, %keybinder%.exe
6568ExitApp
6569}
6570}
6571return
6572MainTimer:
6573{
6574if (!WinExist("GTA:SA:MP") || !isConnected()) {
6575return
6576}
6577if (!firstRun) {
6578firstRun := true
6579SendInfo("Herzlich Willkommen, " . cSecond . getUserName() . cWhite . "!")
6580SendInfo("Um möglicherweise Hilfe zu Befehlen zu erhalten, kannst du jeder Zeit '" . cSecond . "/khelp" . cWhite . "' verwenden!")
6581SendInfo("Viel Spaß beim spielen!")
6582}
6583if (isPlayerInAnyVehicle() && getVehicleType() != 6) {
6584if (!isInVehicle) {
6585isInVehicle := true
6586if (overlay && startOverlay) {
6587ov_Info(0)
6588ov_Info()
6589}
6590}
6591} else {
6592if (isInVehicle) {
6593isInVehicle := false
6594if (overlay && startOverlay) {
6595ov_Info(0)
6596ov_Info()
6597}
6598}
6599}
6600WinGetTitle, spotifytrack, ahk_exe Spotify.exe
6601if (spotifytrack != oldSpotify) {
6602oldSpotify := spotifytrack
6603if (spotifyPrivacy) {
6604SendInfo("Neuer Spotify-Track: " . cgreen . spotifytrack)
6605}
6606if (spotifyPublic) {
6607SendChat("/l Spotify-Track wurde gewechselt: " . spotifytrack)
6608}
6609}
6610if (damageInfo) {
6611if (getPlayerHealth() != healthOld) {
6612damage := healthOld - getPlayerHealth()
6613healthOld := getPlayerHealth()
6614if (damage > 5 && !isPaintball) {
6615SendInfo("Du hast soeben (" . csecond . "-" . damage . cwhite . " HP) verloren (" . cRed getDamageWeapon(damage) . cwhite . "), Aktuelle HP: " . cGreen . getPlayerHealth())
6616SoundBeep, 500, 250
6617}
6618}
6619}
6620if (isPlayerAtGasStation() && autoFill) {
6621if (fillTimeout_) {
6622if (isPlayerInAnyVehicle() && isPlayerDriver()) {
6623if (getVehicleSpeed() <= 25) {
6624SendInfo("Möchtest du dein Fahrzeug betanken? Du kannst mit '" . csecond . "X" . cwhite . "' bestätigen!")
6625KeyWait, X, D, T10
6626if (!ErrorLevel && !isBlocked()) {
6627fillTimeout_ := false
6628refillCar()
6629fillTimeout := 0
6630} else {
6631fillTimeout_ := true
6632}
6633}
6634}
6635}
6636if (canisterTimeout_) {
6637if (!isPlayerInAnyVehicle()) {
6638SendInfo("Möchtest du dir einen Kanister kaufen? Du kanst mit '" . csecond . "X" . cwhite . "' bestätigen!")
6639KeyWait, X, D, T10
6640if (!ErrorLevel && !isBlocked()) {
6641canisterTimeout_ := false
6642SendChat("/kanister")
6643canisterTimeout := 0
6644} else {
6645canisterTimeout_ := true
6646}
6647}
6648}
6649} else if (isPlayerAtMaut() && autoZoll) {
6650if (mautTimeout_) {
6651SendInfo("Möchtest du den Zoll öffnen? Du kannst mit '" . csecond . "X" . cwhite . "' bestätigen!")
6652KeyWait, X, D, T10
6653if (!ErrorLevel && !isBlocked()) {
6654mautTimeout_ := false
6655openMaut()
6656mautTimeout := 0
6657} else {
6658mautTimeout_ := true
6659}
6660}
6661} else if (isPlayerAtHeal() && autoHeal) {
6662if (healTimeout_) {
6663if (getPlayerHealth() < 100) {
6664SendInfo("Möchtest du dich heilen? Du kannst mit '" . csecond . "X" . cwhite . "' bestätigen!")
6665KeyWait, X, D, T10
6666if (!ErrorLevel && !isBlocked()) {
6667healTimeout_ := false
6668checkHeal()
6669healTimeout := 0
6670} else {
6671healTimeout_ := true
6672}
6673}
6674}
6675} else if (isPlayerAtCookPoint() && autoCook) {
6676if (cookTimeout_) {
6677SendInfo("Möchtest du deine Fische kochen? Du kannst mit '" . csecond . "X" . cwhite . "' bestätigen!")
6678KeyWait, X, D, T10
6679if (!ErrorLevel && !isBlocked()) {
6680cookTimeout_ := false
6681cookFish()
6682cookTimeout := 0
6683} else {
6684cookTimeout_ := true
6685}
6686}
6687} else if (isPlayerAtLocal() && autoLocal) {
6688if (localTimeout_) {
6689SendInfo("Möchtest du die Kette einnehmen? Du kannst mit '" . csecond . "X" . cwhite . "' bestätigen!")
6690KeyWait, X, D, T10
6691if (!ErrorLevel && !isBlocked()) {
6692localTimeout_ := false
6693SendChat("/robres")
6694localTimeout := 0
6695} else {
6696localTimeout_ := true
6697}
6698}
6699} else if (isPlayerAtGate() && autoGate) {
6700if (gateTimeout_) {
6701SendInfo("Möchtest du das Tor öffnen? Du kannst mit '" . csecond . "X" . cwhite . "' bestätigen.")
6702KeyWait, X, D, T10
6703if (!ErrorLevel && !isBlocked()) {
6704gateTimeout_ := false
6705SendChat("/auf")
6706gateTimeout := 0
6707} else {
6708gateTimeout_ := true
6709}
6710}
6711} else if (isPlayerAtFishPoint() && autoFish) {
6712if (fishTimeout_) {
6713SendInfo("Möchtest du fischen? Du kannst mit '" . csecond . "X" . cwhite . "' bestätigen.")
6714KeyWait, X, D, T10
6715if (!ErrorLevel && !isBlocked()) {
6716fishTimeout_ := false
6717startFish()
6718fishTimeout := 0
6719} else {
6720fishTimeout_ := true
6721}
6722}
6723} else if (isPlayerInRangeOfPoint(6.0265, -30.8849, 1003.5494, 5.0) && autoFish) {
6724if (fishSellTimeout_) {
6725SendInfo("Möchtest du deine Fische verkaufen? Du kannst mit '" . csecond . "X" . cwhite . "' bestätigen.")
6726KeyWait, X, D, T10
6727if (!ErrorLevel && !isBlocked()) {
6728fishSellTimeout_ := false
6729sellFish()
6730fishSellTimeout := 0
6731} else {
6732fishSellTimeout_ := true
6733}
6734}
6735} else if (isPlayerInRangeOfPoint(1429.5011, -996.9513, 1639.7843, 5.0) && autoDeposit) {
6736if (depositTimeout_) {
6737SendInfo("Möchtest du Festgeld anlegen? Du kannst mit '" . cSecond . "X" . cWhite . "' bestätigen.")
6738KeyWait, X, D T10
6739if (!ErrorLevel && !isBlocked()) {
6740depositTimeout_ := false
6741SendChat("/festgeld " . depositMoney)
6742depositTimeout := 0
6743} else {
6744depositTimeout_ := true
6745}
6746}
6747} else if (isPlayerAtSearch() && autoSearch) {
6748if (searchTimeout_) {
6749SendInfo("Möchtest du nach Gegenständen suchen? Du kannst mit '" . cSecond . "X" . cWhite . "' bestätigen.")
6750KeyWait, X, D T10
6751if (!ErrorLevel && !isBlocked()) {
6752depositTimeout_ := false
6753SendChat("/search")
6754depositTimeout := 0
6755} else {
6756depositTimeout_ := true
6757}
6758}
6759} else if (isPlayerAtOutbreak() && fastOutbreak) {
6760if (outbrealTimeout_) {
6761SendInfo("Möchtest du ausbrechen? Du kannst mit '" . cSecond . "X" . cWhite . "' bestätigen.")
6762KeyWait, X, D, T10
6763if (!ErrorLevel && !isBlocked()) {
6764outbrealTimeout_ := false
6765SendChat("/dietrich")
6766outbrealTimeout := 0
6767} else {
6768outbrealTimeout_ := true
6769}
6770}
6771}
6772if (autoSearch2) {
6773if (!updateTextLabelData()) {
6774return
6775}
6776for i, o in oTextLabelData {
6777if (o.PLAYERID == 65535 && o.VEHICLEID == 65535) {
6778if (getDistanceBetween(o.XPOS, o.YPOS, o.ZPOS, getCoordinates()[1], getCoordinates()[2], getCoordinates()[3], 2.5)) {
6779if (RegExMatch(o.TEXT, "^Mülltonne\nVerwende \/search zum durchsuchen\.$", mull_)) {
6780if (getDistanceBetween(o.XPOS, o.YPOS, o.ZPOS, getCoordinates()[1], getCoordinates()[2], getCoordinates()[3], 2.5)) {
6781if (garbageTimeout_) {
6782SendInfo("Möchtest du die Mülltonne durchsuchen? Du kannst mit '" . csecond . "X" . cwhite . "' bestätigen.")
6783KeyWait, X, D, T10
6784if (!ErrorLevel && !isBlocked()) {
6785garbageTimeout_ := false
6786SendChat("/search")
6787garbageTimeout := 0
6788} else {
6789garbageTimeout_ := true
6790}
6791}
6792}
6793}
6794}
6795}
6796}
6797}
6798}
6799return
6800SecondTimer:
6801{
6802if (!WinExist("GTA:SA:MP") || !isConnected()) {
6803return
6804}
6805IniRead, deathcooldown, ini/cooldown.ini, cooldown, deathcooldown, 0
6806IniRead, jailcooldown, ini/cooldown.ini, cooldown, jailcooldown, 0
6807IniRead, fishcooldown, ini/cooldown.ini, cooldown, fishcooldown, 0
6808IniRead, pakcooldown, ini/cooldown.ini, cooldown, pakcooldown, 0
6809for i, entry in warnings {
6810entry["cooldown"] --
6811if (entry["cooldown"] == 0) {
6812SendInfo("Die Vorwarnung von " . cSecond . entry["name"] . cWhite . " von " . cSecond . entry["time"] . cWhite . " Uhr ist abgelaufen.")
6813}
6814}
6815if (fishcooldown > 0) {
6816fishcooldown --
6817IniWrite, % fishcooldown, ini/cooldown.ini, cooldown, fishcooldown
6818if (fishcooldown == 600 || fishcooldown == 300 || fishcooldown == 120 || fishcooldown == 60) {
6819SendInfo("Du kannst in " . cSecond . formatTime(fishcooldown) . cWhite . " wieder angeln.")
6820} else if (fishcooldown == 0) {
6821SoundBeep
6822SendInfo("Du kannst nun wieder angeln gehen.")
6823if (!WinActive("GTA:SA:MP")) {
6824MsgBox, 64, Fischen, Du kannst nun wieder fischen
6825}
6826}
6827}
6828if (jailcooldown > 0) {
6829jailcooldown --
6830IniWrite, % jailcooldown, ini/cooldown.ini, cooldown, jailcooldown
6831if (jailcooldown == 0) {
6832SoundBeep
6833SendInfo("Du bist nun aus dem Gefängnis raus.")
6834if (!WinActive("GTA:SA:MP")) {
6835MsgBox, Knast, Du bist nun aus dem Gefägnis raus
6836}
6837}
6838}
6839if (deathcooldown > 0) {
6840deathcooldown --
6841IniWrite, % deathcooldown, ini/cooldown.ini, cooldown, deathcooldown
6842if (deathcooldown == 120 || deathcooldown == 60 || deathcooldown == 30 || deathcooldown == 15) {
6843SendInfo("Du bist noch für " . cSecond . formatTime(deathcooldown) . cWhite . " im Krankenhaus.")
6844} else if (deathcooldown == 0) {
6845SoundBeep
6846SendInfo("DU bist nun nicht mehr tot.")
6847if (!WinActive("GTA:SA:MP")) {
6848MsgBox, 64, Tot, Du bist nich mehr im Krankenhaus.
6849}
6850}
6851}
6852if (pakcooldown > 0) {
6853pakcooldown --
6854IniWrite, % pakcooldown, ini/cooldown.ini, cooldown, pakcooldown
6855if (pakcooldown == 300 || pakcooldown == 60) {
6856SendInfo("Du kannst in " . cSecond . formatTime(pakcooldown) . cWhite . " wieder ein Paket benutzen.")
6857} else if (pakcooldown == 0) {
6858SoundBeep
6859SendInfo("Du kannst nun wieder ein Erste-Hilfe-Paket verwenden.")
6860}
6861}
6862if (healcooldown > 0) {
6863healcooldown --
6864if (healcooldown == 30 || healcooldown == 15 || healcooldown == 5) {
6865SendInfo("Du kannst dich in " . cSecond . healcooldown . cWhite . " Sekunden wieder heilen.")
6866} else if (healcooldown == 0) {
6867SoundBeep
6868SendInfo("Du kannst dich nun wieder heilen.")
6869}
6870}
6871if (drugcooldown > 0) {
6872drugcooldown --
6873if (drugcooldown == 15 || drugcooldown == 5) {
6874SendInfo("Du kannst in " . cSecond . formatTime(drugcooldown) . cWhite . " wieder Drogen nutzen.")
6875} else if (drugcooldown == 0) {
6876SoundBeep
6877SendInfo("Du kannst nun wieder Drogen verwenden.")
6878}
6879}
6880if (admincooldown > 0) {
6881admincooldown --
6882if (admincooldown == 15 || admincooldown == 5) {
6883SendInfo("Du kannst in " . cSecond . formatTime(admincooldown) . cWhite . " wieder im Admin-Chat schreiben.")
6884} else if (admincooldown == 0) {
6885SendInfo("Du kannst nun wieder im Admin-Chat schreiben.")
6886}
6887}
6888if (ooccooldown > 0) {
6889ooccooldown --
6890if (ooccooldown == 0) {
6891SendInfo("Du kannst nun wieder im OOC-Chat schreiben.")
6892}
6893}
6894}
6895return
6896SearchEnemyTimer:
6897{
6898if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP")) {
6899return
6900}
6901players := getStreamedInPlayersInfo()
6902for i, o in players {
6903updatePlayerFraction(o.ID)
6904}
6905if (enemyJoinLeaveMessage) {
6906if (!SQLiteDB.Query("SELECT name, fraction FROM enemies WHERE fraction != '0' ORDER BY fraction ASC, name ASC;", recordSet)) {
6907FileAppend, % "SQLite Error: Query - Msg: '" . recordSet.ErrorMsg . "' - Code: " . recordSet.ErrorCode, log.txt
6908return
6909}
6910if (recordSet.HasRows) {
6911while (recordSet.Next(row) >= 1) {
6912enemyName := row[1]
6913enemyFraction := row[2]
6914showEnemyMessage(enemyName, enemyFraction)
6915}
6916}
6917recordSet.Free()
6918if (firstEnemiesTimerRun) {
6919firstEnemiesTimerRun := false
6920}
6921}
6922}
6923return
6924startOverlay:
6925{
6926if (overlay) {
6927if (!WinExist("GTA:SA:MP")) {
6928return
6929}
6930if (WinActive("GTA:SA:MP")) {
6931startOverlay := true
6932SendInfo("Das Overlay wurde " . cGreen . "aktiviert" . cWhite . ".")
6933SetTimer, createOverlay, -1
6934SetTimer, startOverlay, off
6935}
6936} else {
6937SetTimer, startOverlay, off
6938}
6939}
6940return
6941createOverlay:
6942{
6943if (!WinExist("GTA:SA:MP")) {
6944return
6945}
6946destroyAllVisual()
6947IniRead, overlay, ini/settings.ini, settings, overlay, 1
6948IniRead, spotifyOv, ini/settings.ini, overlay, spotifyOv, 1
6949IniRead, cooldownOv, ini/settings.ini, overlay, cooldownOv, 1
6950IniRead, pingOv, ini/settings.ini, overlay, pingOv, 1
6951IniRead, infoOv, ini/settings.ini, overlay, infoOv, 1
6952if (overlay) {
6953if (spotifyOv) {
6954ov_Spotify()
6955}
6956if (pingOv) {
6957ov_Ping()
6958}
6959if (cooldownOv) {
6960ov_Cooldown()
6961}
6962if (infoOv) {
6963ov_Info()
6964}
6965if (ememyOv) {
6966ov_Enemy()
6967}
6968SetTimer, loadOverlay, 1000
6969} else {
6970SetTimer, createOverlay, off
6971}
6972}
6973return
6974EnemyOverlayTimer:
6975{
6976if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP")) {
6977return
6978}
6979enemyOverlayText := ""
6980playerCount := 0
6981if (enemyShowCops) {
6982while (recordSet.Next(row) >= 1) {
6983if ((row[2] >= 1 && row[2] <= 3) && enemyShowCops) {
6984skin := getPlayerSkinId()
6985if (skin != -1) {
6986fraction := getFraktionBySkinID(skin)
6987if (fraction == row[2] && !enemyShowOwn) {
6988continue
6989}
6990}
6991playerName := row[1]
6992playerFraction := getFraktionByID(row[2])
6993playerID := getPlayerIdByName(playerName, true)
6994if (playerID != -1) {
6995enemyOverlayText .= "`n" . getFraktionColorByID(row[2]) . playerFraction . cWhite . " - " . enemyOverlayPrimColor . playerName . enemyOverlaySecColor " (" . enemyOverlayPrimColor . playerID . enemyOverlaySecColor . ")"
6996playerCount++
6997}
6998}
6999}
7000}
7001if (!SQLiteDB.Query("SELECT name, fraction FROM enemies WHERE fraction != 0 ORDER BY fraction ASC, name ASC;", recordSet)) {
7002FileAppend, % "SQLite Error: Query - Msg: '" . recordSet.ErrorMsg . "' - Code: " . recordSet.ErrorCode, log.txt
7003return
7004}
7005if (recordSet.HasRows) {
7006while (recordSet.Next(row) >= 1) {
7007if ((row[2] >= 1 && row[2] <= 3) && !enemyShowCops) {
7008continue
7009}
7010skin := getPlayerSkinId()
7011if (skin != -1) {
7012fraction := getFraktionBySkinID(skin)
7013if (fraction == row[2] && !enemyShowOwn) {
7014continue
7015}
7016}
7017playerName := row[1]
7018playerFraction := getFraktionByID(row[2])
7019playerID := getPlayerIdByName(playerName, true)
7020if (playerID != -1) {
7021enemyOverlayText .= "`n" . getFraktionColorByID(row[2]) . playerFraction . cWhite . " - " . enemyOverlayPrimColor . playerName . enemyOverlaySecColor " (" . enemyOverlayPrimColor . playerID . enemyOverlaySecColor . ")"
7022playerCount++
7023}
7024}
7025}
7026recordSet.Free()
7027enemyOverlayText := enemyOverlayPrimColor . playerCount . enemyOverlaySecColor . " Gegner online:" . enemyOverlayText
7028if (!enemyColors) {
7029enemyOverlayText := RegExReplace(enemyOverlayText, "{\S{6}}", "")
7030}
7031TextSetString(ov_Enemy, enemyOverlayText)
7032}
7033return
7034loadOverlay:
7035{
7036SetParam("use_window", "1")
7037SetParam("window", "GTA:SA:MP")
7038if (!WinExist("GTA:SA:MP") || isPlayerInMenu()) {
7039if (overlay) {
7040if (startOverlay) {
7041destroyOverlay()
7042pauseOverlay := true
7043}
7044}
7045}
7046if (WinActive("GTA:SA:MP")) {
7047if (pauseOverlay) {
7048SetTimer, createOverlay, -1
7049}
7050IniRead, spotifyOv, ini/settings.ini, overlay, spotifyOv, 1
7051IniRead, cooldownOv, ini/settings.ini, overlay, cooldownOv, 1
7052IniRead, pingOv, ini/settings.ini, overlay, pingOv, 1
7053if (pingOv) {
7054playerFPS := getPlayerFPS()
7055playerPing := getPlayerPingById(getID())
7056if (playerPing < 50) {
7057pColor := cGreen
7058} else if (playerPing >= 50 && playerPing <= 90) {
7059pColor := cOranage
7060} else if (playerPing > 90) {
7061pingColor := cRed
7062}
7063if (playerFPS >= 60) {
7064fColor := cGreen
7065} else if (playerFPS > 30 && playerFPS < 60) {
7066fColor := cOrange
7067} else if (playerFPS < 30) {
7068fColor := cRed
7069}
7070pingString := cWhite . "FPS: " . fColor . playerFPS . cWhite . " | Ping: " . pColor . playerPing
7071textSetString(ov_ping, pingString)
7072}
7073if (spotifyOv) {
7074textSetString(ov_spotify, "{FFFFFF}Spotify: " . cgreen . spotifytrack)
7075}
7076if (cooldownOv) {
7077cooldownString := ""
7078cooldownsRunning := false
7079if (fishcooldown) {
7080cooldownsRunning := true
7081cooldownString .= "Angeln: " . formatTime(fishcooldown) . "`n"
7082}
7083if (pakcooldown) {
7084cooldownsRunning := true
7085cooldownString .= "Erste-Hilfe-Paket: " . formatTime(pakcooldown) . "`n"
7086}
7087if (healcooldown) {
7088cooldownsRunning := true
7089cooldownString .= "Heilen: " . formatTime(healcooldown) . "`n"
7090}
7091if (drugcooldown) {
7092cooldownsRunning := true
7093cooldownString .= "Drogen: " . formatTime(drugcooldown) . "`n"
7094}
7095if (admincooldown) {
7096cooldownsRunning := true
7097cooldownString .= "Admin-Chat: " . formatTime(admincooldown) . "`n"
7098}
7099if (ooccooldown) {
7100cooldownsRunning := true
7101cooldownString .= "OOC-Chat: " . formatTime(ooccooldown) . "`n"
7102}
7103if (cooldownBoxOv) {
7104if (cooldownsRunning == true) {
7105boxSetShown(ov_CooldownBox, true)
7106} else {
7107boxSetShown(ov_CooldownBox, false)
7108}
7109}
7110textSetString(ov_Cooldown, cooldownString)
7111}
7112}
7113}
7114return
7115SyncTimer:
7116{
7117if (systemSync) {
7118if (WinExist("GTA:SA:MP") && WinActive("GTA:SA:MP") && !isPlayerInMenu()) {
7119SendInfo("Das Synchroniseren von Fischen, Paket, Drogen und Lagerfeuer hat begonnen!")
7120SendInfo("Drücke bitte nach den nächsten 2 Sekunden keine Keys und schreibe nichts im Chat!")
7121Sleep, 2000
7122checkCook()
7123checkFish()
7124Sleep, 1000
7125getItems()
7126SendInfo("Das Synchronisieren ist " . cgreen . "abgeschlossen" . cwhite . ".")
7127SetTimer, SyncTimer, 600000
7128}
7129} else {
7130SetTimer, SyncTimer, off
7131}
7132}
7133return
7134TankTimer:
7135{
7136if (fillWarning) {
7137if (isPlayerInAnyVehicle() && isPlayerDriver()) {
7138if (!updateTextDraws()) {
7139return
7140}
7141oReplace := ["~s~", "~r~", "~w~", "~h~", "~g~", "~y~", "~n~", "~b~", " ", " "]
7142for i, o in oTextDraws {
7143Loop % oReplace.MaxIndex() {
7144o := StrReplace(o, oReplace[A_Index], " ")
7145}
7146if (RegExMatch(o, "Tank: (\S+)\/(\d+) L", tank_)) {
7147if (tank_1 <= 5 && oldTank != Ceil(tank_1)) {
7148SoundBeep
7149SendInfo(cRed . "WARNUNG: Dein Tank ist fast leer, es befinde" . (tank_1 == 1 ? "t" : "n") . " sich nur noch " . tank_1 . " Liter darin.")
7150oldTank := Ceil(tank_1)
7151break
7152}
7153} else if (RegExMatch(o, "Tank: Leer")) {
7154SoundBeep
7155SendInfo(cRed . "WARNUNG: Dein Tank ist leer, du kannst mit '" . cSecond . "X" . cwhite . "' einen Kanister nutzen.")
7156KeyWait, X, D, T10
7157if (!ErrorLevel && !isBlocked()) {
7158SendChat("/fillcar")
7159}
7160}
7161}
7162}
7163} else {
7164SetTimer, TankTimer, off
7165}
7166}
7167return
7168TicketTimer:
7169{
7170if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP")) {
7171return
7172}
7173if (autoTicket) {
7174SendInfo("Möchtest du das Ticket annehmen? Du kannst mit '" . cSecond . "X" . cWhite . "' bestätigen.")
7175KeyWait, X, D, T10
7176if (!ErrorLevel && !isBlocked()) {
7177if (getPlayerMoney() >= ticketPrice) {
7178SendChat("/accept ticket")
7179Sleep, 200
7180SendChat("/l Ich danke Dir für das Ticket, " . ticketName . "!")
7181} else {
7182SendChat("/l Tut mir leid " . ticketName . ", ich habe nicht genügend Geld ($" . getPlayerMoney() . ") bei mir!")
7183}
7184}
7185SetTimer, TicketTimer, off
7186}
7187}
7188return
7189RefillTimer:
7190{
7191SendInfo("Möchtest du einen Kanister nutzen? Du kannst mit '" . csecond . "X" . cwhite . "' bestätigen.")
7192KeyWait, X, D, T10
7193if (!ErrorLevel && !isBlocked()) {
7194SendChat("/fillcar")
7195}
7196SetTimer, RefillTimer, off
7197}
7198return
7199PaketTimer:
7200{
7201SendInfo(csecond . medicName . cwhite . " bietet dir ein Paket an, drücke '" . csecond . "X" . cwhite . "' zum Annehmen.")
7202KeyWait, X, D, T10
7203if (!ErrorLevel && !isBlocked()) {
7204SendChat("/accept paket")
7205Sleep, 200
7206if (RegExMatch(readChatLine(0) . readChatLine(1) . readChatLine(2), "Du hast bereits ein Erste-Hilfe-Paket\. Verwende \/erstehilfe")) {
7207SendChat("/l Vielen Dank " . medicName . ", doch ich habe bereits ein Paket!")
7208} else if (RegExMatch(readChatLine(0) . readChatLine(1) . readChatLine(2), "\* Du hast für \$(\d+) ein Erste-Hilfe-Paket von (\S+) gekauft\.", chat_)) {
7209SendChat("/l Vielen Dank " . chat_2 . " für das Erste-Hilfe-Paket!")
7210}
7211}
7212SetTimer, PaketTimer, off
7213}
7214return
7215SpamTimer:
7216{
7217if (antiSpam) {
7218if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP")) {
7219return
7220}
7221unBlockChatInput()
7222SendInfo("Das Antispam System wurde " . cred . "deaktiviert" . cwhite . ".")
7223SetTimer, SpamTimer, off
7224} else {
7225SetTimer, SpamTimer, off
7226}
7227}
7228return
7229AutoChatlog:
7230{
7231if (saveChatlog) {
7232if (chatlogSaver) {
7233WinWait, GTA:SA:MP, , 1
7234if (ErrorLevel) {
7235return
7236}
7237WinWaitClose, GTA:SA:MP, , 1
7238if (ErrorLevel) {
7239return
7240}
7241formatTime, time, %A_Now%, dd.MM.yy - HH.mm
7242FileCopy, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt, %A_ScriptDir%\GTA San Andreas User Files\SAMP\ChatlogBackup\chatlog %time% Uhr.txt, 0
7243TrayTip, Chatlog, Eine Kopie des Chatlos wurde erstellt (SAMP Ordner -> User Files)
7244}
7245} else {
7246SetTimer, AutoChatlog, off
7247}
7248}
7249return
7250LottoTimer:
7251{
7252if (autoLotto) {
7253if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP")) {
7254return
7255}
7256IniRead, lottoNumber, ini/settings.ini, settings, lottoNumber, 31
7257if (AutoLotto) {
7258if (A_Min == 0 && A_Hour != oldHour) {
7259SendChat("/lotto")
7260if (lottoNumber == 101) {
7261lottoNumber := getId()
7262lottoText := "Deine ID (" . getId() . ")"
7263} else if (lottoNumber == 0) {
7264Random, lottoNumber, 1, 100
7265lottoText := "Random Zahl"
7266} else {
7267lottoText := lottoNumber
7268}
7269SendInfo("Möchtest du Lotto (Lottonummer: " . lottoText . ") spielen? Du kannst mit '" . cSecond . "X" . cWhite . "' bestätigen")
7270oldHour := A_Hour
7271KeyWait, X, D, T10
7272if (!ErrorLevel && !isBlocked()) {
7273SendChat("/lotto " . lottoNumber)
7274}
7275}
7276}
7277} else {
7278SetTimer, LottoTimer, off
7279}
7280}
7281return
7282KillTimer:
7283{
7284if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP") || !isConnected()) {
7285return
7286}
7287IniRead, kills, ini/stats.ini, stats, kills, 0
7288IniRead, dkills, ini/stats.ini, stats, dkills[%A_DD%:%A_MM%:%A_YYYY%], 0
7289IniRead, mkills, ini/stats.ini, stats, mkills[%A_MM%:%A_YYYY%], 0
7290IniRead, deaths, ini/stats.ini, stats, deaths, 0
7291IniRead, ddeaths, ini/stats.ini, stats, ddeaths[%A_DD%:%A_MM%:%A_YYYY%], 0
7292IniRead, mdeaths, ini/stats.ini, stats, mdeaths[%A_MM%:%A_YYYY%], 0
7293IniRead, killstreak, ini/stats.ini, stats, killstreak, 0
7294data := getKills()
7295if (data && !isPaintball) {
7296for index, object in data {
7297if (object.victim.local) {
7298killWeaponShort := weaponShort(object.weapon)
7299killWeapon := getWeaponName(object.weapon)
7300killerID := getPlayerIdByName(object.murderer.name)
7301ped := getPedById(killerID)
7302pedCoord := getPedCoordinates(ped)
7303if (getDistanceToPoint(getCoordinates()[1], getCoordinates()[2], getCoordinates()[3], pedCoord[1], pedCoord[2], pedCoord[3]) <= 30) {
7304killName := object.murderer.name
7305} else {
7306killName := "Unbekannt"
7307}
7308if (getPlayerInteriorId()) {
7309deathPlace := "in einem Interior (" . getPlayerInteriorId() . ")"
7310} else {
7311deathPlace := "in " . getPlayerZone() . ", " . getPlayerCity()
7312}
7313IniWrite, % killWeaponShort, ini/stats.ini, stats, MurdererWeaponArt
7314IniWrite, % killWeapon, ini/stats.ini, stats, MurdererWeapon
7315IniWrite, % killName, ini/stats.ini, stats, Murderer
7316IniWrite, % deathPlace, ini/stats.ini, stats, DeathPlace
7317deaths ++
7318ddeaths ++
7319mdeaths ++
7320IniWrite, % deaths, ini/stats.ini, stats, deaths
7321IniWrite, % ddeaths, ini/stats.ini, stats, ddeaths[%A_DD%:%A_MM%:%A_YYYY%]
7322IniWrite, % mdeaths, ini/stats.ini, stats, mdeaths[%A_MM%:%A_YYYY%]
7323kd := round(kills/deaths, 2)
7324dkd := round(dkills/ddeaths, 2)
7325mkd := round(mkills/mdeaths, 2)
7326SendInfo("DKD: " . cSecond . kd . cWhite . " - MKD: " . cSecond . mkd . cWhite . " - KD: " . cSecond . kd)
7327if (StrLen(deathMessage) > 0) {
7328SendToHotkey(deathMessage)
7329}
7330streak := 0
7331} else if (object.murderer.local) {
7332killFaction := getFraktionByID(getFraktionBySkinID(object.skin))
7333killWeapon := getWeaponName(object.weapon)
7334killWeaponShort := weaponShort(object.weapon)
7335killerID := getPlayerIdByName(object.victim.name)
7336ped := getPedById(killerID)
7337pedCoord := getPedCoordinates(ped)
7338if (getDistanceToPoint(getCoordinates()[1], getCoordinates()[2], getCoordinates()[3], pedCoord[1], pedCoord[2], pedCoord[3]) <= 30) {
7339killName := object.victim.name
7340} else {
7341killName := "Unbekannt"
7342}
7343if (getPlayerInteriorId()) {
7344killPlace := "in einem Interior (" . getPlayerInteriorId() . ")"
7345} else {
7346killPlace := "in " . getPlayerZone() . ", " . getPlayerCity()
7347}
7348IniWrite, % killName, ini/stats.ini, stats, Victim
7349IniWrite, % killFaction, ini/stats.ini, stats, VictimFaction
7350IniWrite, % killWeapon, ini/stats.ini, stats, VictimWeapon
7351IniWrite, % killWeaponShort, ini/stats.ini, stats, VictimWeaponArt
7352IniWrite, % killPlace, ini/stats.ini, stats, KillPlace
7353kills ++
7354dkills ++
7355mkills ++
7356streak ++
7357IniWrite, % kills, ini/stats.ini, stats, kills
7358IniWrite, % dkills, ini/stats.ini, stats, dkills[%A_DD%:%A_MM%:%A_YYYY%]
7359IniWrite, % mkills, ini/stats.ini, stats, mkills[%A_MM%:%A_YYYY%]
7360kd := round(kills/deaths, 2)
7361if (deaths == 0) {
7362kd := kills . ".00"
7363}
7364dkd := round(dkills/ddeaths, 2)
7365if (ddeaths == 0) {
7366dkd := dkills . ".00"
7367}
7368mkd := round(mkills/mdeaths, 2)
7369if (mdeaths == 0) {
7370mkd := mkills . ".00"
7371}
7372if (StrLen(killMessage) > 0) {
7373sendToHotkey(killMessage)
7374}
7375SendInfo("DKD: " . cSecond . kd . cWhite . " - MKD: " . cSecond . mkd . cWhite . " - KD: " . cSecond . kd)
7376}
7377}
7378}
7379}
7380return
7381TimeoutTimer:
7382{
7383if (!fillTimeout_) {
7384fillTimeout ++
7385if (fillTimeout >= 15) {
7386fillTimeout_ := true
7387}
7388}
7389if (!canisterTimeout_) {
7390canisterTimeout ++
7391if (canisterTimeout >= 15) {
7392canisterTimeout_ := true
7393}
7394}
7395if (!mautTimeout_) {
7396mautTimeout ++
7397if (mautTimeout >= 15) {
7398mautTimeout_ := true
7399}
7400}
7401if (!healTimeout_) {
7402healTimeout ++
7403if (healTimeout >= 15) {
7404healTimeout_ := true
7405}
7406}
7407if (!cookTimeout_) {
7408cookTimeout ++
7409if (cookTimeout >= 15) {
7410cookTimeout_ := true
7411}
7412}
7413if (!gateTimeout_) {
7414gateTimeout ++
7415if (gateTimeout >= 5) {
7416gateTimeout_ := true
7417}
7418}
7419if (!fishTimeout_) {
7420fishTimeout ++
7421if (fishTimeout >= 15) {
7422fishTimeout_ := true
7423}
7424}
7425if (!depositTimeout_) {
7426depositTimeout ++
7427if (depositTimeout >= 15) {
7428depositTimeout_ := true
7429}
7430}
7431if (!searchTimeout_) {
7432searchTimeout ++
7433if (searchTimeout >= 2) {
7434searchTimeout_ := true
7435}
7436}
7437if (!outbrealTimeout_) {
7438outbrealTimeout ++
7439if (outbrealTimeout >= 15) {
7440outbrealTimeout_ := true
7441}
7442}
7443if (!localTimeout_) {
7444localTimeout ++
7445if (localTimeout >= 15) {
7446localTimeout_ := true
7447}
7448}
7449if (!garbageTimeout_) {
7450garbageTimeout ++
7451if (garbageTimeout >= 6) {
7452SendChat("YES")
7453garbageTimeout_ := true
7454}
7455}
7456if (!fishSellTimeout_) {
7457fishSellTimeout ++
7458if (fishSellTimeout >= 15) {
7459fishSellTimeout_ := true
7460}
7461}
7462}
7463return
7464AutoFindTimer:
7465{
7466if (!WinActive("GTA:SA:MP")) {
7467return
7468}
7469if (autoFindMode == 1) {
7470SendChat("/find " . playerToFind)
7471} else if (autoFindMode == 2) {
7472if (showDriver) {
7473passengers := getSeatIDs()
7474if (passengers) {
7475driver := passengers[1]
7476if (driver == -1) {
7477return
7478}
7479showP := driver
7480} else {
7481return
7482}
7483} else {
7484if (playerToShowTo == "") {
7485return
7486} else {
7487showP := playerToShowTo
7488}
7489}
7490SendChat("/showpos " . showP . " " . playerToFind)
7491} else {
7492return
7493}
7494Sleep, 250
7495adrGTA2 := getModuleBaseAddress("gta_sa.exe", hGTA)
7496cText := readString(hGTA, adrGTA2 + 0x7AAD43, 512)
7497if (InStr(cText, "Handy aus")) {
7498return
7499}
7500if (getDistanceBetween(coordsFromRedmarker()[1], coordsFromRedmarker()[2], coordsFromRedmarker()[3], 1163.2358, -1323.2552, 15.3945, 5)) {
7501SendInfo(cSecond . getFullName(playerToFind) . cWhite . " ist im Krankenhaus.")
7502}
7503}
7504return
7505ShowTimer:
7506{
7507if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP")) {
7508return
7509}
7510SendChat("/showpos " . Show . " " . Find)
7511}
7512return
7513LightTimer:
7514{
7515if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP")) {
7516return
7517}
7518if (IsPlayerInAnyVehicle() && IsPlayerDriver()) {
7519if (GetVehicleEngineState() && !GetVehicleLightState()) {
7520SendChat("/licht")
7521SetTimer, LightTimer, off
7522}
7523} else {
7524SetTimer, LightTimer, off
7525}
7526}
7527return
7528CountdownTimer:
7529{
7530if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP") || !IsSAMPAvailable()) {
7531return
7532}
7533if (countdown > 0) {
7534SendChat("/l >> " . countdown . " <<")
7535countdown --
7536if (countdown == 0) {
7537Sleep, 1000
7538SendChat("/l >> Letzte Warnung! <<")
7539countdownMode := 0
7540SetTimer, CountdownTimer, Off
7541}
7542}
7543}
7544return
7545Tempomat:
7546{
7547if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP") || isBlocked()) {
7548return
7549}
7550GetKeyState, status, S, P
7551if (status == D) {
7552SendInfo("Der Tempomat wurde " . cRed . "deaktiviert" . cWhite . ".")
7553Speed := -1
7554Tempomat := 0
7555SendInput, {w Up}
7556SetTimer, Tempomat, off
7557return
7558}
7559GetKeyState, status, W, P
7560if (status == D) {
7561SendInfo("Der Tempomat wurde " . cRed . "deaktiviert" . cWhite . ".")
7562Speed := -1
7563Tempomat := 0
7564SendInput, {w Up}
7565SetTimer, Tempomat, off
7566return
7567}
7568GetKeyState, status, T, P
7569if (status == D) {
7570SendInfo("Der Tempomat wurde " . cRed . "deaktiviert" . cWhite . ".")
7571Speed := -1
7572Tempomat := 0
7573SendInput, {w Up}
7574SetTimer, Tempomat, off
7575return
7576}
7577if (Tempomat) {
7578if (GetVehicleSpeed() < Speed) {
7579SendInput, {w Down}
7580} else {
7581SendInput, {w Up}
7582}
7583} else {
7584Speed := -1
7585SendInput, {w Up}
7586SetTimer, Tempomat, off
7587}
7588}
7589return
7590ChatTimer:
7591{
7592if (chatLogFile.Length < chatLogLines.Length()) {
7593chatLogFile := FileOpen(A_MyDocuments . "\GTA San Andreas User Files\SAMP\chatlog.txt", "r")
7594chatLogLines := []
7595}
7596while (!chatLogFile.AtEOF) {
7597line := chatLogFile.ReadLine()
7598line := RegExReplace(line, "U)^\[\d{2}:\d{2}:\d{2}\] ")
7599line := StrReplace(line, "`r`n")
7600line := StrReplace(line, "`r")
7601line := RegExReplace(line, "{\S{6}}", "")
7602if (line != "") {
7603chatLogLines.Push(line)
7604if (!firstChatLogRun) {
7605handleChatMessage(line, chatLogLines.Length(), chatLogLines)
7606}
7607}
7608}
7609firstChatLogRun := false
7610}
7611return
7612:?:/khelp::
7613{
7614SendInfo("Keybinder: Hilfscommands")
7615SendInfo("/helpdm /helpcom /helprandom /helpfish /radiohelp /helpall")
7616}
7617return
7618:?:/helpdm::
7619SendInput, {Enter}
7620{
7621SendInfo("Hilfe: Deathmatch")
7622SendInfo("Deathmatch: /ud /up /cd /af(ind) /as(how) /gf /gk /kd /fkd /resetdkd")
7623}
7624return
7625:?:/helpcom::
7626SendInput, {Enter}
7627{
7628SendInfo("Hilfe: Kommunikation")
7629SendInfo("Kommunikation: /jas /jam /ja /tag /bye /hi /bb /np /nh /geld /abholung")
7630SendInfo("Kommunikation: /ab /p /h /kcall /ksms /re(sms) /read /afk")
7631}
7632return
7633:?:/helprandom::
7634SendInput, {Enter}
7635{
7636SendInfo("Hilfe: Allgemein")
7637SendInfo("Allgemein: /pb /cc /relog /alotto /ap /fg /fps /update /autoAb /ov(verlay)")
7638SendInfo("Allgemein: /tanken /anwalt /link /tempo")
7639}
7640return
7641:?:/helpfish::
7642SendInput, {Enter}
7643{
7644SendInfo("Hilfe: Fischen")
7645SendInfo("Fischen: /acook /asell /afish /hp /fp")
7646}
7647return
7648:?:/radiohelp::
7649SendInput, {Enter}
7650{
7651SendInfo("Hilfe: Radio")
7652SendInfo("Radio: ILove: /ilove, /iloveradio, /ilovetodance, /ilovethedome, /iloveyou, /ilovemashup")
7653}
7654return
7655:?:/helpall::
7656SendInput, {Enter}
7657{
7658SendInfo("Hilfe: Alles")
7659SendInfo("Deathmatch: /ud /up /cd /af(ind) /as(how) /gf /gk /kd /fkd /resetdkd")
7660SendInfo("Kommunikation: /jas /jam /ja /tag /bye /hi /bb /np /nh /geld /abholung")
7661SendInfo("Kommunikation: /ab /p /h /kcall /ksms /re(sms) /read /afk")
7662SendInfo("Allgemein: /pb /cc /relog /alotto /ap /fg /fps /update /autoAb /ov(verlay)")
7663SendInfo("Allgemein: /tanken /anwalt /link /tempo")
7664SendInfo("Fischen: /acook /asell /afish /hp /fp")
7665SendInfo("Radio: ILove: /ilove, /iloveradio, /ilovetodance, /ilovethedome, /iloveyou, /ilovemashup")
7666}
7667return
7668:?:/ilove::
7669SendInput, {Enter}
7670{
7671SendInfo("Unter dem Suchbegrüf '/ilove' wurden folgende Radiosender gefunden:")
7672SendInfo("/iloveradio /ilovetodance /ilovethedome /iloveyou /ilovemashup")
7673}
7674return
7675:?:/iloveradio::
7676SendInput, {Enter}
7677{
7678SendInfo("Du hörst nun " . cSecond . "I-Love Radio" . cWhite . ".")
7679PlayAudioStream("http://www.iloveradio.de//listen1.m3u")
7680}
7681return
7682:?:/ilovetodance::
7683SendInput, {Enter}
7684{
7685SendInfo("Du hörst nun " . cSecond . "I-Love To Dance" . cWhite . ".")
7686run, %A_programfiles%\Windows Media Player\wmplayer.exe http://www.iloveradio.de//listen2.m3u,, Hide
7687}
7688return
7689:?:/ilovethedome::
7690SendInput, {Enter}
7691{
7692SendInfo("Du hörst nun " . cSecond . "I-Love The Dome" . cWhite . ".")
7693run, %A_programfiles%\Windows Media Player\wmplayer.exe http:///www.iloveradio.de//listen3.m3u,, Hide
7694}
7695return
7696:?:/iloveyou::
7697SendInput, {Enter}
7698{
7699SendInfo("Du hörst nun " . cSecond . "I-Love You" . cWhite . ".")
7700run, %A_ProgramFiles%\Windows Media Player\wmplayer.exe http:///www.iloveradio.de//listen4.m3u,, Hide
7701}
7702return
7703:?:/ilovemashup::
7704SendInput, {Enter}
7705{
7706SendInfo("Du hörst nun " . cSecond . "I-Love Mashup" . cWhite . ".")
7707run, %A_programfiles%\Windows Media Player\wmplayer.exe http:///www.iloveradio.de//listen5.m3u,, Hide
7708}
7709return
7710:?:/radioaus::
7711SendInput, {Enter}
7712{
7713SendInfo("Du hast das Radio " . cRed . "ausgeschaltet" . cWhite . ".")
7714Process, Close, wmplayer.exe
7715}
7716return
7717:?:/remgegner::
7718:?:/delgegner::
7719:?:/remenemy::
7720:?:/delenemy::
7721SendInput, {Enter}
7722{
7723enemyName := PlayerInput("Gegner: ")
7724if (enemyName == "")
7725return
7726if (!SQLiteDB.Query("SELECT fraction, name FROM enemies WHERE name LIKE '" . enemyName . "';", recordSet)) {
7727SendError("Es ist ein SQLite-Fehler aufgetreten! Sieh' bitte in der log.txt nach und informiere jacob.tremblay im Forum.")
7728FileAppend, % "SQLite Error: Query - Msg: '" . recordSet.ErrorMsg . "' - Code: " . recordSet.ErrorCode, log.txt
7729return
7730}
7731if (recordSet.HasRows) {
7732if (recordSet.Next(row)) {
7733enemyFraction := row[1]
7734enemyName := row[2]
7735if (SQLiteDB.exec("UPDATE enemies SET fraction = '0', updated = '" . getUnixTimestamp(A_Now) . "' WHERE name = '" . enemyName . "';")) {
7736SendError(cSecond . enemyName . cWhite . " wurde aus der Gegnerliste entfernt (Alte Fraktion: " . getFraktionByID(enemyFraction) . ").")
7737return
7738}
7739}
7740}
7741SendInfo("Der Spieler " . cSecond . enemyName . cWhite . " wurde nicht in der Gegnerliste gefunden.")
7742}
7743return
7744:?:/gegner::
7745:?:/enemies::
7746:?:/enemys::
7747SendInput, {Enter}
7748{
7749if (!SQLiteDB.Query("SELECT fraction, name FROM enemies WHERE fraction != '0' ORDER BY fraction ASC, name ASC;", recordSet)) {
7750SendInfo("Es ist ein SQLite-Fehler aufgetreten! Sieh' bitte in der log.txt nach und informiere jacob.tremblay im Forum.")
7751FileAppend, % "SQLite Error: Query - Msg: '" . recordSet.ErrorMsg . "' - Code: " . recordSet.ErrorCode, log.txt
7752return
7753}
7754dialog := "Fraktion`tName`tID"
7755playerCount := 0
7756if (recordSet.HasRows) {
7757while (recordSet.Next(row) >= 1) {
7758playerFraction := getFraktionByID(row[1])
7759if (row[1] > 3) {
7760playerName := row[2]
7761playerID := getPlayerIdByName(playerName, true)
7762if (playerID != -1) {
7763playerCount++
7764dialog .= "`n" . getFraktionColorByID(row[1]) . playerFraction . "`t" . playerName . "`t" . playerID
7765}
7766}
7767}
7768Sleep, 100
7769ShowDialog(DIALOG_STYLE_TABLIST_HEADERS, cWhite . "Gegner online: " . playerCount, dialog, "OK")
7770} else {
7771SendInfo("Es wurden noch keine Gegner gefunden! Begebe dich in die Nähe von potentiellen Gegnern, um sie hinzuzufügen.")
7772}
7773recordSet.Free()
7774}
7775return
7776:?:/cops::
7777SendInput, {Enter}
7778{
7779if (!SQLiteDB.Query("SELECT fraction, name FROM enemies WHERE fraction != '0' ORDER BY fraction ASC, name ASC;", recordSet)) {
7780SendInfo("Es ist ein SQLite-Fehler aufgetreten! Sieh' bitte in der log.txt nach und informiere jacob.tremblay im Forum.")
7781FileAppend, % "SQLite Error: Query - Msg: '" . recordSet.ErrorMsg . "' - Code: " . recordSet.ErrorCode, log.txt
7782return
7783}
7784dialog := "Fraktion`tName`tID"
7785playerCount := 0
7786if (recordSet.HasRows) {
7787while (recordSet.Next(row) >= 1) {
7788playerFraction := getFraktionByID(row[1])
7789if (row[1] <= 3) {
7790playerName := row[2]
7791playerID := getPlayerIdByName(playerName, true)
7792if (playerID != -1) {
7793playerCount++
7794dialog .= "`n" . getFraktionColorByID(row[1]) . playerFraction . "`t" . playerName . "`t" . playerID
7795}
7796}
7797}
7798Sleep, 100
7799ShowDialog(DIALOG_STYLE_TABLIST_HEADERS, cWhite . "Gegner online: " . playerCount, dialog, "OK")
7800} else {
7801SendInfo("Es wurden noch keine Gegner gefunden! Begebe dich in die Nähe von potentiellen Gegnern, um sie hinzuzufügen.")
7802}
7803Sleep, 100
7804ShowDialog(DIALOG_STYLE_TABLIST_HEADERS, "Copliste (" . playerCount . " online)", dialog, "OK")
7805recordSet.Free()
7806}
7807return
7808:?:/lspd::
7809:?:/fbi::
7810:?:/army::
7811SendInput, {Enter}
7812{
7813if (RegExMatch(A_ThisHotkey, "^:\?:\/(\S+)$", hstring_)) {
7814fraction := fractions[hstring_1][1]
7815if (!SQLiteDB.Query("SELECT name FROM enemies WHERE fraction = '" . fraction . "' ORDER BY name ASC;", recordSet)) {
7816SendInfo("Es ist ein SQLite-Fehler aufgetreten! Sieh' bitte in der log.txt nach und informiere jacob.tremblay im Forum.")
7817FileAppend, % "SQLite Error: Query - Msg: '" . recordSet.ErrorMsg . "' - Code: " . recordSet.ErrorCode, log.txt
7818return
7819}
7820if (recordSet.HasRows) {
7821dialog := "Name`tID`tStatus"
7822playerCount := 0
7823while (recordSet.Next(row) >= 1) {
7824playerName := row[1]
7825playerID := getPlayerIdByName(playerName, true)
7826dialog .= "`n" . playerName . "`t" . (playerID == -1 ? "-" : playerID) . "`t" . (playerID == -1 ? cRed . "offline" : cGreen . "online")
7827if (playerID != -1) {
7828playerCount++
7829}
7830}
7831Sleep, 100
7832ShowDialog(DIALOG_STYLE_TABLIST_HEADERS, getFraktionByID(fraction) . " (" . playerCount . " online)", dialog, "OK")
7833} else {
7834SendInfo("Es wurden noch keine Gegner der angegebenen Fraktion gefunden! Begebe dich in die Nähe von potentiellen Gegnern, um sie hinzuzufügen.")
7835}
7836recordSet.Free()
7837}
7838}
7839return
7840:?:/russen::
7841:?:/yakuza::
7842:?:/grove::
7843:?:/ballas::
7844:?:/lcm::
7845:?:/rifa::
7846:?:/vagos::
7847:?:/triaden::
7848:?:/biker::
7849SendInput, {Enter}
7850{
7851if (RegExMatch(A_ThisHotkey, "^:\?:\/(\S+)$", hstring_)) {
7852fraction := fractions[hstring_1][1]
7853if (!SQLiteDB.Query("SELECT name FROM enemies WHERE fraction = '" . fraction . "' ORDER BY name ASC;", recordSet)) {
7854SendInfo("Es ist ein SQLite-Fehler aufgetreten! Sieh' bitte in der log.txt nach und informiere jacob.tremblay im Forum.")
7855FileAppend, % "SQLite Error: Query - Msg: '" . recordSet.ErrorMsg . "' - Code: " . recordSet.ErrorCode, log.txt
7856return
7857}
7858if (recordSet.HasRows) {
7859dialog := "Name`tID`tStatus"
7860playerCount := 0
7861while (recordSet.Next(row) >= 1) {
7862playerName := row[1]
7863playerID := getPlayerIdByName(playerName, true)
7864dialog .= "`n" . playerName . "`t" . (playerID == -1 ? "-" : playerID) . "`t" . (playerID == -1 ? cRed . "offline" : cGreen . "online")
7865if (playerID != -1) {
7866playerCount++
7867}
7868}
7869Sleep, 100
7870ShowDialog(DIALOG_STYLE_TABLIST_HEADERS, getFraktionByID(fraction) . " (" . playerCount . " online)", dialog, "OK")
7871} else {
7872SendInfo("Es wurden noch keine Gegner der angegebenen Fraktion gefunden! Begebe dich in die Nähe von potentiellen Gegnern, um sie hinzuzufügen.")
7873}
7874recordSet.Free()
7875}
7876}
7877return
7878:?:/stats::
7879SendInput, {Enter}
7880{
7881SendChat("/stats")
7882Sleep, 200
7883if (RegExMatch(getDialogText(), "(.*)Drogen: (\d+)g(.*)", drugs_)) {
7884IniWrite, % drugs_2, ini/settings.ini, items, drugs
7885if (drugs_2 == 0) {
7886if (overlay && startOverlay) {
7887imageDestroy(ov_Drugs)
7888textDestroy(ov_DrugsText)
7889}
7890}
7891} else {
7892SendError("Beim Auslesen der Drogen ist ein Fehler aufgetreten.")
7893}
7894if (InStr(getDialogText(), "Erste-Hilfe-Paket")) {
7895IniWrite, 1, ini/settings.ini, items, firstaid
7896} else {
7897IniWrite, 0, ini/settings.ini, items, firstaid
7898if (overlay && startOverlay) {
7899imageDestroy(ov_Firstaid)
7900}
7901}
7902if (InStr(getDialogText(), "Benzin Kanister")) {
7903IniWrite, 1, ini/settings.ini, items, canister
7904} else {
7905IniWrite, 0, ini/settings.ini, items, canister
7906if (overlay && startOverlay) {
7907imageDestroy(ov_Canister)
7908}
7909}
7910if (InStr(getDialogText(), "Lagerfeuer")) {
7911if (RegExMatch(getDialogText(), "(.*)Lagerfeuer \((\d+)\)(.*)", campfire_)) {
7912iniWrite, % campfire_2, ini/settings.ini, items, campfire
7913}
7914} else {
7915iniWrite, 0, ini/settings.ini, items, campfire
7916if (overlay && startOverlay) {
7917imageDestroy(ov_Campfire)
7918textDestroy(ov_CampfireText)
7919}
7920}
7921if (overlay && startOverlay) {
7922ov_Info(0)
7923ov_Info()
7924}
7925}
7926return
7927:?:/contracts::
7928{
7929if (isDialogOpen()) {
7930dCount := getDialogLineCount()
7931SendChat("/l " . dCount)
7932}
7933}
7934return
7935:?:/fake::
7936{
7937player1 := getPlayerNameById(1)
7938player2 := getPlayerNameById(2)
7939player3 := getPlayerNameById(3)
7940id1 := getPlayerIdByName(player1)
7941id2 := getPlayerIdByName(player2)
7942id3 := getPlayerIdByName(player3)
7943showDialog(DIALOG_STYLE_TABLIST, "[" . id1 . "] " . player1 . "`t{BBBBBB}5.000${FFFFFF}`n[" . id2 . "] " . player2 . "`t{BBBBBB}5.000${FFFFFF}`n[" . id3 . "] " . player3 . "`t{BBBBBB}5.000${FFFFFF}", "Ok", "ok"2)
7944}
7945return
7946:?:/ov::
7947:?:/overlay::
7948SendInput, {Enter}
7949{
7950if (!overlay) {
7951SendInfo("Das Overlay ist " . cRed . "ausgeschaltet" . cWhite . ".")
7952} else {
7953if (startOverlay) {
7954startOverlay := false
7955SendInfo("Das Overlay wurde " . cRed . "deaktiviert" . cWhite . ".")
7956destroyOverlay()
7957SetTimer, loadOverlay, off
7958} else {
7959startOverlay := true
7960SendInfo("Das Overlay wurde " . cGreen . "aktiviert" . cWhite . ".")
7961destroyOverlay()
7962SetTimer, createOverlay, -1
7963}
7964}
7965}
7966return
7967:?:/moveov::
7968:?:/ovmove::
7969{
7970if (!startOverlay) {
7971SendInfo("Du musst das Overlay anschalten (/(ov)erlay)")
7972return
7973}
7974if (ovMoveMode) {
7975ovMoveMode := 0
7976SendInfo("Das Verschieben des Overlays wurde " . cRed . "beendet" . cWhite . ".")
7977} else {
7978SendInfo("1: " . cSecond . "Spotify Overlay" . cWhite . " | 2: " . cSecond . "Cooldown Overlay")
7979SendInfo("3: " . cSecond . "FPS und Ping Overlay" . cWhite . " | 4: " . cSecond . "Info Overlay")
7980SendInfo("5: " . cSecond . "Gegner / Cops Overlay")
7981overlayInput := PlayerInput("Overlay-ID: ")
7982if (overlayInput == 1) {
7983if (spotifyOv) {
7984ovMoveMode := 1
7985SendInfo("Das Verschieben des Spotify Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
7986SendInfo("")
7987SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
7988SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
7989if (!isPlayerInAnyVehicle()) {
7990SendChat("/lay")
7991}
7992} else {
7993SendInfo("Das Spotify Overlay muss in den Einstellungen aktiviert sein.")
7994}
7995} else if (overlayInput == 2) {
7996if (cooldownOv) {
7997ovMoveMode := 2
7998SendInfo("Das Verschieben des Cooldown Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
7999SendInfo("")
8000SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
8001SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
8002if (!isPlayerInAnyVehicle()) {
8003SendChat("/lay")
8004}
8005} else {
8006SendInfo("Das Cooldown Overlay muss in den Einstellungen aktiviert sein.")
8007}
8008} else if (overlayInput == 3) {
8009if (pingOv) {
8010ovMoveMode := 3
8011SendInfo("Das Verschieben des FPS/Ping Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
8012SendInfo("")
8013SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
8014SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
8015if (!isPlayerInAnyVehicle()) {
8016SendChat("/lay")
8017}
8018} else {
8019SendInfo("Das FPS/Ping Overlay muss in den Einstellungen aktiviert sein.")
8020}
8021} else if (overlayInput == 4) {
8022if (infoOv) {
8023SendInfo("Folgende Sub-Overlays sind verfügbar zum bewegen:")
8024SendInfo(cSecond . "1:" . cWhite . "Telefon-Status")
8025SendInfo(cSecond . "2:" . cWhite . "Erste-Hilfe-Paket")
8026SendInfo(cSecond . "3:" . cWhite . "Kanister (nur im Fahrzeug)")
8027SendInfo(cSecond . "4:" . cWhite . "Gekochte Fische")
8028SendInfo(cSecond . "5:" . cWhite . "Ungekochte Fische")
8029SendInfo(cSecond . "6:" . cWhite . "Lagerfeuer")
8030SendInfo(cSecond . "7:" . cWhite . "Drogen")
8031typ := PlayerInput("Typ: ")
8032if (typ == 1) {
8033ovMoveMode := 4
8034SendInfo("Das Verschieben des Handy Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
8035SendInfo("")
8036SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
8037SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
8038if (!isPlayerInAnyVehicle()) {
8039SendChat("/lay")
8040}
8041} else if (typ == 2) {
8042ovMoveMode := 5
8043SendInfo("Das Verschieben des Erste-Hilfe Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
8044SendInfo("")
8045SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
8046SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
8047} else if (typ == 3) {
8048ovMoveMode := 6
8049SendInfo("Das Verschieben des Kanister Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
8050SendInfo("")
8051SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
8052SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
8053} else if (typ == 4) {
8054ovMoveMode := 7
8055SendInfo("Das Verschieben des Gekochten Fische Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
8056SendInfo("")
8057SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
8058SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
8059} else if (typ == 5) {
8060ovMoveMode := 8
8061SendInfo("Das Verschieben des Ungekochten Fische Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
8062SendInfo("")
8063SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
8064SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
8065} else if (typ == 6) {
8066ovMoveMode := 9
8067SendInfo("Das Verschieben des Lagerfeuer Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
8068SendInfo("")
8069SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
8070SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
8071} else if (typ == 7) {
8072ovMoveMode := 9
8073SendInfo("Das Verschieben des Drogen Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
8074SendInfo("")
8075SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
8076SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
8077} else {
8078SendInfo("Folgende Sub-Overlays sind verfügbar zum bewegen:")
8079SendInfo(cSecond . "1:" . cWhite . "Telefon-Status")
8080SendInfo(cSecond . "2:" . cWhite . "Erste-Hilfe-Paket")
8081SendInfo(cSecond . "3:" . cWhite . "Kanister (nur im Fahrzeug)")
8082SendInfo(cSecond . "4:" . cWhite . "Gekochte Fische")
8083SendInfo(cSecond . "5:" . cWhite . "Ungekochte Fische")
8084SendInfo(cSecond . "6:" . cWhite . "Lagerfeuer")
8085SendInfo(cSecond . "7:" . cWhite . "Drogen")
8086return
8087}
8088if (!isPlayerInAnyVehicle()) {
8089SendChat("/lay")
8090}
8091} else {
8092SendInfo("Das Info Overlay muss in den Einstellungen aktiviert sein.")
8093}
8094} else if (overlayInput == 5) {
8095ovMoveMode := 11
8096SendInfo("Das Verschieben des Genger Overlays wurde " . cGreen . "aktiviert" . cWhite . ".")
8097SendInfo("")
8098SendInfo("Das Overlay kann mit den Pfeiltasten /unten Rechts) verschoben werden.")
8099SendInfo("Wenn du fertig bist, verwende '" . cSecond . "/ovsave" . cWhite . "'ein, um die Position zu speichern.")
8100if (!isPlayerInAnyVehicle()) {
8101SendChat("/lay")
8102}
8103}
8104}
8105}
8106return
8107:?:/ovsave::
8108:?:/saveov::
8109{
8110if (!startOverlay) {
8111SendInfo("Du musst das Overlay anschalten (/(ov)erlay)")
8112return
8113}
8114if (ovMoveMode == 1) {
8115IniWrite, % spotifyXPos, ini/settings.ini, Overlay, spotifyXPos
8116IniWrite, % spotifyYPos, ini/settings.ini, Overlay, spotifyYPos
8117ovMoveMode := 0
8118SendInfo("Die Position des Spotify Overlays wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8119} else if (ovMoveMode == 2) {
8120IniWrite, % cooldownXPos, ini/settings.ini, Overlay, cooldownXPos
8121IniWrite, % cooldownYPos, ini/settings.ini, Overlay, cooldownYPos
8122IniWrite, % cooldownBoxX, ini/settings.ini, Overlay, cooldownBoxX
8123IniWrite, % cooldownBoxY, ini/settings.ini, Overlay, cooldownBoxY
8124ovMoveMode := 0
8125SendInfo("Die Position des Cooldown Overlays wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8126} else if (ovMoveMode == 3) {
8127IniWrite, % pingXPos, ini/settings.ini, Overlay, pingXPos
8128IniWrite, % pingYPos, ini/settings.ini, Overlay, pingYPos
8129ovMoveMode := 0
8130SendInfo("Die Position des FPS/Ping Overlays wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8131} else if (ovMoveMode == 4) {
8132IniWrite, % infoPhoneX, ini/settings.ini, overlay, infoPhoneX
8133IniWrite, % infoPhoneY, ini/settings.ini, overlay, infoPhoneY
8134ovMoveMode := 0
8135SendInfo("Die Position der Handy Info wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8136} else if (ovMoveMode == 5) {
8137IniWrite, % infoFirstaidX, ini/settings.ini, overlay, infoFirstaidX
8138IniWrite, % infoFirstaidY, ini/settings.ini, overlay, infoFirstaidY
8139ovMoveMode := 0
8140SendInfo("Die Position des Erste-Hilfe-Pakets wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8141} else if (ovMoveMode == 6) {
8142IniWrite, % infoCanisterX, ini/settings.ini, overlay, infoCanisterX
8143IniWrite, % infoCanisterY, ini/settings.ini, overlay, infoCanisterY
8144ovMoveMode := 0
8145SendInfo("Die Position des Kanister wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8146} else if (ovMoveMode == 7) {
8147IniWrite, % infoFishCookedX, ini/settings.ini, overlay, infoFishCookedX
8148IniWrite, % infoFishCookedY, ini/settings.ini, overlay, infoFishCookedY
8149ovMoveMode := 0
8150SendInfo("Die Position der gekochten Fische wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8151} else if (ovMoveMode == 8) {
8152IniWrite, % infoFishUncookedX, ini/settings.ini, overlay, infoFishUncookedX
8153IniWrite, % infoFishUncookedY, ini/settings.ini, overlay, infoFishUncookedY
8154ovMoveMode := 0
8155SendInfo("Die Position der ungekochten Fisch Info wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8156} else if (ovMoveMode == 9) {
8157IniWrite, % infoCampfireX, ini/settings.ini, overlay, infoCampfireX
8158IniWrite, % infoCampfireY, ini/settings.ini, overlay, infoCampfireY
8159ovMoveMode := 0
8160SendInfo("Die Position des Lagerfeuers wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8161} else if (ovMoveMode == 10) {
8162IniWrite, % infoDrugsX, ini/settings.ini, overlay, infoDrugsX
8163IniWrite, % infoDrugsY, ini/settings.ini, overlay, infoDrugsY
8164ovMoveMode := 0
8165SendInfo("Die Position der Drogen wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8166} else if (ovMoveMode == 11) {
8167IniWrite, % enemyX, ini/settings.ini, overlay, enemyX
8168IniWrite, % enemyY, ini/settings.ini, overlay, enemyY
8169ovMoveMode := 0
8170SendInfo("Die Position des Gegner Overlays wurde gespeichert. Verschieben " . cRed . "beendet" . cWhite . ".")
8171} else {
8172SendInfo("Der Overlay-Move Modus ist nicht aktiviert.")
8173return
8174}
8175startOverlay := true
8176destroyOverlay()
8177SetTimer, createOverlay, -1
8178}
8179return
8180:?:/editov::
8181:?:/ovedit::
8182{
8183SendInfo("1: " . cSecond . "Spotify Overlay" . cWhite . " | 2: " . cSecond . "Cooldown Overlay")
8184SendInfo("3: " . cSecond . "Ausbruch Overlay" . cWhite . " | 4: " . cSecond . "FPS und Ping Overlay")
8185SendInfo("5: " . cSecond . "Info Overlay")
8186overlayID := PlayerInput("Overlay: ")
8187if (overlayID == "" || overlayID == " ") {
8188return
8189} else if (overlayID < 1 && overlayID > 4) {
8190SendInfo("1: " . cSecond . "Spotify Overlay" . cWhite . " | 2: " . cSecond . "Cooldown Overlay")
8191SendInfo("3: " . cSecond . "Ausbruch Overlay" . cWhite . " | 4: " . cSecond . "FPS und Ping Overlay")
8192SendInfo("5: " . cSecond . "Info Overlay")
8193return
8194}
8195IniRead, cooldownOv, ini/settings.ini, overlay, cooldownOv, 1
8196IniRead, spotifyOv, ini/settings.ini, overlay, spotifyOv, 1
8197IniRead, pingOv, ini/settings.ini, overlay, pingOv, 1
8198IniRead, infoOv, ini/settings.ini, overlay, infoOv, 1
8199if (overlayID == 1) {
8200if (spotifyOv) {
8201IniWrite, 0, ini/settings.ini, overlay, spotifyOv
8202SendInfo("Du hast das Spotify-Overlay " . cRed . "deaktiviert" . cWhite . ".")
8203textDestroy(ov_Spotify)
8204} else {
8205IniWrite, 1, ini/settings.ini, overlay, spotifyOv
8206SendInfo("Du hast das Spotify-Overlay " . cGreen . "aktiviert" . cWhite . ".")
8207}
8208} else if (overlayID == 2) {
8209SendInfo("1: Cooldown Text, 2: Cooldown Box")
8210type := PlayerInput("Typ: ")
8211if (type == 1) {
8212if (cooldownOv) {
8213IniWrite, 0, ini/settings.ini, overlay, cooldownOv
8214SendInfo("Du hast das Cooldown-Overlay " . cRed . "deaktiviert" . cWhite . ".")
8215textDestroy(ov_Cooldown)
8216} else {
8217IniWrite, 1, ini/settings.ini, overlay, cooldownOv
8218SendInfo("Du hast das Cooldown-Overlay " . cGreen . "aktiviert" . cWhite . ".")
8219}
8220} else if (type == 2) {
8221if (cooldownBoxOv) {
8222IniWrite, 0, ini/settings.ini, overlay, cooldownBoxOv
8223SendInfo("Du hast die Cooldown-Box " . cRed . "deaktiviert" . cWhite . ".")
8224boxDestroy(ov_CooldownBox)
8225} else {
8226IniWrite, 1, ini/settings.ini, overlay, cooldownBoxOv
8227SendInfo("Du hast das Cooldown-Box " . cGreen . "aktiviert" . cWhite . ".")
8228}
8229} else {
8230SendInfo("1: Cooldown Text, 2: Cooldown Box")
8231}
8232} else if (overlayID == 3) {
8233if (pingOv) {
8234IniWrite, 0, ini/settings.ini, overlay, pingOv
8235SendInfo("Du hast das Ping-Overlay " . cRed . "deaktiviert" . cWhite . ".")
8236textDestroy(ov_Ping)
8237} else {
8238IniWrite, 1, ini/settings.ini, overlay, pingOv
8239SendInfo("Du hast das Ping-Overlay " . cGreen . "aktiviert" . cWhite . ".")
8240}
8241} else if (overlayID == 4) {
8242if (infoOv) {
8243IniWrite, 0, ini/settings.ini, overlay, infoOv
8244SendInfo("Du hast das Info-Overlay " . cRed . "deaktiviert" . cWhite . ".")
8245imageDestroy(ov_Phone)
8246} else {
8247IniWrite, 1, ini/settings.ini, overlay, infoOv
8248SendInfo("Du hast das Info-Overlay " . cGreen . "aktiviert" . cWhite . ".")
8249}
8250} else if (overlayID == 4) {
8251if (infoOv) {
8252IniWrite, 0, ini/settings.ini, overlay, enemyOv
8253SendInfo("Du hast das Gegner-Overlay " . cRed . "deaktiviert" . cWhite . ".")
8254imageDestroy(ov_Phone)
8255} else {
8256IniWrite, 1, ini/settings.ini, overlay, enemyOv
8257SendInfo("Du hast das Gegner-Overlay " . cGreen . "aktiviert" . cWhite . ".")
8258}
8259}
8260}
8261return
8262:?:/resetovpos::
8263{
8264if (!overlay) {
8265SendError("Das Overlay ist abgeschaltet.")
8266return
8267} else if (!startOverlay) {
8268SendError("Das Overlay ist aus.")
8269return
8270}
8271IniWrite, 3, ini/settings.ini, Overlay, spotifyXPos
8272IniWrite, 586, ini/settings.ini, Overlay, spotifyYPos
8273IniWrite, 645, ini/settings.ini, Overlay, cooldownXPos
8274IniWrite, 474, ini/settings.ini, Overlay, cooldownYPos
8275IniWrite, 640, ini/settings.ini, Overlay, cooldownBoxX
8276IniWrite, 470, ini/settings.ini, Overlay, cooldownBoxY
8277IniWrite, 695, ini/settings.ini, Overlay, pingXPos
8278IniWrite, 75, ini/settings.ini, Overlay, pingYPos
8279IniWrite, 26, ini/settings.ini, overlay, infoPhoneX
8280IniWrite, 460, ini/settings.ini, overlay, infoPhoneY
8281IniWrite, 193, ini/settings.ini, overlay, infoFirstaidX
8282IniWrite, 556, ini/settings.ini, overlay, infoFirstaidY
8283IniWrite, 296, ini/settings.ini, overlay, infoCanisterX
8284IniWrite, 518, ini/settings.ini, overlay, infoCanisterY
8285IniWrite, 223, ini/settings.ini, overlay, infoCampfireX
8286IniWrite, 558, ini/settings.ini, overlay, infoCampfireY
8287InIWrite, 253, ini/settings.ini, overlay, infoDrugsX
8288IniWrite, 558, ini/settings.ini, overlay, infoDrugsY
8289IniWrite, 765, ini/settings.ini, overlay, infoFishCookedX
8290IniWrite, 350, ini/settings.ini, overlay, infoFishCookedY
8291IniWrite, 765, ini/settings.ini, overlay, infoFishUncookedX
8292IniWrite, 385, ini/settings.ini, overlay, infoFishUncookedY
8293IniWrite, 660, ini/settings.ini, EnemyOverlay, enemyX
8294IniWrite, 250, ini/settings.ini, EnemyOverlay, enemyY
8295destroyOverlay()
8296SetTimer, loadOverlay, off
8297SetTimer, createOverlay, -1
8298SendInfo("Die Positionen des Overlays wurden resettet.")
8299}
8300return
8301:?:/pbenter::
8302SendInput, {Enter}
8303{
8304if (!isPlayerInAnyVehicle()) {
8305if (isPlayerInRangeOfPoint(901.2969, -1203.0950, 16.9832, 3)) {
8306if (getPlayerMoney() >= 2500) {
8307SendChat("/pbenter")
8308} else {
8309SendInfo("Fehler: Du benötigst mindestens 2.500$.")
8310}
8311} else {
8312SendInfo("Fehler: Du bist nicht an der Paintball-Arena.")
8313}
8314} else {
8315SendInfo("Fehler: Du darfst dich in keinem Fahrzeug befinden.")
8316}
8317}
8318return
8319:?:/pbexit::
8320SendInput, {Enter}
8321{
8322cantExit := 0
8323SendChat("/pbexit")
8324Sleep, 200
8325Loop, 5 {
8326if (InStr(readChatLine(A_Index - 1), "Fehler: Nachdem du getroffen wurdest, musst du 5 Sekunde warten, um die Arena zu verlassen.")) {
8327cantExit := 1
8328}
8329}
8330if (!cantExit) {
8331isPaintball := false
8332}
8333}
8334return
8335:?:/gk::
8336{
8337gkid := PlayerInput("GK: ")
8338if (gkid == "") {
8339return
8340}
8341if (RegExMatch(gkid, "^(\d+)\.(\d+)$")) {
8342gk(gkid)
8343}
8344}
8345return
8346:?:/kd::
8347SendInput, {Enter}
8348{
8349IniRead, kills, ini/stats.ini, stats, kills, 0
8350IniRead, dkills, ini/stats.ini, stats, dkills[%A_DD%:%A_MM%:%A_YYYY%], 0
8351IniRead, mkills, ini/stats.ini, stats, mkills[%A_MM%:%A_YYYY%], 0
8352IniRead, deaths, ini/stats.ini, stats, deaths, 0
8353IniRead, ddeaths, ini/stats.ini, stats, ddeaths[%A_DD%:%A_MM%:%A_YYYY%], 0
8354IniRead, mdeaths, ini/stats.ini, stats, mdeaths[%A_MM%:%A_YYYY%], 0
8355kd := round(kills/deaths, 2)
8356if (deaths == 0) {
8357kd := kills . ".00"
8358}
8359dkd := round(dkills/ddeaths, 2)
8360if (ddeaths == 0) {
8361dkd := dkills . ".00"
8362}
8363mkd := round(mkills/mdeaths, 2)
8364if (mdeaths == 0) {
8365mkd := mkills . ".00"
8366}
8367SendInfo("Aktuelle Kills: " . cSecond . formatNumber(kills) cWhite . " - Aktuelle Tode: " . cSecond . formatNumber(deaths))
8368SendInfo("Tages-Kills: " . cSecond . dkills . cWhite . " - Tages-Tode: " . cSecond . ddeaths)
8369SendInfo("Monats-Kills: " . cSecond . formatNumber(mkills) . cWhite . " - Monats-Tode: " . cSecond . formatNumber(mdeaths))
8370SendInfo("DKD: " . cSecond . kd . cWhite . " - MKD: " . cSecond . mkd . cWhite . " - KD: " . cSecond . kd)
8371}
8372return
8373:?:/fkd::
8374SendInput, {Enter}
8375{
8376shareKD("f")
8377}
8378return
8379:?:/jkd::
8380SendInput, {Enter}
8381{
8382shareKD("j")
8383}
8384return
8385:?:/ckd::
8386SendInput, {Enter}
8387{
8388shareKD("crew")
8389}
8390return
8391:?:/resetdkd::
8392SendInput, {Enter}
8393{
8394IniWrite, 0, ini/stats.ini, stats, ddeaths[%A_DD%:%A_MM%:%A_YYYY%]
8395IniWrite, 0, ini/stats.ini, stats, dkills[%A_DD%:%A_MM%:%A_YYYY%]
8396SendInfo("Deine Tages-Kills und Tode wurden auf 0 gesetzt.")
8397}
8398return
8399:?:/setkd::
8400SendInput, {Enter}
8401{
8402updateKD()
8403}
8404return
8405:?:/heal::
8406SendInput, {Enter}
8407{
8408checkHeal()
8409}
8410return
8411:?:/gf::
8412SendInput, {Enter}
8413{
8414SendChat("/gangfight")
8415}
8416return
8417:?:/jas::
8418SendInput, {Enter}
8419{
8420SendChat("Ja Sir, was kann ich für Sie tun?")
8421}
8422return
8423:?:/jam::
8424SendInput, {Enter}
8425{
8426SendChat("Ja Madam, was kann ich für Sie tun?")
8427}
8428return
8429:?:/ja::
8430SendInput, {Enter}
8431{
8432SendChat("Ja, was kann ich für Sie tun?")
8433}
8434return
8435:?:/tag::
8436SendInput, {Enter}
8437{
8438SendChat("Guten " . getDayTime() . ", wie kann ich Ihnen behilflich sein?")
8439}
8440return
8441:?:/bye::
8442SendInput, {Enter}
8443{
8444SendChat("Ich wünsche Ihnen einen schönen " . getDayTime() . ", Auf Wiedersehen.")
8445}
8446return
8447:?:/hi::
8448SendInput, {Enter}
8449{
8450SendChat("/f Hi")
8451Sleep, 400
8452SendChat("/org Hi")
8453Sleep, 400
8454SendChat("/j aLo")
8455}
8456return
8457:?:/bb::
8458SendInput, {Enter}
8459{
8460SendChat("/f Ich bin dann mal weg, haut rein Bois und Gurls!")
8461SendChat("/org Ich bin dann mal weg, haut rein Bois und Gurls!")
8462}
8463return
8464:?:/np::
8465SendInput, {Enter}
8466{
8467SendChat("/l Hallo Herr Sanitäter,")
8468SendChat("/l Ich hätte gerne ein Erste-Hilfe-Paket.")
8469}
8470return
8471:?:/nh::
8472SendInput, {Enter}
8473{
8474SendChat("/l Hallo Herr Sanitäter,")
8475SendChat("/l Ich hätte gerne einen Heal.")
8476}
8477return
8478:?:/pb::
8479SendInput, {Enter}
8480{
8481SendChat("/paintball")
8482Sleep, 200
8483players := 0
8484Loop, 100 {
8485if (InStr(readChatLine(players), "Punkte")) {
8486players ++
8487} else {
8488SendInfo("Spieler im Paintball: " . csecond . players)
8489return
8490}
8491}
8492}
8493return
8494:?:/cc::
8495SendInput, {Enter}
8496{
8497Loop, 20 {
8498SendInfo(" ")
8499}
8500}
8501return
8502:?:/hp::
8503:?:/cooked::
8504SendInput, {Enter}
8505{
8506checkCook()
8507}
8508return
8509:?:/fp::
8510:?:/fishes::
8511SendInput, {Enter}
8512{
8513checkFish()
8514}
8515return
8516:?:/relog::
8517SendInput, {Enter}
8518{
8519restart()
8520}
8521return
8522:?:/ud::
8523:?:/usedrugs::
8524SendInput, {Enter}
8525{
8526checkDrugs(true)
8527}
8528return
8529:?:/up::
8530:?:/erstehilfe::
8531SendInput, {Enter}
8532{
8533checkPaket(true)
8534}
8535return
8536:?:/ap::
8537:?:/accept paket::
8538SendInput, {Enter}
8539{
8540buyPaket()
8541}
8542return
8543:?:/ab::
8544SendInput, {Enter}
8545{
8546checkAb()
8547}
8548return
8549:?:/fg::
8550SendInput, {Enter}
8551{
8552if (getPlayerInteriorId() == 20) {
8553SendChat("/festgeld " . depositMoney)
8554} else {
8555SendInfo("Du bist in keiner Bank.")
8556}
8557}
8558return
8559:?:/alotto::
8560SendInput, {Enter}
8561{
8562if (lottoNumber == 0) {
8563Random, randomLotto, 1, 100
8564SendChat("/lotto " . randomLotto)
8565} else if (lottoNumber == 101) {
8566SendChat("/lotto " . getId())
8567} else {
8568SendChat("/lotto " . lottoNumber)
8569}
8570}
8571return
8572:?:/geld::
8573SendInput, {Enter}
8574{
8575if (MoneyMessage != "") {
8576SendToHotkey(MoneyMessage)
8577} else {
8578SendChat("Sehe ich wie ein Geldautomat aus?")
8579}
8580}
8581return
8582:?:/hide::
8583SendInput, {Enter}
8584{
8585SendChat("/hide")
8586if (HideMessage != "") {
8587SendToHotkey(HideMessage)
8588}
8589}
8590return
8591:?:/abholung::
8592{
8593chat := PlayerInput("Chat: ")
8594if (chat == "" || chat == " ") {
8595return
8596}
8597SendChat("/" chat " Ich benötige eine Abholung @ " getPlayerZone())
8598}
8599return
8600:?:/time::
8601SendInput, {Enter}
8602{
8603getPrisonTime()
8604}
8605return
8606:?:/fps::
8607SendInput, {Enter}
8608{
8609if (fpsUnlock()) {
8610SendInfo("Der FPS Unlocker wurde " . cGreen . "aktiviert" . cWhite . ".")
8611} else {
8612SendInfo("Fehler: versuche es erneut.")
8613}
8614}
8615return
8616:?:/cd::
8617{
8618if (countdownMode) {
8619SetTimer, CountdownTimer, off
8620countdownMode := 0
8621} else {
8622countdown := PlayerInput("Countdown: ")
8623if (countdown == "" || countdown == " ") {
8624return
8625}
8626if (countdown is not number || countdown < 3) {
8627SendInfo("Der Countdown msus mindestens 3 Sekunden lang sein.")
8628return
8629}
8630SendChat(">> Countdown: <<")
8631Sleep, 800
8632SendChat(">> " . countdown . " <<")
8633countdown -= 1
8634countdownMode := 1
8635SetTimer, CountdownTimer, 1000
8636}
8637}
8638return
8639:?:/afk::
8640{
8641if (!afkState) {
8642afk := PlayerInput("Minuten: ")
8643if (afk == "" || afk == " ") {
8644return
8645}
8646if (afk is not number) {
8647return
8648}
8649afkState := 1
8650getDayTime = %A_Now%
8651getDayTime += AFK * 60, Seconds
8652formatTime, BackTime, %getDayTime%, HH:mm
8653SendChat("/org Ich bin nun für " AFK " Minuten AFK, haut rein!")
8654Sleep, 50
8655SendInfo("Du bist nun bis " . cSecond . BackTime . cWhite . " Uhr abwesend.")
8656} else {
8657SendChat("/org Ich bin nun nicht mehr AFK, hallo Jungs!")
8658afkState := 0
8659}
8660}
8661return
8662:?:/autoAb::
8663SendInput, {Enter}
8664{
8665if (autoAb){
8666IniWrite, 0, ini/settings.ini, settings, autoAb
8667SendInfo("Du hast den automatischen Anrufbeantworter " . cRed . "deaktiviert" . cWhite . ".")
8668} else {
8669IniWrite, 1, ini/settings.ini, settings, autoAb
8670SendInfo("Du hast den automatischen Anrufbeantworter " . cGreen . "aktiviert" . cWhite . ".")
8671}
8672}
8673return
8674:?:/fill::
8675:?:/tanken::
8676SendInput, {Enter}
8677{
8678refillCar()
8679}
8680return
8681:?:/fahrer::
8682SendInput, {Enter}
8683{
8684if (showDriver) {
8685showDriver := false
8686SendInfo("Es wird nun nicht mehr automatisch dem Fahrer des Wagens gezeigt. (/asp)")
8687} else {
8688showDriver := true
8689SendInfo("Es wird nun immer automatisch dem Fahrer des Wagens gezeigt. (/asp)")
8690}
8691}
8692return
8693:?:/af::
8694:?:/afind::
8695{
8696playerToFindInput := PlayerInput("Spieler: ")
8697if (playerToFindInput == "" || playerToFindInput == " ") {
8698SendError("Die Eingabe wurde abgebrochen.")
8699return
8700}
8701playerToFind := playerToFindInput
8702if (getFullName(playerToFind) == "") {
8703SendError("Der angegebene Spieler ist nicht online.")
8704return
8705}
8706if (getFullName(playerToFind) == getUserName()) {
8707SendError("Du kannst dich nicht selber finden.")
8708return
8709}
8710autoFindMode := 1
8711findPlayer()
8712}
8713return
8714:?:/as::
8715:?:/asp::
8716{
8717if (!showDriver) {
8718playerToShowToInput := PlayerInput("Partner: ")
8719if (playerToShowToInput == "" || playerToShowToInput == " ") {
8720SendError("Du hast die Eingabe abgebrochen.")
8721return
8722}
8723if (!getFullName(playerToShowToInput)) {
8724SendError("Der angegebene Show-Partner ist offline.")
8725return
8726}
8727if (getFullName(playerToShowToInput) == getUserName()) {
8728SendError("Du kannst dir selbst niemanden anzeigen, nutze /af[ind]")
8729return
8730}
8731playerToShowTo := playerToShowToInput
8732playerToFindInput := PlayerInput("Gesuchter: ")
8733if (playerToFindInput == "" || playerToFindInput == " ") {
8734SendError("Du hast die Eingabe abgebrochen.")
8735} else if (!getFullName(playerToFindInput)) {
8736SendError("Der gesuchte Spieler ist offline.")
8737return
8738} else if (getFullName(playerToFindInput) == getUserName()) {
8739SendError("Du kannst dich nicht selbst finden.")
8740return
8741} else {
8742playerToFind := playerToFindInput
8743autoFindMode := 2
8744findPlayer()
8745}
8746}
8747}
8748return
8749:?:/p::
8750:?:/pickup::
8751SendInput, {Enter}
8752{
8753call := 0
8754Loop, Read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
8755{
8756if (InStr(A_LoopReadLine, "Dein Handy klingelt.")) {
8757call := 1
8758} else if (InStr(A_LoopReadLine, "Bitte Warte bis der Spieler annimmt.")) {
8759call := 1
8760}
8761}
8762if (call) {
8763SendToHotkey(PickupMessage)
8764} else {
8765SendError("Du hast keinen offenen Anruf verfügbar.")
8766}
8767}
8768return
8769:?:/h::
8770:?:/hangup::
8771SendInput, {Enter}
8772{
8773Loop, Read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
8774{
8775if (InStr(A_LoopReadLine, "Dein Handy klingelt.")) {
8776call := 1
8777} else if (InStr(A_LoopReadLine, "Bitte Warte bis der Spieler annimmt.")) {
8778call := 1
8779}
8780}
8781if (call) {
8782SendToHotkey(HangupMessage)
8783} else {
8784SendError("Du hast keinen offenen Anruf verfügbar.")
8785}
8786}
8787return
8788:?:/kcall::
8789{
8790name := PlayerInput("Call-Name: ")
8791if (name == "" || name == " ") {
8792return
8793}
8794fullName := getFullName(name)
8795if (fullName == "") {
8796SendInfo("Dieser Spieler ist offline.")
8797return
8798}
8799SendChat("/number " . fullName)
8800Sleep, 200
8801Loop, 5 {
8802Chat := readChatLine(A_Index - 1)
8803if (RegExMatch(Chat, "Name: (\S+), Ph: (\d+)", sms_)) {
8804if (sms_1 == fullName) {
8805number := sms_2
8806break
8807}
8808}
8809}
8810if (number != "") {
8811SendChat("/call " . number)
8812} else {
8813SendError("Die Nummer konnte nicht ausgelesen werden.")
8814}
8815}
8816return
8817:?:/ksms::
8818{
8819name := PlayerInput("SMS-Name: ")
8820if (name == "" || name == " ") {
8821return
8822}
8823fullName := getFullName(name)
8824if (fullName == "") {
8825SendInfo("Dieser Spieler ist offline.")
8826return
8827}
8828SendChat("/number " . fullName)
8829Sleep, 200
8830Loop, 5 {
8831Chat := readChatLine(A_Index - 1)
8832if (RegExMatch(Chat, "Name: (\S+), Ph: (\d+)", sms_)) {
8833if (sms_1 == fullName) {
8834number := sms_2
8835break
8836}
8837}
8838}
8839if (number != "") {
8840SendInput, t/sms %number%{space}
8841} else {
8842SendError("Die Nummer konnte nicht ausgelesen werden.")
8843}
8844}
8845return
8846:?:/re::
8847:?:/resms::
8848{
8849Loop, read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
8850{
8851if InStr(A_LoopReadLine, ", Sender: " . getUserName()) {
8852continue
8853}
8854if InStr(A_LoopReadLine, ", Sender: ") {
8855RegExMatch(A_LoopReadLine, "SMS\: (.*), Sender\: (.*) \((.*)\)", sms_)
8856}
8857}
8858if (sms_1 != "") {
8859SendInfo("Letzte SMS von " . sms_2 . ":")
8860SendInfo(cSecond . sms_1)
8861SendInput, /sms %sms_3%{space}
8862} else {
8863SendError("Du hast keine SMS erhalten.")
8864}
8865}
8866return
8867:?:/read::
8868{
8869Loop, Read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
8870{
8871if (RegExMatch(A_LoopReadLine, "\[Werbung\] (.+), (\S+) \((\d+)\)")) {
8872RegExMatch(A_LoopReadLine, "\[Werbung\] (.+), (\S+) \((\d+)\)", ad_)
8873}
8874}
8875if (ad_1 == "") {
8876SendInfo("Es wurde keine gültige Werbung gefunden.")
8877} else {
8878if (ad_2 == getUserName()) {
8879SendError("Die letzte Werbung stammt von dir selbst.")
8880} else {
8881SendInfo("Letzte Werbung von " . ad_2 . ":")
8882SendInfo(cSecond . ad_1)
8883SendInput, /sms %ad_3%{space}
8884}
8885}
8886}
8887return
8888:?:/link::
8889SendInput, {Enter}
8890{
8891Loop, 150 {
8892if (RegExMatch(readChatLine(A_Index - 1), "http\:\/\/(\S+)", link_)) {
8893ClipBoard := "http://" . link_1
8894linkresult := 1
8895} else if (RegExMatch(readChatLine(A_Index - 1), "https\:\/\/(\S+)", link_)) {
8896ClipBoard := "https://" . link_1
8897linkresult := 1
8898} else if (RegExMatch(readChatLine(A_Index - 1), "www\.(\S+)", link_)) {
8899ClipBoard := "www." . link_1
8900linkresult := 1
8901}
8902if (linkresult) {
8903SendInfo("Du hast folgenden Link kopiert: " . cSecond . Clipboard)
8904linkresult := 0
8905return
8906}
8907}
8908if (!linkresult) {
8909SendInfo("Es wurde kein gültiger Link in den letzten 150 Zeilen gefunden.")
8910}
8911}
8912return
8913:?:/tempo::
8914SendInput, {Enter}
8915{
8916if (isPlayerInAnyVehicle() && isPlayerDriver()) {
8917if (getVehicleEngineState()) {
8918speed := PlayerInput("Geschwindigkeit: ")
8919if (speed == "" || speed == " ") {
8920return
8921}
8922if (speed is not number || speed < 30) {
8923SendInfo("Die Geschwindigkeit muss mind. 30 Km/H betragen.")
8924return
8925}
8926SendInfo("Der Tempomat wurde angeschaltet, du fährst nun ca. " . Speed . " Km/H")
8927speed += 4
8928tempomat := 1
8929speed := speed
8930SetTimer, Tempomat, 200
8931} else {
8932SendInfo("Du musst zuerst den Motor anschalten.")
8933}
8934} else {
8935SendInfo("Du bist nicht der Fahrer eines Fahrzeuges.")
8936}
8937}
8938return
8939:?:/afish::
8940SendInput, {Enter}
8941{
8942startFish()
8943}
8944return
8945:?:/asell::
8946SendInput, {Enter}
8947{
8948sellFish()
8949}
8950return
8951:?:/kochen::
8952:?:/acook::
8953SendInput, {Enter}
8954{
8955cookFish()
8956}
8957return
8958~Up::
8959{
8960if (ovMoveMode) {
8961if (ovMoveMode == 1) {
8962spotifyYPos -= 1
8963} else if (ovMoveMode == 2) {
8964cooldownYPos -= 1
8965cooldownBoxY -= 1
8966} else if (ovMoveMode == 3) {
8967pingYPos -= 1
8968} else if (ovMoveMode == 4) {
8969infoPhoneY -= 1
8970} else if (ovMoveMode == 5) {
8971infoFirstaidY -= 1
8972} else if (ovMoveMode == 6) {
8973infoCanisterY -= 1
8974} else if (ovMoveMode == 7) {
8975infoFishCookedY -= 1
8976} else if (ovMoveMode == 8) {
8977infoFishUncookedY -= 1
8978} else if (ovMoveMode == 9) {
8979infoCampfireY -= 1
8980} else if (ovMoveMode == 10) {
8981infoDrugsY -= 1
8982} else if (ovMoveMode == 11) {
8983enemyY -= 1
8984}
8985ov_UpdatePosition(ovMoveMode)
8986}
8987}
8988return
8989~Down::
8990{
8991if (ovMoveMode) {
8992if (ovMoveMode == 1) {
8993spotifyYPos += 1
8994} else if (ovMoveMode == 2) {
8995cooldownYPos += 1
8996cooldownBoxY += 1
8997} else if (ovMoveMode == 3) {
8998pingYPos += 1
8999} else if (ovMoveMode == 4) {
9000infoPhoneY += 1
9001} else if (ovMoveMode == 5) {
9002infoFirstaidY += 1
9003} else if (ovMoveMode == 6) {
9004infoCanisterY += 1
9005} else if (ovMoveMode == 7) {
9006infoFishCookedY += 1
9007} else if (ovMoveMode == 8) {
9008infoFishUncookedY += 1
9009} else if (ovMoveMode == 9) {
9010infoCampfireY += 1
9011} else if (ovMoveMode == 10) {
9012infoDrugsY += 1
9013} else if (ovMoveMode == 11) {
9014enemyY += 1
9015}
9016ov_UpdatePosition(ovMoveMode)
9017}
9018}
9019return
9020~Left::
9021{
9022if (ovMoveMode) {
9023if (ovMoveMode == 1) {
9024spotifyXPos -= 1
9025} else if (ovMoveMode == 2) {
9026cooldownXPos -= 1
9027cooldownBoxX -= 1
9028} else if (ovMoveMode == 3) {
9029pingXPos -= 1
9030} else if (ovMoveMode == 4) {
9031infoPhoneX -= 1
9032} else if (ovMoveMode == 5) {
9033infoFirstaidX -= 1
9034} else if (ovMoveMode == 6) {
9035infoCanisterX -= 1
9036} else if (ovMoveMode == 7) {
9037infoFishCookedX -= 1
9038} else if (ovMoveMode == 8) {
9039infoFishUncookedX -= 1
9040} else if (ovMoveMode == 9) {
9041infoCampfireX -= 1
9042} else if (ovMoveMode == 10) {
9043infoDrugsX -= 1
9044} else if (ovMoveMode == 11) {
9045enemyX -= 1
9046}
9047ov_UpdatePosition(ovMoveMode)
9048}
9049}
9050return
9051~Right::
9052{
9053if (ovMoveMode) {
9054if (ovMoveMode == 1) {
9055spotifyXPos += 1
9056} else if (ovMoveMode == 2) {
9057cooldownXPos += 1
9058cooldownBoxX += 1
9059} else if (ovMoveMode == 3) {
9060pingXPos += 1
9061} else if (ovMoveMode == 4) {
9062infoPhoneX += 1
9063} else if (ovMoveMode == 5) {
9064infoFirstaidX += 1
9065} else if (ovMoveMode == 6) {
9066infoCanisterX += 1
9067} else if (ovMoveMode == 7) {
9068infoFishCookedX += 1
9069} else if (ovMoveMode == 8) {
9070infoFishUncookedX += 1
9071} else if (ovMoveMode == 9) {
9072infoCampfireX += 1
9073} else if (ovMoveMode == 10) {
9074infoDrugsX += 1
9075} else if (ovMoveMode == 11) {
9076enemyX += 1
9077}
9078ov_UpdatePosition(ovMoveMode)
9079}
9080}
9081return
9082Pause::
9083Suspend, Permit
9084{
9085if (isBlocked() || !HotkeyCheckExtra1)
9086return
9087Suspend
9088if (A_IsSuspended) {
9089SendInfo("Der Keybinder wurde " . cRed . "pausiert" . cWhite . ".")
9090SetTimer, KillTimer, off
9091SetTimer, ChatTimer, off
9092SetTimer, Decompile, off
9093SetTimer, MainTimer, off
9094SetTimer, SecondTimer, off
9095SetTimer, SearchEnemyTimer, off
9096if (systemSync) {
9097SetTimer, SyncTimer, off
9098}
9099if (fillWarning) {
9100SetTimer, TankTimer, off
9101}
9102if (saveChatlog) {
9103SetTimer, AutoChatlog, off
9104}
9105if (autoLotto) {
9106SetTimer, LottoTimer, off
9107}
9108} else {
9109if (!A_IsSuspended) {
9110SendInfo("Der Keybinder wurde " . cGreen . "aktiviert" . cWhite . ".")
9111SetTimer, KillTimer, 200
9112SetTimer, ChatTimer, 200
9113SetTimer, MainTimer, 200
9114SetTimer, SecondTimer, 1000
9115SetTimer, Decompile, 2000
9116SetTimer, SearchEnemyTimer, 2500
9117if (systemSync) {
9118SetTimer, SyncTimer, 60000
9119}
9120if (fillWarning) {
9121SetTimer, TankTimer, 5000
9122}
9123if (saveChatlog) {
9124SetTimer, AutoChatlog, 5000
9125}
9126if (autoLotto) {
9127SetTimer, LottoTimer, 5000
9128}
9129}
9130}
9131}
9132return
9133~Enter::
9134{
9135if (isBlocked())
9136return
9137if (!isPlayerInAnyVehicle()) {
9138if (isPlayerInRangeOfPoint(901.2969, -1203.0950, 16.9832, 3)) {
9139if (getPlayerMoney() >= 2500) {
9140SendChat("/pbenter")
9141} else {
9142SendError("Du benötigst mindestens 2.500$.")
9143}
9144}
9145}
9146}
9147return
9148~F::
9149{
9150if (isBlocked() || getVehicleType() == 6)
9151return
9152if (isPlayerInAnyVehicle()) {
9153if (autoEngine && isPlayerDriver() && getVehicleEngineState()) {
9154SendChat("/motor")
9155}
9156} else {
9157if (autoLock) {
9158Loop {
9159if (isPlayerDriver() && !getVehicleLockState()) {
9160Sleep, 200
9161if (!getVehicleLockState()) {
9162SendChat("/lock")
9163}
9164break
9165}
9166}
9167}
9168}
9169}
9170return
9171~<::
9172{
9173if (isBlocked() || !HotkeyCheckExtra2)
9174return
9175if (countdownMode) {
9176countdown := 0
9177countdownMode := 0
9178SetTimer, CountdownTimer, off
9179SendChat("/l >> Countdown beendet! <<")
9180}
9181if (tempomat) {
9182tempomat := 0
9183speed := -1
9184SendInfo("Der Tempomat wurde abgeschaltet.")
9185}
9186stopFinding()
9187SendInfo("Automatisches Suchen wurde beendet.")
9188}
9189return
9190~RButton::
9191{
9192while GetKeyState("RButton", "P") {
9193playerPed := getTargetPed()
9194playerID := getIdByPed(playerPed)
9195if (updatePlayerFraction(playerID)) {
9196Sleep, 1500
9197}
9198}
9199}
9200return
9201~XButton1::
9202{
9203if (isBlocked() || !HotkeyCheckMouse1)
9204return
9205SendToHotkey(HotkeyTextMouse1)
9206}
9207return
9208~XButton2::
9209{
9210if (isBlocked() || !HotkeyCheckMouse2)
9211return
9212SendToHotkey(HotkeyTextMouse2)
9213}
9214return
9215Hotkey0Label:
9216{
9217if (isBlocked() || !HotkeyCheck0)
9218return
9219SendToHotkey(HotkeyText0)
9220}
9221return
9222Hotkey1Label:
9223{
9224if (isBlocked() || !HotkeyCheck1)
9225return
9226SendToHotkey(HotkeyText1)
9227}
9228return
9229Hotkey2Label:
9230{
9231if (isBlocked() || !HotkeyCheck2)
9232return
9233SendToHotkey(HotkeyText2)
9234}
9235return
9236Hotkey3Label:
9237{
9238if (isBlocked() || !HotkeyCheck3)
9239return
9240SendToHotkey(HotkeyText3)
9241}
9242return
9243Hotkey4Label:
9244{
9245if (isBlocked() || !HotkeyCheck4)
9246return
9247SendToHotkey(HotkeyText4)
9248}
9249return
9250Hotkey5Label:
9251{
9252if (isBlocked() || !HotkeyCheck5)
9253return
9254SendToHotkey(HotkeyText5)
9255}
9256return
9257Hotkey6Label:
9258{
9259if (isBlocked() || !HotkeyCheck6)
9260return
9261SendToHotkey(HotkeyText6)
9262}
9263return
9264Hotkey7Label:
9265{
9266if (isBlocked() || !HotkeyCheck7)
9267return
9268SendToHotkey(HotkeyText7)
9269}
9270return
9271Hotkey8Label:
9272{
9273if (isBlocked() || !HotkeyCheck8)
9274return
9275SendToHotkey(HotkeyText8)
9276}
9277return
9278Hotkey9Label:
9279{
9280if (isBlocked() || !HotkeyCheck9)
9281return
9282SendToHotkey(HotkeyText9)
9283}
9284return
9285Hotkey10Label:
9286{
9287if (isBlocked() || !HotkeyCheck10)
9288return
9289SendToHotkey(HotkeyText10)
9290}
9291return
9292Hotkey11Label:
9293{
9294if (isBlocked() || !HotkeyCheck11)
9295return
9296SendToHotkey(HotkeyText11)
9297}
9298return
9299Hotkey12Label:
9300{
9301if (isBlocked() || !HotkeyCheck12)
9302return
9303SendToHotkey(HotkeyText12)
9304}
9305return
9306Hotkey13Label:
9307{
9308if (isBlocked() || !HotkeyCheck13)
9309return
9310SendToHotkey(HotkeyText13)
9311}
9312return
9313Hotkey14Label:
9314{
9315if (isBlocked() || !HotkeyCheck14)
9316return
9317SendToHotkey(HotkeyText14)
9318}
9319return
9320Hotkey15Label:
9321{
9322if (isBlocked() || !HotkeyCheck15)
9323return
9324SendToHotkey(HotkeyText15)
9325}
9326return
9327Hotkey16Label:
9328{
9329if (isBlocked() || !HotkeyCheck16)
9330return
9331SendToHotkey(HotkeyText16)
9332}
9333return
9334Hotkey17Label:
9335{
9336if (isBlocked() || !HotkeyCheck17)
9337return
9338SendToHotkey(HotkeyText17)
9339}
9340return
9341Hotkey18Label:
9342{
9343if (isBlocked() || !HotkeyCheck18)
9344return
9345SendToHotkey(HotkeyText18)
9346}
9347return
9348Hotkey19Label:
9349{
9350if (isBlocked() || !HotkeyCheck19)
9351return
9352SendToHotkey(HotkeyText19)
9353}
9354return
9355Hotkey20Label:
9356{
9357if (isBlocked() || !HotkeyCheck20)
9358return
9359SendToHotkey(HotkeyText20)
9360}
9361return
9362Hotkey21Label:
9363{
9364if (isBlocked() || !HotkeyCheck21)
9365return
9366SendToHotkey(HotkeyText21)
9367}
9368return
9369Hotkey22Label:
9370{
9371if (isBlocked() || !HotkeyCheck22)
9372return
9373SendToHotkey(HotkeyText22)
9374}
9375return
9376Hotkey23Label:
9377{
9378if (isBlocked() || !HotkeyCheck23)
9379return
9380SendToHotkey(HotkeyText23)
9381}
9382return
9383Hotkey24Label:
9384{
9385if (isBlocked() || !HotkeyCheck24)
9386return
9387SendToHotkey(HotkeyText24)
9388}
9389return
9390Hotkey25Label:
9391{
9392if (isBlocked() || !HotkeyCheck25)
9393return
9394SendToHotkey(HotkeyText25)
9395}
9396return
9397Hotkey26Label:
9398{
9399if (isBlocked() || !HotkeyCheck26)
9400return
9401SendToHotkey(HotkeyText26)
9402}
9403return
9404Hotkey27Label:
9405{
9406if (isBlocked() || !HotkeyCheck27)
9407return
9408SendToHotkey(HotkeyText27)
9409}
9410return
9411Hotkey28Label:
9412{
9413if (isBlocked() || !HotkeyCheck28)
9414return
9415SendToHotkey(HotkeyText28)
9416}
9417return
9418Hotkey29Label:
9419{
9420if (isBlocked() || !HotkeyCheck29)
9421return
9422SendToHotkey(HotkeyText29)
9423}
9424return
9425Hotkey30Label:
9426{
9427if (isBlocked() || !HotkeyCheck30)
9428return
9429SendToHotkey(HotkeyText30)
9430}
9431return
9432Hotkey31Label:
9433{
9434if (isBlocked() || !HotkeyCheck31)
9435return
9436SendToHotkey(HotkeyText31)
9437}
9438return
9439Hotkey32Label:
9440{
9441if (isBlocked() || !HotkeyCheck32)
9442return
9443SendToHotkey(HotkeyText32)
9444}
9445return
9446Hotkey33Label:
9447{
9448if (isBlocked() || !HotkeyCheck33)
9449return
9450SendToHotkey(HotkeyText33)
9451}
9452return
9453Hotkey34Label:
9454{
9455if (isBlocked() || !HotkeyCheck34)
9456return
9457SendToHotkey(HotkeyText34)
9458}
9459return
9460Hotkey35Label:
9461{
9462if (isBlocked() || !HotkeyCheck35)
9463return
9464SendToHotkey(HotkeyText35)
9465}
9466return
9467Hotkey36Label:
9468{
9469if (isBlocked() || !HotkeyCheck36)
9470return
9471SendToHotkey(HotkeyText36)
9472}
9473return
9474Hotkey37Label:
9475{
9476if (isBlocked() || !HotkeyCheck37)
9477return
9478SendToHotkey(HotkeyText37)
9479}
9480return
9481Hotkey38Label:
9482{
9483if (isBlocked() || !HotkeyCheck38)
9484return
9485SendToHotkey(HotkeyText38)
9486}
9487return
9488Hotkey39Label:
9489{
9490if (isBlocked() || !HotkeyCheck39)
9491return
9492SendToHotkey(HotkeyText39)
9493}
9494return
9495checkFish() {
9496global
9497fishHP := 0
9498fishMoney := 0
9499allFishHP := 0
9500allFishMoney := 0
9501SendChat("/fishes")
9502Sleep, 200
9503Loop, 15 {
9504if (RegExMatch(readChatLine(A_Index), "^\*\* \((\d+)\) Fisch: (.+) \((\d+) LBS\)$", fish_)) {
9505fishMoney := getFishValue(fish_2, fish_3)
9506fishHP := Floor(fish_3 * 0.3)
9507allFishHP += fishHP
9508allFishMoney += fishMoney
9509fishName%fish_1% := fish_2
9510fishLBS%fish_1% := fish_3
9511fishHP%fish_1% := fishHP
9512fishPrice%fish_1% := fishMoney
9513message%fish_1% := prefix . "(" . fish_1 . ") " . cSecond . fishName%fish_1% . cWhite . ": " . cSecond . fishHP%fish_1% . cWhite . " HP | $" . csecond . fishPrice%fish_1% . cWhite . " | " . cSecond . fishLBS%fish_1% . cWhite . " LBS"
9514}
9515}
9516fishes := 5
9517Loop, 5 {
9518setChatLine(fishes, message%A_Index%)
9519fishes -= 1
9520}
9521SendInfo("Gesamt HP: " . cSecond . formatNumber(allFishHP) . cwhite . " HP | Gesamt Wert: $" . cSecond . formatNumber(allFishMoney))
9522if (overlay && startOverlay) {
9523ov_Info(0)
9524ov_Info()
9525}
9526return allHP
9527}
9528checkCook() {
9529global
9530fishHP := 0
9531allHP := 0
9532SendChat("/cooked")
9533Sleep, 200
9534Loop, 15 {
9535if (RegExMatch(readChatLine(A_Index), "^\*\* \((\d+)\) Hergestellt: (.+) \((\d+) LBS\)$", fish_)) {
9536fishHP := floor(fish_3 / 3)
9537allHP += fishHP
9538fishName_%fish_1% := fish_2
9539fishLBS_%fish_1% := fish_3
9540fishHP_%fish_1% := fishHP
9541message%fish_1% := prefix . "(" . fish_1 . ") " . cSecond . fishName_%fish_1% . cWhite . ": " . cSecond . fishLBS_%fish_1% . cWhite . " LBS | " . csecond . fishHP_%fish_1% . cWhite . " HP"
9542}
9543}
9544fishes := 5
9545Loop, 5 {
9546setChatLine(fishes, message%A_Index%)
9547fishes -= 1
9548}
9549SendInfo("Gesamt HP: " . cSecond . formatNumber(allHP) . cwhite . " HP.")
9550if (overlay && startOverlay) {
9551ov_Info(0)
9552ov_Info()
9553}
9554return allHP
9555}
9556buyPaket() {
9557global
9558SendChat("/accept paket")
9559Sleep, 200
9560Loop, 5 {
9561chat := readChatLine(A_Index - 1)
9562if (RegExMatch(chat, "Du hast bereits ein Erste-Hilfe-Paket\. Verwende \/erstehilfe")) {
9563SendChat("/l Vielen Dank " . medicName . ", doch ich habe bereits ein Paket!")
9564return
9565} else if (RegExMatch(chat, "\* Du hast für \$(\d+) ein Erste-Hilfe-Paket von (\S+) gekauft\.", chat_)) {
9566SendChat("/l Vielen Dank " . chat_2 . " für das Erste-Hilfe-Paket!")
9567return
9568}
9569}
9570}
9571checkHeal() {
9572global
9573if (healcooldown == 0) {
9574SendChat("/heal")
9575} else {
9576SendInfo("Heal - gesperrt: noch " . cSecond . formatTime(healcooldown))
9577}
9578}
9579checkDrugs(state := false) {
9580global
9581if (state == true) {
9582DrugHp := 100
9583}
9584if (drugcooldown == 0) {
9585if (getPlayerHealth() <= DrugHp) {
9586SendChat("/usedrugs")
9587} else {
9588SendInfo("Du hast mehr als " . DrugHp . " HP " . cSecond . "(" . getPlayerHealth() . ")" . cWhite . " und brauchst keine Drogen konsumieren.")
9589}
9590} else {
9591SendInfo("Drogen - gesperrt: noch " . cSecond . formatTime(drugcooldown))
9592}
9593}
9594checkPaket(state := false) {
9595global
9596if (state == true) {
9597pakHP := 100
9598}
9599if (pakcooldown == 0) {
9600if (getPlayerHealth() <= pakHP) {
9601SendChat("/erstehilfe")
9602} else {
9603SendInfo("Du hast mehr als " . pakHP . " HP " . cSecond . "(" . getPlayerHealth() . ")" . cWhite . " und brauchst kein Paket nutzen.")
9604}
9605} else {
9606SendInfo("Erste-Hilfe-Paket - gesperrt: noch " . cSecond . formatTime(pakcooldown))
9607}
9608}
9609eatFish() {
9610global
9611if (getPlayerHealth() <= fishHP) {
9612SendChat("/eat " . eatFish)
9613eatFish ++
9614if (eatFish == 6) {
9615SendInfo("Der Fischzähler wurde zurückgesetzt.")
9616eatFish := 1
9617}
9618} else {
9619SendInfo("Du hast mehr als " . fishHP . " HP " . cSecond . "(" . getPlayerHealth() . ")" . cWhite . " und brauchst keine Fische.")
9620}
9621}
9622sendToHotkey(text, check = 0) {
9623global
9624if (InStr(text, "[ENGINE]")) {
9625if (isPlayerInAnyVehicle() && isPlayerDriver()) {
9626if (getVehicleSpeed() <= 20) {
9627if (autoLock && !getVehicleLockState()) {
9628SendChat("/lock")
9629Sleep, 200
9630}
9631SendChat("/motor")
9632SetTimer, LightTimer, 200
9633} else {
9634SendError("Während der Fahrt kannst du den Motor nicht an/abschalten.")
9635}
9636} else {
9637SendError("Du bist nicht der Fahrer eines Fahrzeuges.")
9638}
9639} else if (InStr(text, "[LOCK]")) {
9640if (isPlayerInAnyVehicle() && isPlayerDriver()) {
9641SendChat("/lock")
9642} else {
9643SendInfo("Du bist nicht der Fahrer eines Fahrzeuges.")
9644}
9645} else if (Instr(text, "[LIGHTS]")) {
9646if (IsPlayerInAnyVehicle() && IsPlayerDriver()) {
9647if (getVehicleEngineState()) {
9648SendChat("/licht")
9649Sleep, 100
9650if (!getVehicleLightState()) {
9651SendInfo("Die Fahrzeuglichter sind " . cGreen . "angeschaltet" . cWhite . ".")
9652} else {
9653SendInfo("Die Fahrzeuglichter sind " . cRed . "abgeschaltet" . cWhite . ".")
9654}
9655} else {
9656SendError("Du musst zuerst den Motor anschalten.")
9657}
9658} else {
9659SendError("Du bist nicht der Fahrer eines Fahrzeuges.")
9660}
9661} else if (InStr(text, "[TEMPOMAT]")) {
9662if (IsPlayerInAnyVehicle() && IsPlayerDriver()) {
9663if (GetVehicleEngineState()) {
9664if (tempomat) {
9665tempomat := 1
9666SendInfo("Der Tempomat wurde " . cGreen . "angeschaltet" . cRed . ".")
9667speed := getVehicleSpeed()
9668SetTimer, Tempomat, 200
9669} else {
9670Tempomat := 0
9671speed := -1
9672SendInput, {w Up}
9673SetTimer, Tempomat, off
9674}
9675} else {
9676SendError("Du musst zuerst den Motor anschalten.")
9677}
9678} else {
9679SendError("Du bist nicht der Fahrer eines Fahrzeuges.")
9680}
9681} else if (InStr(text, "[HIDE]")) {
9682SendChat("/hide")
9683SendToHotkey(HideMessage)
9684} else if (InStr(text, "[BACKUP]")) {
9685if (backupMode) {
9686SendChat("/f >> Ich benötige D R I N G E N D Backup @ " getPlayerZone() ", HP: " getPlayerHealth() " <<")
9687} else {
9688backupMode := 1
9689SendChat("/f >> Ich benötige Backup @ " getPlayerZone() ", HP: " getPlayerHealth() " <<")
9690}
9691} else if (InStr(text, "[BACKUPOFF]")) {
9692if (backupMode) {
9693backupMode := 0
9694SendChat("/f >> Ich benötige KEIN Backup mehr! <<")
9695} else {
9696SendInfo("Du hast keinen Backup gecallt.")
9697}
9698} else if (InStr(text, "[COUNTDOWN]")) {
9699if (countdownMode) {
9700SetTimer, CountdownTimer, off
9701countdownMode := 0
9702} else {
9703countdown := PlayerInput("Countdown: ")
9704if (countdown == "" || countdown == " ") {
9705return
9706} else if (countdown is not number || countdown < 3) {
9707SendError("Der Countdown msus mindestens 3 Sekunden lang sein.")
9708return
9709}
9710SendChat("Countdown:")
9711Sleep, 800
9712SendChat(">> " . countdown . " <<")
9713countdown -= 1
9714countdownMode := 1
9715SetTimer, CountdownTimer, 1000
9716}
9717} else if (Instr(text, "[LEAGUELIKE]")) {
9718if (Streak == 2) {
9719SendChat("/l DOUBLE KILL!")
9720SoundPlay, %A_ScriptDir%/sounds/double.mp3
9721} else if (Streak == 3) {
9722SendChat("/l TRIPLE KILL!")
9723SoundPlay, %A_ScriptDir%/sounds/triple.mp3
9724} else if (Streak == 4) {
9725SendChat("/l QUADRA KILL!")
9726SoundPlay, %A_ScriptDir%/sounds/quadra.mp3
9727} else if (Streak == 5) {
9728SendChat("/l PENTA KILL!")
9729SoundPlay, %A_ScriptDir%/sounds/penta.mp3
9730} else if (Streak == 6) {
9731SendChat("/l HEXA KILL!")
9732SoundPlay, %A_ScriptDir%/sounds/hexa.mp3
9733}
9734} else if (InStr(text, "[LEAGUELIKEF]")) {
9735if (Streak == 2) {
9736SendChat("/f DOUBLE KILL!")
9737SoundPlay, %A_ScriptDir%/sounds/double.mp3
9738} else if (Streak == 3) {
9739SendChat("/f TRIPLE KILL!")
9740SoundPlay, %A_ScriptDir%/sounds/triple.mp3
9741} else if (Streak == 4) {
9742SendChat("/f QUADRA KILL!")
9743SoundPlay, %A_ScriptDir%/sounds/quadra.mp3
9744} else if (Streak == 5) {
9745SendChat("/f PENTA KILL!")
9746SoundPlay, %A_ScriptDir%/sounds/penta.mp3
9747} else if (Streak == 6) {
9748SendChat("/f HEXA KILL!")
9749SoundPlay, %A_ScriptDir%/sounds/hexa.mp3
9750}
9751} else if (InStr(text, "[REPEAT]")) {
9752SendInput, t{up}{enter}
9753} else if (InStr(text, "[HEALING]")) {
9754checkHeal()
9755} else if (InStr(text, "[USEFISH]")) {
9756eatFish()
9757} else if (InStr(text, "[USEPAK]") || InStr(text, "/erstehilfe[ENTER]")) {
9758checkPaket()
9759} else if (InStr(text, "[USEDRUGS]") || InStr(text, "/usedrugs[ENTER]")) {
9760checkDrugs()
9761} else if (InStr(text, "[JAILTIME]")) {
9762getPrisonTime()
9763} else if (InStr(text, "[TOGPHONE]")) {
9764SendChat("/tog")
9765Sleep, 100
9766SendInput, {enter}
9767} else {
9768if (check == 1) {
9769text = /f %text%
9770}
9771String := replace(text)
9772StringReplace, String, String, &&, |, All
9773if (InStr(String, "|")) {
9774StringSplit, Splitted, String, |
9775Loop, %Splitted0% {
9776Value := Splitted%A_Index%
9777if (InStr(Value, "[SLEEP")) {
9778RegExMatch(Value, "\[SLEEP ([0-9]+)\]", sleepresult)
9779StringReplace, Value, Value, [SLEEP %sleepresult1%], , All
9780Sleep, %sleepresult1%
9781}
9782if (check == 1) {
9783SendInfo(value)
9784} else {
9785if (InStr(Value, "[LOCAL]")) {
9786StringReplace, Value, Value, [LOCAL],, All
9787SendInfo(value)
9788} else {
9789if (InStr(value,"[ENTER]")) {
9790StringReplace, Value, Value, [ENTER], , All
9791SendChat(value)
9792} else {
9793SendInput, t%Value%
9794}
9795}
9796}
9797}
9798} else {
9799if (InStr(String, "[SLEEP")) {
9800RegExMatch(String, "\[SLEEP ([0-9]+)\]", sleepresult)
9801StringReplace, String, String, [SLEEP %sleepresult1%], , All
9802sleep %sleepresult1%
9803}
9804if (check == 1) {
9805SendInfo(value)
9806} else {
9807if (InStr(String,"[LOCAL]")) {
9808StringReplace, String, String, [LOCAL],, All
9809SendInfo(string)
9810} else {
9811if (InStr(String,"[ENTER]")) {
9812StringReplace, String, String, [ENTER], , All
9813SendChat(String)
9814} else {
9815SendInput, t%String%
9816}
9817}
9818}
9819}
9820}
9821return
9822}
9823replace(String) {
9824global
9825if (InStr(String, "[NAME]")) {
9826MyName := getUserName()
9827StringReplace, String, String, [NAME], %MyName%,
9828}
9829if (InStr(String, "[ID]")) {
9830MyId := GetId()
9831StringReplace, String, String, [ID], %MyId%, All
9832}
9833if (InStr(String, "[FPS]")) {
9834Frames := GetFPS()
9835StringReplace, String, String, [FPS], %Frames%, All
9836}
9837if (InStr(String, "[PING]")) {
9838Ping := GetPlayerPingById(GetId())
9839StrinGreplace, String, String, [PING], %Ping%, All
9840}
9841if (InStr(String, "[SCORE]")) {
9842Score := getPlayerScoreById(GetId())
9843StringReplace, String, String, [SCORE], %Score%, All
9844}
9845if (InStr(String, "[CITY]")) {
9846City := getPlayerCity()
9847StringReplace, String, String, [CITY], %City%, All
9848}
9849if (InStr(String, "[ZONE]")) {
9850Zone := getPlayerZone()
9851StringReplace, String, String, [ZONE], %Zone%, All
9852}
9853if (InStr(String, "[POS]")) {
9854MyPos := getPlayerZone() ", " getPlayerCity()
9855StringReplace, String, String, [POS], %MyPos%, All
9856}
9857if (InStr(String, "[HP]")) {
9858Life := getPlayerHealth()
9859StringReplace, String, String, [HP], %Life%, All
9860}
9861if (InStr(String, "[WANTEDS]")) {
9862wanteds := getWanteds()
9863StringReplace, String, String, [WANTEDS], %wanteds%, All
9864}
9865if (InStr(String, "[JAILOUTTIME]")) {
9866PrisonOutTime := getFreeTime()
9867StringReplace, String, String, [JAILOUTTIME], %PrisonOutTime%, All
9868}
9869if (InStr(String, "[FISHMONEY]")) {
9870IniRead, FishingMoney, ini/stats.ini, stats, FishingMoney, 0
9871FishingMoney := FormatNumber(FishingMoney)
9872StringReplace, String, String, [FISHMONEY], %FishingMoney%, All
9873}
9874if (InStr(String, "[ROBMONEY]")) {
9875IniRead, RobMoney, ini/stats.ini, stats, RobMoney, 0
9876RobMoney := FormatNumber(RobMoney)
9877StringReplace, String, String, [ROBMONEY], %RobMoney%, All
9878}
9879if (Instr(String, "[VICTIM]")) {
9880IniRead, Victim, ini/stats.ini, stats, Victim, %A_Space%
9881StringReplace, String, String, [VICTIM], %Victim%, All
9882}
9883if (Instr(String, "[VICTIMFRAK]")) {
9884IniRead, VictimFaction, ini/stats.ini, stats, VictimFaction, %A_Space%
9885StringReplace, String, String, [VICTIMFRAK], %VictimFaction%, All
9886}
9887if (Instr(String, "[VICTIMWEAP]")) {
9888IniRead, VictimWeapon, ini/stats.ini, stats, VictimWeapon, %A_Space%
9889StringReplace, String, String, [VICTIMWEAP], %VictimWeapon%, All
9890}
9891if (Instr(String, "[VICTIMWEAPART]")) {
9892IniRead, VictimWeaponArt, ini/stats.ini, stats, VictimWeaponArt, %A_Space%
9893StringReplace, String, String, [VICTIMWEAPART], %VictimWeaponArt%, All
9894}
9895if (Instr(String, "[KILLPLACE]")) {
9896IniRead, KillPlace, ini/stats.ini, stats, KillPlace, %A_Space%
9897StringReplace, String, String, [KILLPLACE], %KillPlace%, All
9898}
9899if (Instr(String, "[MURDERER]")) {
9900IniRead, Murderer, ini/stats.ini, stats, Murderer, %A_Space%
9901StringReplace, String, String, [MURDERER], %Murderer%, All
9902}
9903if (Instr(String, "[MURDERERWEAP]")) {
9904IniRead, MurdererWeapon, ini/stats.ini, stats, MurdererWeapon, %A_Space%
9905StringReplace, String, String, [MURDERERWEAP], %MurdererWeapon%, All
9906}
9907if (Instr(String, "[MURDERERWEAPART]")) {
9908IniRead, MurdererWeaponArt, ini/stats.ini, stats, MurdererWeaponArt, %A_Space%
9909StringReplace, String, String, [MURDERERWEAPART], %MurdererWeaponArt%, All
9910}
9911if (Instr(String, "[DEATHPLACE]")) {
9912IniRead, DeathPlace, ini/stats.ini, stats, DeathPlace, %A_Space%
9913StringReplace, String, String, [DEATHPLACE], %DeathPlace%, All
9914}
9915if (InStr(String, "[DAYTIME]")) {
9916dayTime := getDayTime()
9917StringReplace, String, String, [DAYTIME], %dayTime%, All
9918}
9919if (InStr(String, "[CALLER]")) {
9920Loop, Read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
9921{
9922if (RegExMatch(A_LoopReadLine, "Dein Handy klingelt\. Tippe \/pickup\. Anrufer\-ID\: (.*)")) {
9923RegExMatch(A_LoopReadLine, "Dein Handy klingelt\. Tippe \/pickup\. Anrufer\-ID\: (.*)", caller_)
9924}
9925}
9926caller := caller_1
9927if (caller_ == "") {
9928caller = Sir
9929} else {
9930caller := caller_1
9931}
9932StringReplace, String, String, [CALLER], %caller%, All
9933}
9934if (InStr(String, "[VHEALTH]")) {
9935if (isPlayerInAnyVehicle()) {
9936vHealth := Floor(getVehicleHealth() / 10)
9937}
9938StringReplace, String, String, [VHEALTH], %vHealth%, All
9939}
9940if (InStr(String, "[VMODELID]")) {
9941if (IsPlayerInAnyVehicle()) {
9942vModelID := GetVehicleModelId()
9943}
9944StringReplace, string, String, [VMODELID], %vModelID%, All
9945}
9946if (InStr(String, "[VMODEL]")) {
9947if (IsPlayerInAnyVehicle()) {
9948vModel := getVehicleModelName()
9949}
9950StringReplace, String, String, [VMODEL], %vModel%, All
9951}
9952if (InStr(String, "[VTYPE]")) {
9953if (isPlayerInAnyVehicle()) {
9954vType := getVehicleType()
9955}
9956StringReplace, String, String, [VTYPE], %vType%, All
9957}
9958if (InStr(String, "[VSPEED]")) {
9959if (isPlayerInAnyVehicle()) {
9960vSpeed := getVehicleSpeed()
9961}
9962StringReplace, String, String, [VSPEED], %vSpeed%, All
9963}
9964if (InStr(String, "[RED]")) {
9965color := "{8A0808}"
9966StringReplace, String, String, [RED], %color%, All
9967}
9968if (InStr(String, "[BLUE]")) {
9969color := "{01A9DB}"
9970StringReplace, String, String, [BLUE], %color%, All
9971}
9972if (InStr(String, "[GREY]")) {
9973color := "{A4A4A4}"
9974StringReplace, String, String, [GREY], %color%, All
9975}
9976if (InStr(String, "[PINK]")) {
9977color := "{DF01D7}"
9978StringReplace, String, String, [PINK], %color%, All
9979}
9980if (InStr(String, "[WHITE]")) {
9981color := "{FFFFFF}"
9982StringReplace, String, String, [WHITE], %color%, All
9983}
9984if (InStr(String, "[BLACK]")) {
9985color := "{000000}"
9986StringReplace, String, String, [BLACK], %color%, All
9987}
9988if (InStr(String, "[GREEN]")) {
9989color := "{088A68}"
9990StringReplace, String, String, [GREEN], %color%, All
9991}
9992if (InStr(String, "[YELLOW]")) {
9993color := "{FFBF00}"
9994StringReplace, String, String, [YELLOW], %color%, All
9995}
9996if (InStr(String, "[ORANGE]")) {
9997color := "{FF8000}"
9998StringReplace, String, String, [ORANGE], %color%, All
9999}
10000if (InStr(String, "[PURPLE]")) {
10001color := "{8000FF}"
10002StringReplace, String, String, [PURPLE], %color%, All
10003}
10004if (InStr(String, "[MAINCOLOR]")) {
10005color := "{000875}"
10006StringReplace, String, String, [MAINCOLOR], %color%, All
10007}
10008if (InStr(String, "[SECONDCOLOR]")) {
10009color := "{04B4AE}"
10010StringReplace, String, String, [SECONDCOLOR], %color%, All
10011}
10012if (InStr(String, "[KILLS]") || InStr(String, "[DEATHS]") || InStr(String, "[KD]")) {
10013IniRead, kills, ini/stats.ini, stats, kills, 0
10014IniRead, deaths, ini/stats.ini, stats, deaths, 0
10015kd := Round(kills / deaths, 3)
10016StringReplace, String, String, [KILLS], %kills%, All
10017StringReplace, String, String, [DEATHS], %deaths%, All
10018StringReplace, String, String, [KD], %kd%, All
10019}
10020if (InStr(String, "[DKILLS]") || InStr(String, "[DDEATHS]") || InStr(String, "[DKD]")) {
10021IniRead, dkills, ini/stats.ini, stats, dkills[%A_DD%:%A_MM%:%A_YYYY%], 0
10022IniRead, ddeaths, ini/stats.ini, stats, ddeaths[%A_DD%:%A_MM%:%A_YYYY%], 0
10023dkd := Round(dkills / ddeaths, 3)
10024StringReplace, String, String, [DKILLS], %dkills%, All
10025StringReplace, String, String, [DDEATHS], %ddeaths%, All
10026StringReplace, String, String, [DKD], %dkd%, All
10027}
10028if (InStr(String, "[MKILLS]") || InStr(String, "[MDEATHS]") || InStr(String, "[MKD]")) {
10029IniRead, mkills, ini/stats.ini, stats, mkills[%A_MM%:%A_YYYY%], 0
10030IniRead, mdeaths, ini/stats.ini, stats, mdeaths[%A_MM%:%A_YYYY%], 0
10031mkd := Round(mkills / mdeaths, 3)
10032StringReplace, String, String, [MKILLS], %mkills%, All
10033StringReplace, String, String, [MDEATHS], %mdeaths%, All
10034StringReplace, String, String, [MKD], %mkd%, All
10035}
10036if (InStr(String, "[STREAK]")) {
10037StringReplace, String, String, [STREAK], %streak%, All
10038}
10039return string
10040}
10041handleChatMessage(message, index, arr) {
10042global
10043if (RegExMatch(message, "^<< (\S+) hat den Auftrag ausgeführt und (\S+) für (.*)\$ getötet \((\S+)\)\. >>$", message_)) {
10044if (!hitmanSystem) {
10045SendInfo("Du bist Mitglied der Hitman-Agency.")
10046SendInfo("Aktiviere im GUI unter Einstellungen ganz unten 'Hitman-Systeme' um alles nutzen zu können.")
10047}
10048for index, entry in contractList {
10049if (entry["name"] == message_2) {
10050contractList.RemoveAt(index)
10051}
10052}
10053if (message_1 == getUserName()) {
10054if (message_4 == "Deathcontract") {
10055IniRead, contracts, ini/stats.ini, stats, contracts, 0
10056IniRead, dcontracts, ini/stats.ini, stats, dcontracts, 0
10057IniRead, contractmoney, ini/stats.ini, stats, contractmoney, 0
10058contracts ++
10059dcontracts ++
10060contractmoney += numberFormat(message_3)
10061IniWrite, % contracts, ini/stats.ini, stats, contracts
10062IniWrite, % dcontracts, ini/stats.ini, stats, dcontracts
10063IniWrite, % contractmoney, ini/stats.ini, stats, contractmoney
10064SendInfo("Du hast bereits " . cSecond . formatNumber(contracts) . cWhite . " Contracts (davon " . cSecond . formatNumber(dcontracts) . cWhite . " Deathcontracts) ausgeführt.")
10065SendInfo("Du hast bereits $" . cSecond . formatNumber(contractmoney) . cWhite . " durch Contracts verdient.")
10066} else if (message_4 == "offline") {
10067IniRead, contracts, ini/stats.ini, stats, contracts, 0
10068IniRead, ocontracts, ini/stats.ini, stats, ocontracts, 0
10069IniRead, contractmoney, ini/stats.ini, stats, contractmoney, 0
10070contracts ++
10071ocontracts ++
10072contractmoney += numberFormat(message_3)
10073IniWrite, % contracts, ini/stats.ini, stats, contracts
10074IniWrite, % ocontracts, ini/stats.ini, stats, ocontracts
10075IniWrite, % contractmoney, ini/stats.ini, stats, contractmoney
10076SendInfo("Du hast bereits " . cSecond . formatNumber(contracts) . cWhite . " Contracts (davon " . cSecond . formatNumber(ocontracts) . cWhite . " Offlinnecontracts) ausgeführt.")
10077SendInfo("Du hast bereits $" . cSecond . formatNumber(contractmoney) . cWhite . " durch Contracts verdient.")
10078}
10079}
10080} else if (RegExMatch(message, "^<< (\S+) hat den Auftrag ausgeführt und (\S+) für (.*)\$ getötet\. >>$", message_)) {
10081if (!hitmanSystem) {
10082SendInfo("Du bist Mitglied der Hitman-Agency.")
10083SendInfo("Aktiviere im GUI unter Einstellungen ganz unten 'Hitman-Systeme' um alles nutzen zu können.")
10084}
10085for index, entry in contractList {
10086if (entry["name"] == message_2) {
10087contractList.RemoveAt(index)
10088}
10089}
10090if (message_1 == getUserName()) {
10091IniRead, contracts, ini/stats.ini, stats, contracts, 0
10092IniRead, contractmoney, ini/stats.ini, stats, contractmoney, 0
10093contracts ++
10094contractmoney += numberFormat(message_3)
10095IniWrite, % contracts, ini/stats.ini, stats, contracts
10096IniWrite, % contractmoney, ini/stats.ini, stats, contractmoney
10097SendInfo("Du hast bereits " . cSecond . formatNumber(contracts) . cWhite . " Contracts ausgeführt.")
10098SendInfo("Du hast bereits $" . cSecond . formatNumber(contractmoney) . cWhite . " durch Contracts verdient.")
10099}
10100} else if (RegExMatch(message, "^Ein neuer Auftragsmord ist verfügbar. Spieler: (\S+) Auftragsprämie: (.*)\$$", message_)) {
10101if (!hitmanSystem) {
10102SendInfo("Du bist Mitglied der Hitman-Agency.")
10103SendInfo("Aktiviere im GUI unter Einstellungen ganz unten 'Hitman-Systeme' um alles nutzen zu können.")
10104}
10105for index, entry in contractList {
10106if (entry["name"] == message_1) {
10107entry["contract"] += numberFormat(message_2)
10108contractList.Push(entry)
10109return
10110}
10111}
10112contract := []
10113contract["name"] := message_1
10114contract["contract"] := message_2
10115contractList.Push(contract)
10116} else if (RegExMatch(message, "^\* Du hast (\d+)g für (.*)$ von (\S+) gekauft\.$", message_)) {
10117getItems()
10118} else if (RegExMatch(message, "^Du hast (\d+)g Marihuana in der Mülltonne gefunden\.$", message_)) {
10119getItems()
10120} else if (RegExMatch(message, "^Du hast ein Lagerfeuer gesetzt, dieses brennt ca\. 40 Sekunden\.$", message_)) {
10121getItems()
10122} else if (RegExMatch(message, "^Du hast dir ein Lagerfeuer gekauft\.$", message_)) {
10123getItems()
10124} else if (RegExMatch(message, "^Du hast ein Erstehilfe-Paket erworben \(-(\d+)\$\)\.$")) {
10125getItems()
10126} else if (RegExMatch(message, "^Du besitzt kein Erste-Hilfe-Paket\.$", message_)) {
10127getItems()
10128} else if (RegExMatch(message, "^Du hast ein Erstehilfe-Paket erworben \(-(.*)$\).$", message_)) {
10129getItems()
10130} else if (RegExMatch(message, "^Du hast ein Erste-Hilfe-Paket im Müll gefunden\.$", message_)) {
10131getItems()
10132} else if (RegExMatch(message, "\* Du hast für \$(.*) ein Erste-Hilfe-Paket von (\S+) gekauft\.$", message_)) {
10133getItems()
10134} else if (RegExMatch(message, "^\* (\S+) benutzt ein Erste-Hilfe-Paket und versorgt die Wunden\.$", message_)) {
10135if (message_1 == getUserName()) {
10136IniWrite, 600, ini/cooldown.ini, cooldown, pakcooldown
10137getItems()
10138}
10139} else if (RegExMatch(message, "^\* " . getUserName() . " hat Drogen konsumiert.$", message_)) {
10140getItems()
10141drugcooldown := 30
10142} else if (RegExMatch(message, "^(.*)g Drogen aus den Safe geholt\.$", message_)) {
10143getItems()
10144} else if (RegExMatch(message, "^(.*)g wurden in den Safe gelegt\.$", message_)) {
10145getItems()
10146} else if (RegExMatch(messfage, "^\* (\S+) hat deine (.*)g für (.*)\$ gekauft\.$", message_)) {
10147getItems()
10148} else if (RegExMatch(message, "^\* Du hast (.*)g für (.*)$ von (\S+) gekauft\.$", message_)) {
10149getItems()
10150} else if (RegExMatch(message, "^\[ AIRDROP \] (\S+) hat den Airdrop abgegeben und (.*)\.$", message_)) {
10151if (message_1 == getUserName()) {
10152getItems()
10153}
10154} else if (RegExMatch(message, "^Du hast (.*)g Drogen ausgelagert\.$", message_)) {
10155getItems()
10156} else if (RegExMatch(message, "^Du hast (.*)g Drogen eingelagert\.$", message_)) {
10157getItems()
10158} else if (RegExMatch(message, "^Du hast (.*)g Drogen für (.*)\$ erworben\.$", message_)) {
10159getItems()
10160} else if (RegExMatch(message, "^Es befindet sich zu wenig Kraftstoff im Fahrzeug, um den Motor zu starten\.$", message_)) {
10161SetTimer, RefillTimer, 1
10162} else if (RegExMatch(message, "^Paintball: (\S+) hat die Arena betreten\.$", message_)) {
10163if (message_1 == getUserName()) {
10164isPaintball := true
10165SendInfo("Der Paintball-Modus wurde " . cgreen . "angeschaltet" . cwhite . ".")
10166}
10167} else if (RegExMatch(message, "^\|=================\|\|============\|\|=================\|$")) {
10168Loop {
10169chat := arr[index - A_Index]
10170if (InStr(chat, "KFZ Steuer:")) {
10171RegExMatch(chat, "KFZ Steuer: -(\d*)\$", car)
10172isPayday ++
10173}
10174if (InStr(chat, "Lohn: ")) {
10175RegExMatch(chat, "Lohn: (.*)\$ \(davon (.*)\$ durch Upgrade und (.*)\$ durch Segnung\) Miete: -(.*)\$ Lohnsteuer: -(.*)\$", general)
10176isPayday ++
10177}
10178if (InStr(chat, "Stromrechnung: ")) {
10179RegExMatch(chat, "Stromrechnung: -(.*)\$", electricity)
10180isPayday ++
10181}
10182if (InStr(chat, "|================| Gehalts-Check |================|")) {
10183isPayday ++
10184break
10185}
10186}
10187money := numberFormat(general1)
10188money -= numberFormat(general4)
10189money -= numberFormat(general5)
10190money -= numberFormat(car1)
10191money -= numberFormat(electricity1)
10192if (isPayday > 0) {
10193Sleep, 100
10194SendInfo("Dein Gehaltscheck beläuft sich auf $" . cGreen . formatNumber(money) . cwhite . ".")
10195isPayday := 0
10196}
10197} else if (RegExMatch(message, "^(\S+) hat (\S+) zum Prison teleportiert für (\d+) Minuten, Grund: (.+)$", message_)) {
10198if (message_2 == getUserName()) {
10199IniRead, jailcooldown, ini/cooldown.ini, cooldown, jailcooldown, 0
10200if (jailcooldown > 0) {
10201jailcooldown += (prisonresult_2 * 60)
10202} else {
10203jailcooldown := (prisonresult_2 * 60)
10204}
10205IniWrite, % jailcooldown, ini/cooldown.ini, cooldown, jailcooldown
10206NewTime = %A_Now%
10207NewTime += jailcooldown, seconds
10208formatTime, Unprison, %NewTime%, HH:mm
10209SendInfo("Du bist um " . cSecond . Unprison . cWhite . " Uhr aus dem Prison.")
10210}
10211} else if (RegExMatch(message, "^\* (\S+) hat die Gesundheit regeneriert\.$", message_)) {
10212if (message_1 == getUserName()) {
10213healcooldown := 60
10214}
10215} else if (RegExMatch(message, "^\* Sanitäter (\S+) hat dich geheilt\.$", message_)) {
10216IniWrite, 0, ini/cooldown.ini, cooldown, deathcooldown
10217} else if (RegExMatch(message, "^Dein Handy klingelt\. Tippe \/pickup\. Anrufer-ID: (\S+)$", message_)) {
10218if (autoAb) {
10219checkAb()
10220}
10221} else if (RegExMatch(message, "^\* (\S+) hat dir ein Ticket für (.*)\$ gegeben, Grund: (.+)$", message_)) {
10222if (autoTicket) {
10223ticketName := message_1
10224ticketPrice := numberFormat(message_2)
10225SetTimer, TicketTimer, 1
10226}
10227} else if (RegExMatch(message, "^\* Sanitäter (\S+) bietet dir ein Erste-Hilfe-Paket für \$(\d+) an\. Benutze \/accept Paket$", message_)) {
10228if (autoPaket) {
10229medicName := message_1
10230SetTimer, PaketTimer, 1
10231}
10232} else if (RegExMatch(message, "^WARNUNG: Hör auf zu Spamen, sonst wirst du gekickt!$", message_)) {
10233if (antiSpam) {
10234blockChatInput()
10235SendInfo("Das Antispam System wurde " . cgreen . "aktiviert" . cwhite . ".")
10236SetTimer, SpamTimer, -1500
10237}
10238} else if (RegExMatch(message, "^\[ (.+) (.+): << (\S+), bleiben Sie SOFORT stehen! >> \]$", message_)) {
10239if (message_3 == getUserName()) {
10240SendChat("/f Hilfe in " . getPlayerZone() . "!! " . message_1 . " " . message_2 . " hat mich vorgewarnt!")
10241}
10242warn := []
10243warn["name"] := message_2
10244warn["place"] := getPlayerZone() . ", " . getPlayerCity()
10245warn["time"] := A_Hour . ":" . A_Min . ":" . A_Sec
10246warn["cooldown"] := 300
10247for i, in entry warnings {
10248if (entry["name"] == message_2) {
10249warnings.RemoveAt(i)
10250}
10251}
10252warnings.Push(warn)
10253} else if (RegExMatch(message, "^\* Du bist nun für (\S+) Sekunden im Gefängnis\.$", message_)) {
10254IniWrite, % message_1, ini/cooldown.ini, cooldown, jailcooldown
10255} else if (RegExMatch(message, "SMS: (.+), Sender: (\S+) \((\d+)\)", message_)) {
10256IniWrite, 1, ini/settings.ini, items, mobilePhone
10257if (overlay && startOverlay) {
10258ov_Info(0)
10259ov_Info()
10260}
10261} else if (RegExMatch(message, "\.\.\.(.+), Sender: (\S+) \((\d+)\)", message_)) {
10262IniWrite, 1, ini/settings.ini, items, mobilePhone
10263if (overlay && startOverlay) {
10264ov_Info(0)
10265ov_Info()
10266}
10267} else if (RegExMatch(message, "^Dein Handy klingelt\. Tippe \/pickup\. Anrufer-ID: (\S+)$", message_)) {
10268IniWrite, 1, ini/settings.ini, items, mobilePhone
10269if (overlay && startOverlay) {
10270ov_Info(0)
10271ov_Info()
10272}
10273} else if (RegExMatch(message, "^Der Gesprächspartner hat aufgelegt\.$")
10274|| RegExMatch(message, "^Du hast aufgelegt\.$")
10275|| RegExMatch(message,"^Die Verbindung zu deinem Gesprächspartner wurde unterbrochen\.$")) {
10276IniWrite, 1, ini/settings.ini, items, mobilePhone
10277if (overlay && startOverlay) {
10278ov_Info(0)
10279ov_Info()
10280}
10281} else if (RegExMatch(message, "\* (\S+) geht an sein Handy\.$", message_)) {
10282if (message_1 == getUserName()) {
10283IniWrite, 1, ini/settings.ini, items, mobilePhone
10284if (overlay && startOverlay) {
10285ov_Info(0)
10286ov_Info()
10287}
10288}
10289} else if (RegExMatch(message, "^Du hast dein Handy (\S+)\.$", message_)) {
10290if (InStr(message_1, "abgeschaltet")) {
10291IniWrite, 0, ini/settings.ini, items, mobilePhone
10292} else if (InStr(message_1, "angeschaltet")) {
10293IniWrite, 1, ini/settings.ini, items, mobilePhone
10294}
10295if (overlay && startOverlay) {
10296ov_Info(0)
10297ov_Info()
10298}
10299} else if (RegExMatch(message, "^\* Du hast einen (.+) \((\d+) LBS\) gegessen, es wurde deiner Gesundheit hinzugefügt.$", message_)) {
10300Loop, 5 {
10301if (message_1 == fishName_%A_Index%) {
10302if (message_2 == fishLBS_%A_Index%) {
10303fishName_%A_Index% := "nichts"
10304fishLBS_%A_Index% := 0
10305fishHP_%A_Index% := 0
10306}
10307}
10308}
10309if (overlay && startOverlay) {
10310ov_Info(0)
10311ov_Info()
10312}
10313} else if (RegExMatch(message, "^\* Du hast ein\/e (.+) mit (\d+) LBS gekocht\.$", message_)) {
10314Loop, 5 {
10315if (fishName%A_Index% == message_1) {
10316if (fishLBS%A_Index% == message_2) {
10317fishName%A_Index% := "nichts"
10318fishLBS%A_Index% := 0
10319fishHP%A_Index% := 0
10320fishPrice%A_Index% := 0
10321}
10322}
10323}
10324if (overlay && startOverlay) {
10325ov_Info(0)
10326ov_Info()
10327}
10328}
10329}
10330gk(id, store := "", showGK := false) {
10331global
10332result := URLDownloadToVar(gkURL . "api/newgk.php?gk=" . id)
10333if (result == "ERROR_CONNECTION") {
10334SendError("Fehler bei der Verbindung zum Server.")
10335} else if (result == "ERROR_BAD_LINK") {
10336SendError("Fehlerhafte Parameterübergabe.")
10337} else if (result == "ERROR_ACCESS_DENIED") {
10338SendError("Zugriff verweigert, das Passwort ist falsch.")
10339} else if (result == "ERROR_WRONG_FORMAT") {
10340SendError("Fehlerhaftes Format.")
10341} else if (result == "ERROR_NOT_FOUND") {
10342SendError("Der Komplex wurde nicht in der Datenbank gefunden.")
10343} else {
10344if (store == "") {
10345SendInfo("Gebäudekomplex " . cSecond . id . cwhite . ":")
10346}
10347try {
10348data := JSON.Load(result)
10349} catch {
10350SendError("Es ist ein unbekannter Fehler aufgetreten.")
10351return
10352}
10353for index, entry in data {
10354name := entry["name"]
10355location := ""
10356if (entry["type"] == "public") {
10357color := "{12C0EB}"
10358location := " (" . calculateZone(entry["x"], entry["y"], 0.0) . ", " . calculateCity(entry["x"], entry["y"], 0.0) . ")"
10359} else if (entry["type"] == "house") {
10360if (name == "Nobody") {
10361color := "{09B814}"
10362name := "Haus (frei)"
10363} else if (name == "Auktion im CP") {
10364color := "{B83109}"
10365name := "Haus (" . name . ")"
10366} else {
10367color := "{09B814}"
10368name := "Haus von " . name
10369}
10370location := " (" . calculateZone(entry["x"], entry["y"], 0.0) . ", " . calculateCity(entry["x"], entry["y"], 0.0) . ")"
10371} else if (entry["type"] == "faction") {
10372color := "{117ABB}"
10373location := " (" . calculateZone(entry["x"], entry["y"], 0.0) . ", " . calculateCity(entry["x"], entry["y"], 0.0) . ")"
10374} else if (entry["type"] == "vehicle") {
10375color := "{FF00FF}"
10376}
10377if (entry["x"] == -5000 || entry["y"] == -5000) {
10378location := ""
10379}
10380if (store != "") {
10381if (store == "BS" && name == "Burger Shot") {
10382} else if (store == "SM" && name == "24/7") {
10383} else if (store == "CB" && name == "Clucking Bell") {
10384} else if (store == "CS" && name == "Binco") {
10385} else if (store == "PS" && name == "Well Stacked Pizza") {
10386} else if (store == "DN" && name == "Donut Laden") {
10387} else {
10388continue
10389}
10390SendInfo("GK " . id . ": (ID: " . entry["type"] . "." . entry["id"] . ") " . color . name . location)
10391if (showGK) {
10392Sleep, 50
10393showGK(entry["type"] . "." . entry["id"], true)
10394}
10395} else {
10396SendInfo("[" . entry["type"] . "." . entry["id"] . "] " . color . name . location)
10397}
10398}
10399}
10400}
10401showGK(gk, ignoreExisting := false) {
10402if (RegExMatch(gk, "^(public|house|faction)\.(\d+)$", regex_)) {
10403result := UrlDownloadToVar(gkURL . "api/newgk.php?id=" . gk)
10404if (result == "ERROR_CONNECTION") {
10405SendError("Fehler bei der Verbindung zum Server.")
10406} else if (result == "ERROR_BAD_LINK") {
10407SendError("Fehlerhafte Parameterübergabe.")
10408} else if (result == "ERROR_ACCESS_DENIED") {
10409SendError("Zugriff verweigert, das Passwort ist falsch.")
10410} else if (result == "ERROR_WRONG_FORMAT") {
10411SendError("Fehlerhaftes Format.")
10412} else if (result == "ERROR_NOT_FOUND") {
10413SendError("Der Komplex wurde nicht in der Datenbank gefunden.")
10414} else {
10415try {
10416data := JSON.Load(result)
10417} catch {
10418SendError("Es ist ein unbekannter Fehler aufgetreten.")
10419return
10420}
10421if (IsMarkerCreated() && !ignoreExisting) {
10422SendInfo("Du kannst mit '" . cSecond . "X" . cWhite . "' bestätigen, wenn du den CP neu setzen willst.")
10423KeyWait, X, D, T10
10424if (ErrorLevel) {
10425return
10426}
10427}
10428zPos := data["z"]
10429if (zPos == -1) {
10430zPos := 20
10431}
10432if (setCheckpoint(data["x"], data["y"], zPos, 5.0)) {
10433SendInfo("Der Checkpoint wurde " . cGreen . "erfolgreich" . cWhite . " gesetzt.")
10434} else {
10435SendError("Beim Setzen des Checkpoints ist ein Fehler aufgetreten.")
10436}
10437}
10438} else {
10439SendError("Die ID wurde falsch formatiert. " . cWhite . "Beispiel: public.12")
10440}
10441}
10442stopFinding(key = 0) {
10443if (autoFindMode > 0) {
10444SetTimer, AutoFindTimer, Off
10445autoFindMode := 0
10446playerToFind := ""
10447playerToShowTo := ""
10448if (key) {
10449SendInfo("Das automatische Suchen wurde beendet.")
10450}
10451}
10452}
10453findPlayer() {
10454global
10455if (showDriver) {
10456passengers := getSeatIDs()
10457if (passengers) {
10458driver := passengers[1]
10459if (driver == -1 || driver == getId()) {
10460autoFindMode := 1
10461} else {
10462autoFindMode := 2
10463}
10464} else {
10465if (playerToShowTo == "") {
10466autoFindMode := 1
10467} else {
10468autoFindMode := 2
10469}
10470}
10471} else if (autoFindMode == 0) {
10472autoFindMode := 1
10473}
10474GoSub, AutoFindTimer
10475SetTimer, AutoFindTimer, 5500
10476if (showDriver && autoFindMode == 2) {
10477passengers := getSeatIDs()
10478if (passengers) {
10479driver := passengers[1]
10480if (driver == -1) {
10481driver := "niemand"
10482} else {
10483driver := getFullName(driver)
10484}
10485}
10486}
10487}
10488refillCar() {
10489global
10490if (isPlayerInAnyVehicle() && isPlayerDriver()) {
10491if (getVehicleEngineState()) {
10492SendChat("/motor")
10493Sleep, 250
10494if (InStr(readChatLine(0) . readChatLine(1), "Du fährst zu schnell, um den Motor abzustellen.")) {
10495Sleep, 1000
10496SendChat("/motor")
10497Sleep, 250
10498if (InStr(readChatLine(0) . readChatLine(1), "Du fährst zu schnell, um den Motor abzustellen.")) {
10499return
10500}
10501}
10502}
10503Sleep, 100
10504SendChat("/fill")
10505Sleep, 8800
10506if (!getVehicleEngineState()) {
10507SendChat("/motor")
10508Sleep, 2000
10509if (getVehicleLightState()) {
10510SendChat("/licht")
10511}
10512}
10513}
10514}
10515startFish() {
10516global
10517IniRead, fishcooldown, ini/cooldown.ini, cooldown, fishcooldown, 0
10518if (isPlayerAtFishPoint()) {
10519if (!fishcooldown) {
10520fishNumber := 0
10521aFishMoney := 0
10522aFishHP := 0
10523cheapestFish := -1
10524cheapestFishName := ""
10525cheapestFishValue := 100000
10526cheapestFishMoney := 100000
10527cheapestFishHP := 100000
10528thrownAway := false
10529attempt := 1
10530Loop {
10531SendChat("/fish")
10532Sleep, 200
10533fishing := readChatLine(0)
10534if (RegExMatch(fishing, "Du hast ein\/e (.+) mit (\d+) LBS gefangen.", fishing_)) {
10535fishNumber ++
10536currentFishMoney := getFishValue(fishing_1, fishing_2)
10537currentFishHealth := Floor(fishing_2 * 0.3)
10538if (ReleaseType) {
10539fishValue := currentFishMoney
10540} else {
10541fishValue := fishing_2
10542}
10543SendInfo(csecond . fishNumber . cwhite . ": " . fishing_1 . " LBS: " . csecond . fishing_2 . cwhite . " | Preis: $" . csecond . formatNumber(currentFishMoney) . cwhite . " | HP: " . csecond . currentFishHealth)
10544aFishMoney += numberFormat(currentFishMoney)
10545aFishHP += fishing_2
10546if (cheapestFishValue > fishValue) {
10547cheapestFish := fishNumber
10548cheapestFishName := fishing_1
10549cheapestFishValue := fishValue
10550cheapestFishMoney := currentFishMoney
10551cheapestFishHP := fishing_2
10552}
10553} else if (RegExMatch(fishing, "Du kannst nur 5 Fische bei dir tragen.")) {
10554if (cheapestFish == -1) {
10555SendError("Du musst deine Fische erst verkaufen!")
10556break
10557}
10558if (thrownAway)
10559break
10560aFishMoney -= cheapestFishMoney
10561aFishHP -= cheapestFishHP
10562SendChat("/releasefish " . cheapestFish)
10563Sleep, 200
10564if (ReleaseType) {
10565SendInfo(cscond . cheapestFishName . cWhite . ": " . cheapestFish . cwhite . " im Wert von $" . csecond . formatNumber(cheapestFishValue) . cwhite . " weggeworfen")
10566} else {
10567SendInfo(cscond . cheapestFishName . cWhite . ": " . cheapestFish . cwhite . " mit " . csecond . formatNumber(cheapestFishValue) . cwhite . " LBS weggeworfen")
10568}
10569thrownAway := true
10570} else if (RegExMatch(fishing, "Du bist an keinem Angelplatz \(Big Wheel Rods\) oder an einem Fischerboot!")) {
10571if (attempt == 3) {
10572SendError("Du kannst hier nicht angeln!")
10573break
10574}
10575attempt ++
10576} else if (RegExMatch(fishing, "Du kannst erst in (\d+) (\S+) wieder angeln\.", ftime_)) {
10577if (aFishMoney + aFishHP > 0) {
10578Sleep, 500
10579checkFish()
10580IniWrite, 900, ini/cooldown.ini, cooldown, fishcooldown
10581SendChat("/me holt seine Angelrute ein.")
10582break
10583} else {
10584SendError("Du kannst noch nicht angeln.")
10585break
10586}
10587}
10588}
10589} else {
10590SendError("Du kannst noch nicht fischen! (Gesperrt: " . cWhite . formatTime(fishcooldown) . cRed . ")")
10591}
10592} else {
10593if (fishcooldown) {
10594SendError("Du kannst noch nicht fischen! (Gesperrt: " . cWhite . formatTime(fishcooldown) . cRed . ")")
10595} else {
10596SendInfo("Du kannst fischen!")
10597}
10598}
10599if (overlay && startOverlay) {
10600ov_Info(0)
10601ov_Info()
10602}
10603}
10604sellFish() {
10605global
10606SellMoney := 0
10607if (getPlayerInteriorId() > 0) {
10608if (IsPlayerInRangeOfPoint(2.3247, -28.8923, 1003.5494, 5)) {
10609sellFishMoney := 0
10610Loop, 5 {
10611SendChat("/sell fish " . A_Index)
10612Sleep, 200
10613if (RegExMatch(readChatLine(0), "Du hast deinen (.+) \((\d+) LBS\) für (\d+)\$ verkauft.", chat_)) {
10614sellFishMoney += numberFormat(chat_3)
10615}
10616Sleep, 500
10617}
10618IniRead, FishingMoney, ini/stats.ini, stats, FishingMoney, 0
10619FishingMoney += sellFishMoney
10620IniWrite, %FishingMoney%, ini/stats.ini, stats, FishingMoney
10621SendInfo("Du hast für deine Fische $" . csecond . formatNumber(sellFishMoney) . cwhite . " erhalten.")
10622SendInfo("Gesamt hast du bereits $" . csecond . formatNumber(FishingMoney) . cwhite . " durch Fische verdient.")
10623} else {
10624SendError("Du bist an keiner Supermartkasse.")
10625}
10626} else {
10627SendError("Du bist in keinem Supermarkt.")
10628}
10629}
10630cookFish() {
10631global
10632IniRead, campfire, ini/settings.ini, items, campfire, 0
10633if (!getPlayerInteriorId() && campfire) {
10634SendChat("/campfire")
10635Sleep, 100
10636}
10637Loop, 5 {
10638SendChat("/cook fish " . A_Index)
10639Sleep, 650
10640}
10641checkCook()
10642}
10643openMaut() {
10644global
10645SendChat("/zoll")
10646Sleep, 200
10647if (inStr(readChatLine(0) . readChatLine(1), "Es ist keine Zollstation in deiner Nähe.")) {
10648Sleep, 400
10649SendChat("/zoll")
10650}
10651}
10652SendInfo(message) {
10653global
10654SendClientMessage(prefix . message)
10655}
10656SendError(message) {
10657global
10658SendClientMessage(prefix . cRed . "Fehler: " . message)
10659}
10660isBlocked() {
10661global
10662if (isInChat() || IsDialogOpen() || !IsSAMPAvailable()) {
10663return 1
10664} else {
10665return 0
10666}
10667}
10668isConnected() {
10669global
10670coords := getCoordinates()
10671if ((coords[1] == 384 && coords[2] == -1557 && coords[3] == 20) || (Round(coords[1]) == 1531 && Round(coords[2]) == -1734 && Round(coords[3]) == 13)) {
10672return false
10673}
10674return true
10675}
10676weaponShort(id) {
10677global
10678short := {0: "meiner", 1: "einem", 2: "einem", 3: "einem", 4: "einem", 5: "einem", 6: "einer", 7: "einem", 8: "einem", 9: "einer", 10: "einem", 11: "einem", 12: "einem", 13: "einem", 14: "einer", 15: "einem", 16: "einer", 17: "", 18: "einem", 22: "einer", 23: "einem", 24: "einer", 25: "einer", 26: "einer", 27: "einer", 28: "einer", 29: "einer", 30: "einer", 31: "einer", 32: "einer", 33: "einer", 34: "einer", 35: "einer", 36: "einer", 37: "einem", 38: "einer", 39: "einem", 40: "einem", 41: "einer", 42: "einem", 43: "einer"}
10679if (short[id]) {
10680return short[id]
10681}
10682return "einer"
10683}
10684getFraktionByID(id) {
10685fraction := ""
10686for index, entry in fractions {
10687if (entry[1] == id) {
10688fraction := entry[2]
10689break
10690}
10691}
10692return fraction
10693}
10694getFraktionColorByID(id) {
10695fractionColor := ""
10696if (id == 1) {
10697fractionColor := "{217BFF}"
10698} else if (id == 2) {
10699fractionColor := "{0E00DC}"
10700} else if (id == 4) {
10701fractionColor := "{AA3333}"
10702} else if (id == 5) {
10703fractionColor := "{85847F}"
10704} else if (id == 6) {
10705fractionColor := "{FFFFFF}"
10706} else if (id == 10) {
10707fractionColor := "{078C09}"
10708} else if (id == 11) {
10709fractionColor := "{9300FF}"
10710} else if (id == 12) {
10711fractionColor := "{0046FF}"
10712} else if (id == 15) {
10713fractionColor := "{00DCFF}"
10714} else if (id == 16) {
10715fractionColor := "{FFFF00}"
10716} else if (id == 17) {
10717fractionColor := "{FF8000}"
10718} else if (id == 22) {
10719fractionColor := "{5A4B3C}"
10720}
10721return fractionColor
10722}
10723getFraktionColorByName(name) {
10724fractionColor := ""
10725if (InStr(name, "LSPD")) {
10726fractionColor := "{217BFF}"
10727} else if (InStr(name, "FBI")) {
10728fractionColor := "{0E00DC}"
10729} else if (InStr(name, "Army")) {
10730fractionColor := "{AA3333}"
10731} else if (InStr(name, "Russen")) {
10732fractionColor := "{85847F}"
10733} else if (InStr(name, "Yakuza")) {
10734fractionColor := "{FFFFFF}"
10735} else if (InStr(name, "Grove")) {
10736fractionColor := "{078C09}"
10737} else if (InStr(name, "Ballas")) {
10738fractionColor := "{9300FF}"
10739} else if (InStr(name, "Chickos")) {
10740fractionColor := "{0046FF}"
10741} else if (InStr(name, "Rifa")) {
10742fractionColor := "{00DCFF}"
10743} else if (InStr(name, "Vagos")) {
10744fractionColor := "{FFFF00}"
10745} else if (InStr(name, "Triaden")) {
10746fractionColor := "{FF8000}"
10747} else if (InStr(name, "Biker")) {
10748fractionColor := "{5A4B3C}"
10749}
10750return fractionColor
10751}
10752getFraktionNameShort(name) {
10753nameShort := ""
10754if (InStr(name, "Russen")) {
10755nameShort := "Russen"
10756} else if (InStr(name, "Yakuza")) {
10757nameShort := "Yaku"
10758} else if (InStr(name, "Grove")) {
10759nameShort := "GS"
10760} else if (InStr(name, "Ballas")) {
10761nameShort := "Ballas"
10762} else if (InStr(name, "Chickos")) {
10763nameShort := "LCM"
10764} else if (InStr(name, "Rifa")) {
10765nameShort := "Rifa"
10766} else if (InStr(name, "Vagos")) {
10767nameShort := "Vagos"
10768} else if (InStr(name, "Triaden")) {
10769nameShort := "Triaden"
10770}
10771return nameShort
10772}
10773getFraktionBySkinID(id) {
10774fraction := 0
10775skins := {1: [260, 163, 164, 265, 266, 267, 280, 281, 283, 284, 288], 2: [165, 166, 286, 294, 11, 172, 194, 211, 59], 3: [287, 61], 5: [43, 111, 112, 113, 124, 125, 126, 127, 258, 272, 40], 6: [121, 122, 123, 186, 203, 204, 228, 169, 224], 10: [105, 106, 107, 269, 271, 65], 11: [102, 103, 104, 293, 13], 12: [46, 47, 48, 98, 185, 223, 249, 214], 16: [108, 109, 110, 292, 91], 22: [100, 247, 248, 254, 131]}
10776for fname, fskins in skins
10777{
10778for index, fskin in fskins
10779{
10780if (fskin == id) {
10781fraction := fname
10782break, 2
10783}
10784}
10785}
10786return fraction
10787}
10788getDamageWeapon(damage) {
10789global
10790weap := {"Deagle": [46, 47], "UZI/Tec9": [6, 7], "MP5": [8], "AK47/M4": [9, 10], "Rifle": [24, 25], "Sniper": [41, 42]}
10791for key, array in weap {
10792for index2, value2 in array {
10793if (value2 == damage) {
10794weap := key
10795Break, 2
10796} else {
10797weap := "Unbekannt"
10798}
10799}
10800}
10801if (weap) {
10802return weap
10803}
10804}
10805isPlayerInNoDM(x, y, z) {
10806result := ""
10807if (x < 1561.5 && x > 1387.8 && y < -1727.6 && y > -1870) {
10808result := 1
10809} else if(x > 1688.8 && x < 1820.8 && y < -1859.5 && y > -1961.2) {
10810result := 1
10811}
10812return result
10813}
10814getFishValue(fishName, fishWeight) {
10815global
10816if (fishName == "Bernfisch" || fishName == "Blauer Fächerfisch") {
10817value := fishWeight * 1
10818} else if (fishName == "Roter Schnapper" || fishName == "Schwertfisch" || fishName == "Zackenbarsch") {
10819value := fishWeight * 2
10820} else if (fishName == "Katzenfisch" || fishName == "Forelle") {
10821value := fishWeight * 3
10822} else if (fishName == "Delphin" || fishName == "Hai" || fishName == "Segelfisch") {
10823value := fishWeight * 4
10824} else if (fishName == "Makrele") {
10825value := fishWeight * 5
10826} else if (fishName == "Aal" || fishName == "Hecht") {
10827value := fishWeight * 6
10828} else if (fishName == "Schildkröte" || fishName == "Thunfisch" || fishName == "Wolfbarsch") {
10829value := fishWeight * 8
10830} else {
10831value := 0
10832}
10833return value
10834}
10835forceStats() {
10836global
10837if (!WinExist("GTA:SA:MP") || !WinActive("GTA:SA:MP")) {
10838return
10839}
10840blockDialog()
10841SendChat("/stats")
10842Sleep, 200
10843unblockDialog()
10844}
10845updateKD() {
10846global
10847IniRead, Kills, ini/stats.ini, stats, Kills, 0
10848IniRead, Deaths, ini/stats.ini, stats, Deaths, 0
10849if (Kills != getKill()) {
10850Kills := getKill()
10851iniWrite, %Kills%, ini/stats.ini, stats, Kills
10852SendInfo("Deine Kills wurden auf " . cSecond . formatNumber(Kills) . cwhite . " aktuallisiert.")
10853}
10854if (Deaths != getDeath()) {
10855Deaths := getDeath()
10856iniWrite, %Deaths%, ini/stats.ini, stats, Deaths
10857SendInfo("Deine Toden wurden auf " . cSecond . formatNumber(Deaths) . cwhite . " aktuallisiert.")
10858}
10859}
10860getKill() {
10861global
10862forceStats()
10863if (RegExMatch(getDialogText(), "(.*)Morde: (\d+)(.*)", kills_)) {
10864return kills_2
10865} else {
10866return -1
10867}
10868}
10869getDeath() {
10870global
10871forceStats()
10872if (RegExMatch(getDialogText(), "(.*)Gestorben: (\d+)(.*)", deaths_)) {
10873return deaths_2
10874} else {
10875return -1
10876}
10877}
10878getItems() {
10879global
10880forceStats()
10881if (RegExMatch(getDialogText(), "(.*)Drogen: (\d+)g(.*)", drugs_)) {
10882IniWrite, % drugs_2, ini/settings.ini, items, drugs
10883if (drugs_2 == 0) {
10884if (overlay && startOverlay) {
10885imageDestroy(ov_Drugs)
10886textDestroy(ov_DrugsText)
10887}
10888}
10889} else {
10890SendError("Beim Auslesen der Drogen ist ein Fehler aufgetreten.")
10891}
10892if (InStr(getDialogText(), "Erste-Hilfe-Paket")) {
10893IniWrite, 1, ini/settings.ini, items, firstaid
10894} else {
10895IniWrite, 0, ini/settings.ini, items, firstaid
10896if (overlay && startOverlay) {
10897imageDestroy(ov_Firstaid)
10898}
10899}
10900if (InStr(getDialogText(), "Benzin Kanister")) {
10901IniWrite, 1, ini/settings.ini, items, canister
10902} else {
10903IniWrite, 0, ini/settings.ini, items, canister
10904if (overlay && startOverlay) {
10905imageDestroy(ov_Canister)
10906}
10907}
10908if (InStr(getDialogText(), "Lagerfeuer")) {
10909if (RegExMatch(getDialogText(), "(.*)Lagerfeuer \((\d+)\)(.*)", campfire_)) {
10910iniWrite, % campfire_2, ini/settings.ini, items, campfire
10911}
10912} else {
10913iniWrite, 0, ini/settings.ini, items, campfire
10914if (overlay && startOverlay) {
10915imageDestroy(ov_Campfire)
10916textDestroy(ov_CampfireText)
10917}
10918}
10919if (overlay && startOverlay) {
10920ov_Info(0)
10921ov_Info()
10922}
10923}
10924getWanteds(setted = 0) {
10925global
10926forceStats()
10927if (InStr(getDialogText(), "Wanteds: ")) {
10928if (RegExMatch(getDialogText(), "(.*)Wanteds: (\d+)(.*)", out_)) {
10929iniWrite, % out_2, ini/settings.ini, items, wanteds
10930if (setted) {
10931if (out_2 > 0) {
10932SendInfo("Du hast nun " . out_2 . " Wanteds.")
10933} else {
10934SendInfo("Du hast nun keine Wanteds mehr.")
10935}
10936}
10937return out_2
10938}
10939}
10940return 0
10941}
10942checkAb() {
10943SendChat("/p")
10944SendChat("~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ Anrufbeantworter ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~")
10945Sleep, 1000
10946if (caller_1 == "") {
10947callmen = Anrufer
10948} else {
10949callmen := caller_1
10950}
10951SendChat("Sehr geehrter " . callmen . ",")
10952Sleep, 700
10953SendChat("Aktuell ist niemand in der Leitung, gerne können Sie eine Nachricht hinterlassen.")
10954Sleep, 700
10955SendChat("Dennoch wünscht Ihnen Herr " . getUserName() . " einen angenehmen " . getDayTime() . ".")
10956Sleep, 1000
10957SendChat("~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ Anrufbeantworter ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~")
10958Sleep, 700
10959SendChat("/h")
10960IniRead, autoAb, ini/settings.ini, settings, autoAb
10961if (autoAb) {
10962Sleep, 200
10963SendInfo("Du kannst den automatischen Anrufbeantworter mit '" . cSecond . "/autoAb" . cWhite . "' de/aktivieren.")
10964}
10965}
10966getPrisonTime() {
10967SendChat("/time")
10968Sleep, 200
10969adrGTA2 := getModuleBaseAddress("gta_sa.exe", hGTA)
10970cText := readString(hGTA, adrGTA2 + 0x7AAD43, 512)
10971if (instr(cText, "In Behandlung")) {
10972RegExMatch(cText, "(.*)In Behandlung: (\d+)", timeresult_)
10973Zeit := formatTime(timeresult_2)
10974NewText2 := ""
10975StringReplace, newText2, cText, In Behandlung: %timeresult_2% Sekunden, Noch %Zeit% im KH
10976writeString(hGTA, adrGTA2 + 0x7AAD43, NewText2)
10977InsideTime := timeresult_2
10978IniWrite, % InsideTime, ini/cooldown.ini, cooldown, deathcooldown
10979SendInfo("Du bist noch für " . cSecond . formatTime(timeresult_2) . cWhite . " im Krankenhaus.")
10980} else if (instr(cText, "Knastzeit")) {
10981RegExMatch(cText, "(.*)Knastzeit: (\d+)", timeresult_)
10982Zeit := formatTime(timeresult_2)
10983NewText2 := ""
10984StringReplace, newText2, cText, Knastzeit: %timeresult_2% Sekunden, Noch %Zeit% im Knast
10985writeString(hGTA, adrGTA2 + 0x7AAD43, NewText2)
10986InsideTime := timeresult_2
10987IniWrite, % InsideTime, ini/cooldown.ini, cooldown, jailcooldown
10988SendInfo("Du bist noch für " . cSecond . formatTime(timeresult_2) . cWhite . " im Knast.")
10989}
10990}
10991getFreeTime() {
10992SendChat("/time")
10993Sleep, 200
10994adrGTA2 := getModuleBaseAddress("gta_sa.exe", hGTA)
10995cText := readString(hGTA, adrGTA2 + 0x7AAD43, 512)
10996if (instr(cText, "Knastzeit")) {
10997RegExMatch(cText, "(.*)Knastzeit: (\d+)", timeresult_)
10998FreeTime = %A_Now%
10999FreeTime += timeresult_2, Seconds
11000formatTime, result, %FreeTime%, HH:mm
11001}
11002return result
11003}
11004shareKD(chat := "f") {
11005global
11006IniRead, kills, ini/stats.ini, stats, kills, 0
11007IniRead, dkills, ini/stats.ini, stats, dkills[%A_DD%:%A_MM%:%A_YYYY%], 0
11008IniRead, mkills, ini/stats.ini, stats, mkills[%A_MM%:%A_YYYY%], 0
11009IniRead, deaths, ini/stats.ini, stats, deaths, 0
11010IniRead, ddeaths, ini/stats.ini, stats, ddeaths[%A_DD%:%A_MM%:%A_YYYY%], 0
11011IniRead, mdeaths, ini/stats.ini, stats, mdeaths[%A_MM%:%A_YYYY%], 0
11012kd := round(kills/deaths, 2)
11013if (deaths == 0) {
11014kd := kills . ".00"
11015}
11016dkd := round(dkills/ddeaths, 2)
11017if (ddeaths == 0) {
11018dkd := dkills . ".00"
11019}
11020mkd := round(mkills/mdeaths, 2)
11021if (mdeaths == 0) {
11022mkd := mkills . ".00"
11023}
11024SendChat("/" . chat . " Aktuelle Kills: " . formatNumber(kills) . " - Aktuelle Tode: " . formatNumber(deaths))
11025SendChat("/" . chat . " Tages-Kills: " . dkills . " - Tages-Tode: " . ddeaths)
11026SendChat("/" . chat . " Monats-Kills: " . formatNumber(mkills) . " - Monats-Tode: " . formatNumber(mdeaths))
11027SendChat("/" . chat . " DKD: " . kd . " - MKD: " . mkd . " - KD: " . kd)
11028}
11029updatePlayerFraction(playerID) {
11030global SQLiteDB
11031playerName := getPlayerNameByID(playerID)
11032playerSkin := getTargetPlayerSkinIdById(playerID)
11033playerFraction := getFraktionBySkinID(playerSkin)
11034if (playerName != "" && playerID != -1 && playerSkin != -1 && !ErrorLevel) {
11035if (!SQLiteDB.Query("SELECT fraction FROM enemies WHERE name LIKE '" . playerName . "';", recordSet)) {
11036FileAppend, % "SQLite Error: Query - Msg: '" . recordSet.ErrorMsg . "' - Code: " . recordSet.ErrorCode, log.txt
11037return false
11038}
11039if (!recordSet.HasRows) {
11040if (SQLiteDB.exec("INSERT INTO enemies (name, fraction, updated) VALUES ('" . playerName . "', '" . playerFraction . "', '" . getUnixTimestamp(A_Now) . "');")) {
11041if (playerFraction != 0 && enemyAddedMessage) {
11042SendInfo(cSecond . playerName . cWhite . " (" . cSecond . getFraktionByID(playerFraction) . cWhite . ") wurde in die Gegnerliste aufgenommen.")
11043}
11044}
11045} else {
11046if (recordSet.Next(row)) {
11047oldFraction := row[1]
11048if (oldFraction != playerFraction) {
11049if (SQLiteDB.exec("UPDATE enemies SET name = '" . playerName . "', fraction = '" . playerFraction . "', updated = '" . getUnixTimestamp(A_Now) . "' WHERE name = '" . playerName . "';")) {
11050if (enemyUpdatedMessage) {
11051if (playerFraction != 0) {
11052SendInfo(cSecond . playerName . cWhite . " (" . cSecond . getFraktionByID(playerFraction) . cWhite . ") wurde in der Gegnerliste aktualisiert (Alte Fraktion: " . getFraktionByID(oldFraction) . ")")
11053} else {
11054SendInfo(cSecond . playerName . cWhite . " wurde aus der Gegnerliste entfernt (Alte Fraktion: " . getFraktionByID(oldFraction) . ")")
11055}
11056}
11057}
11058}
11059}
11060}
11061recordSet.Free()
11062return true
11063}
11064return false
11065}
11066showEnemyMessage(name, fraction) {
11067global debug
11068playerID := getPlayerIdByName(name, true)
11069if (ErrorLevel || playerID == -2) {
11070if (debug) {
11071SendError("Fehler beim Auslesen der ID von " . name . " (" . playerID . "): " . ErrorLevel)
11072}
11073return
11074}
11075if (playerID != -1) {
11076if (!onlineEnemies.HasKey(name)) {
11077onlineEnemies[name] := fraction
11078if (!firstEnemiesTimerRun) {
11079SendInfo(cSecond . name . cWhite . " (" . cSecond . getFraktionByID(fraction) . cWhite . ") ist " . cGreen . "online" . cWhite . " gekommen.")
11080}
11081}
11082} else {
11083if (onlineEnemies.HasKey(name)) {
11084onlineEnemies.Delete(name)
11085if (!firstEnemiesTimerRun) {
11086SendInfo(cSecond . name . cWhite . " (" . cSecond . getFraktionByID(fraction) . cWhite . ") ist " . cRed . "offline" . cWhite . " gegangen.")
11087}
11088}
11089}
11090}
11091hasFastUse() {
11092if (InStr(getUserName(), "Tremblay")
11093|| InStr(getUserName(), "Arias")
11094|| InStr(getUserName(), "Eden.")) {
11095return 1
11096} else {
11097return 0
11098}
11099}
11100isPlayerAtFishPoint() {
11101global
11102if (IsPlayerInRangeOfPoint(1610.3545, 599.4703, 7.7813, 2)
11103|| IsPlayerInRangeOfPoint(1606.8572, 599.4689, 7.7802, 2)
11104|| IsPlayerInRangeOfPoint(1603.3273, 599.4689, 7.7802, 2)
11105|| IsPlayerInRangeOfPoint(1599.8569, 599.8057, 7.7802, 2)
11106|| IsPlayerInRangeOfPoint(1596.3372, 599.7783, 7.7813, 2)
11107|| IsPlayerInRangeOfPoint(1592.8359, 599.4689, 7.7813, 2)
11108|| IsPlayerInRangeOfPoint(1589.3557, 599.4712, 7.7813, 2)
11109|| IsPlayerInRangeOfPoint(1585.8787, 599.4683, 7.7802, 2)
11110|| IsPlayerInRangeOfPoint(403.8053, -2088.7981, 7.8359, 2)
11111|| IsPlayerInRangeOfPoint(398.7274, -2088.7927, 7.8359, 2)
11112|| IsPlayerInRangeOfPoint(396.1470, -2088.7983, 7.8359, 2)
11113|| IsPlayerInRangeOfPoint(391.0635, -2088.7979, 7.8359, 2)
11114|| IsPlayerInRangeOfPoint(383.3910, -2088.6040, 7.8359, 2)
11115|| IsPlayerInRangeOfPoint(374.9511, -2088.6829, 7.8359, 2)
11116|| IsPlayerInRangeOfPoint(369.8314, -2088.7937, 7.8359, 2)
11117|| IsPlayerInRangeOfPoint(367.2829, -2088.7981, 7.8359, 2)
11118|| IsPlayerInRangeOfPoint(362.2083, -2088.7891, 7.8359, 2)
11119|| IsPlayerInRangeOfPoint(354.5507, -2088.7954, 7.8359, 2)
11120|| IsPlayerInRangeOfPoint(-2091.2231, 1436.5226, 7.1016, 2)
11121|| IsPlayerInRangeOfPoint(-2086.6912, 1436.4066, 7.1016, 2)
11122|| IsPlayerInRangeOfPoint(-2082.6958, 1436.1895, 7.1016, 2)
11123|| IsPlayerInRangeOfPoint(-2078.2371, 1436.4476, 7.1016, 2)
11124|| IsPlayerInRangeOfPoint(-2073.6873, 1436.2191, 7.1016, 2)
11125|| IsPlayerInRangeOfPoint(-2069.6814, 1436.1677, 7.1007, 2)
11126|| IsPlayerInRangeOfPoint(-2065.1917, 1436.3531, 7.1007, 2)) {
11127return 1
11128} else {
11129return 0
11130}
11131}
11132isPlayerAtCookPoint() {
11133global
11134if (IsPlayerInRangeOfPoint(376.3651, -61.0868, 1001.5078, 3)
11135|| IsPlayerInRangeOfPoint(377.7927, -57.4440, 1001.5078, 3)
11136|| IsPlayerInRangeOfPoint(369.5478, -6.0176, 1001.8589, 3)
11137|| IsPlayerInRangeOfPoint(374.0126, -113.5144, 1001.4922, 3)) {
11138return 1
11139} else {
11140return 0
11141}
11142}
11143isPlayerAtLocal() {
11144global
11145if (IsPlayerInRangeOfPoint(792.6970, -1626.2189, 13.3906, 3.1)
11146|| IsPlayerInRangeOfPoint(2412.0930, -1491.2977, 24.0000, 3.1)
11147|| IsPlayerInrangeOfPoint(2113.6445, -1788.6113, 13.5608, 3.1)
11148|| IsPlayerInrangeOfPoint(1026.6838, -1350.2480, 13.7266, 3.1)) {
11149return 1
11150} else {
11151return 0
11152}
11153}
11154isPlayerAtHeal() {
11155global
11156if (IsPlayerInRangeOfPoint(225, 121, 999, 5)
11157|| IsPlayerInRangeOfPoint(197, 168, 1003, 5)
11158|| IsPlayerInRangeOfPoint(2316, -2019, 13, 5)
11159|| IsPlayerInRangeOfPoint(2324, -1148, 1050, 5)
11160|| IsPlayerInRangeOfPoint(418.7545, -83.8548, 1001, 5)
11161|| IsPlayerInRangeOfPoint(-794.9179, 490.1421, 1376, 5)
11162|| IsPlayerInRangeOfPoint(774.3298, -49.7077, 1000, 5)) {
11163return 1
11164} else {
11165return 0
11166}
11167}
11168isPlayerAtGasStation() {
11169global
11170if (isPlayerInRangeOfPoint(700, -1930, 0, 30) || isPlayerInRangeOfPoint(1833, -2431, 14, 30)) {
11171return 2
11172} else if (isPlayerInRangeOfPoint(615, 1689, 7, 6)
11173|| isPlayerInRangeOfPoint(-1328, 2677, 40, 6)
11174|| isPlayerInRangeOfPoint(1596, 2199, 11, 6)
11175|| isPlayerInRangeOfPoint(2202, 2474, 11, 6)
11176|| isPlayerInRangeOfPoint(2114, 920, 11, 6)
11177|| isPlayerInRangeOfPoint(-2408, 976, 45, 6)
11178|| isPlayerInRangeOfPoint(-2029, 156, 29, 6)
11179|| isPlayerInRangeOfPoint(-1676, 414, 7, 6)
11180|| isPlayerInRangeOfPoint(1004, -939, 43, 6)
11181|| isPlayerInRangeOfPoint(1944, -1773, 14, 6)
11182|| isPlayerInRangeOfPoint(-90, -1169, 3, 6)
11183|| isPlayerInRangeOfPoint(-1605, -2714, 49, 6)
11184|| isPlayerInRangeOfPoint(-2243, -2560, 32, 6)
11185|| isPlayerInRangeOfPoint(1381, 457, 20, 6)
11186|| isPlayerInRangeOfPoint(70, 1218, 19, 6)
11187|| isPlayerInRangeOfPoint(1555, -1605, 14, 6)) {
11188return 1
11189} else {
11190return 0
11191}
11192}
11193isPlayerAtMaut() {
11194global
11195if (isPlayerInRangeOfPoint(1733.47, 546.37, 26, 10)
11196|| isPlayerInRangeOfPoint(1741.11, 543.47, 26, 10)
11197|| isPlayerInRangeOfPoint(1744.03, 523.63, 27, 10)
11198|| isPlayerInRangeOfPoint(1752.71, 521.69, 27, 10)
11199|| isPlayerInRangeOfPoint(512.54, 476.62, 18, 10)
11200|| isPlayerInRangeOfPoint(529.22, 467.21, 18, 10)
11201|| isPlayerInRangeOfPoint(-159.79, 414.18, 11, 10)
11202|| isPlayerInRangeOfPoint(-157.44, 392.24, 11, 10)
11203|| isPlayerInRangeOfPoint(-1408.23, 824.19, 47, 10)
11204|| isPlayerInRangeOfPoint(-1414.77, 803.59, 47, 10)
11205|| isPlayerInRangeOfPoint(-2695.05, 1284.63, 55, 10)
11206|| isPlayerInRangeOfPoint(-2686.34, 1284.24, 55, 10)
11207|| isPlayerInRangeOfPoint(-2676.62, 1265.37, 55, 10)
11208|| isPlayerInRangeOfPoint(-2668.18, 1264.91, 55, 10)
11209|| isPlayerInRangeOfPoint(-963.08, -343.05, 36, 10)
11210|| isPlayerInRangeOfPoint(-968.00, -322.33, 36, 10)
11211|| isPlayerInRangeOfPoint(-71.76, -892.47, 15, 10)
11212|| isPlayerInRangeOfPoint(-68.74, -867.96, 15, 10)
11213|| isPlayerInRangeOfPoint(100.20, -1284.37, 14, 10)
11214|| isPlayerInRangeOfPoint(94.40, -1277.82, 14, 10)
11215|| isPlayerInRangeOfPoint(97.19, -1254.11, 14, 10)
11216|| isPlayerInRangeOfPoint(94.69, -1245.59, 14, 10)
11217|| isPlayerInRangeOfPoint(42.71, -1537.98, 5, 10)
11218|| isPlayerInRangeOfPoint(58.02, -1524.93, 5, 10)) {
11219return 1
11220} else {
11221return 0
11222}
11223}
11224isPlayerAtGate() {
11225global
11226if (isPlayerInRangeOfPoint(1879.1038, 703.0863, 10.8203, 10.0)
11227|| isPlayerInRangeOfPoint(2107.4309, 1385.0104, 10.8203, 10.0)
11228|| isPlayerInRangeOfPoint(2089.2380, 1433.0774, 10.8203, 10.0)
11229|| isPlayerInRangeOfPoint(2519.9480, 1823.1888, 10.8203, 10.0)
11230|| isPlayerInRangeOfPoint(2605.6521, 2303.4177, 10.8232, 10.0)) {
11231return 1
11232} else {
11233return 0
11234}
11235}
11236isPlayerAtSearch() {
11237global
11238if (isPlayerInrangeOfPoint(2279.7222, -2029.4296, 13.5469, 1) || IsPlayerInRangeOfPoint(2279.6758, -2037.1691, 14.3479, 1) || IsPlayerInRangeOfPoint(2275.4285, -2035.1544, 14.3479, 1)
11239|| IsPlayerInRangeOfPoint(2267.6609, -2037.8624, 13.5469, 1) || IsPlayerInRangeOfPoint(2266.2869, -2037.7008, 13.5469, 1) || IsPlayerInRangeOfPoint(2264.8374, -2037.7358, 13.5469, 1)
11240|| IsPlayerInRangeOfPoint(2263.5015, -2037.6860, 13.5469, 1) || IsPlayerInRangeOfPoint(2256.2861, -2035.5635, 13.5469, 1) || IsPlayerInRangeOfPoint(2252.6956, -2032.1168, 13.5469, 1)) {
11241return 1
11242} else {
11243return 0
11244}
11245}
11246isPlayerAtOutbreak() {
11247global
11248if (isPlayerInRangeOfPoint(2292.0654, -2028.7762, 13.5469, 3.0)
11249|| isPlayerInRangeOfPoint(2326.0203, -2009.9911, 13.5469, 3.0)) {
11250return 1
11251} else {
11252return 0
11253}
11254}
11255ov_Spotify(create := 1) {
11256global
11257if (create) {
11258ov_spotify := textCreate("Arial", 9, true, false, spotifyXPos, spotifyYPos, 0xFFFFFFFF, "", true, true)
11259} else {
11260textDestroy(ov_spotify)
11261}
11262}
11263ov_Ping(create := 1) {
11264global
11265if (create) {
11266ov_Ping := textCreate("Arial", 7, true, false, pingXPos, pingYPos, 0xFFFFFFFF, "", true, true)
11267} else {
11268textDestroy(ov_Ping)
11269}
11270}
11271ov_Enemy(create := 1) {
11272global
11273if (create) {
11274ov_Enemy := textCreate(enemyFont, enemySize, enemyBold, enemyItal, enemyX, enemyY, 0xFFFFFFFF, "", true, true)
11275SetTimer, EnemyOverlayTimer, 1000
11276} else {
11277textDestroy(ov_Enemy)
11278}
11279}
11280ov_Cooldown(create := 1) {
11281global
11282if (create) {
11283if (cooldownBoxOv) {
11284ov_CooldownBox := boxCreate(cooldownBoxX, cooldownBoxY, 150, 125, 0xAA000000, true)
11285ov_CooldownBoxBorder := boxSetBorder(ov_CooldownBox, 4, true)
11286boxSetBorderColor(ov_CooldownBoxBorder, cooldownBoxBorderColor)
11287}
11288ov_Cooldown := textCreate("Arial", 8, true, false, cooldownXPos, cooldownYPos, 0xFFFFA600, "", true, true)
11289} else {
11290boxDestroy(ov_CooldownBox)
11291textDestroy(ov_Cooldown)
11292}
11293}
11294ov_Info(create := 1) {
11295global
11296if (create) {
11297if (infoOv) {
11298IniRead, mobilePhone, ini/settings.ini, items, mobilePhone, 0
11299IniRead, firstaid, ini/settings.ini, items, firstaid, 0
11300IniRead, canister, ini/settings.ini, items, canister, 0
11301IniRead, campfire, ini/settings.ini, items, campfire, 0
11302IniRead, drugs, ini/settings.ini, items, drugs, 0
11303IniRead, lockpick, ini/settings.ini, items, lockpick, 0
11304if (mobilePhone) {
11305ov_Phone := imageCreate("images\Overlay\phoneOn.png", infoPhoneX, infoPhoneY, 0, true, true)
11306} else {
11307ov_Phone := imageCreate("images\Overlay\phoneOff.png", infoPhoneX, infoPhoneY, 0, true, true)
11308}
11309if (firstaid) {
11310ov_Firstaid := imageCreate("images\Overlay\firstaid.png", infoFirstaidX, infoFirstaidY, 0, true, true)
11311}
11312if (canister) {
11313if (isPlayerInAnyVehicle() && getVehicleType() != 6) {
11314ov_Canister := imageCreate("images\Overlay\canister.png", infoCanisterX, infoCanisterY, 0, true, true)
11315}
11316}
11317if (campfire) {
11318ov_Campfire := imageCreate("images\Overlay\campfire.png", infoCampfireX, infoCampfireY, 0, true, true)
11319ov_CampfireText := textCreate("Arial", 9, true, false, infoCampfireX + 10, infoCampfireY + 14, 0xFFFFFFFF, campfire, true, true)
11320}
11321if (drugs) {
11322ov_Drugs := imageCreate("images\Overlay\drugs.png", infoDrugsX, infoDrugsY, 0, true, true)
11323ov_DrugsText := textCreate("Arial", 9, true, false, infoDrugsX + 11, infoDrugsY + 14, 0xFFFFFFFF, drugs, true, true)
11324}
11325hasCookedFish := 0
11326Loop, 5 {
11327if (fishName_%A_Index% != "nichts" && fishHP_%A_Index% > 0) {
11328hasCookedFish ++
11329}
11330}
11331if (hasCookedFish) {
11332ov_Fish := imageCreate("images\Overlay\fishCooked.png", infoFishCookedX, infoFishCookedY, 0, true, true)
11333ov_FishText := textCreate("Arial", 9, true, false, infoFishCookedX + 8, infoFishCookedY + 8, 0xFFFFFFFF, hasCookedFish, true, true)
11334}
11335hasFish := 0
11336Loop, 5 {
11337if (fishName%A_Index% != "nichts" && fishHP%A_Index% > 0) {
11338hasFish ++
11339}
11340}
11341if (hasFish) {
11342ov_UncookedFish := imageCreate("images\Overlay\fishUncooked.png", infoFishUncookedX, infoFishUncookedY, 0, true, true)
11343ov_UncookedFishText := textCreate("Arial", 9, true, false, infoFishUncookedX + 8, infoFishUncookedY + 8, 0xFFFFFFFF, hasFish, true, true)
11344}
11345}
11346} else {
11347imageDestroy(ov_Phone)
11348imageDestroy(ov_Firstaid)
11349imageDestroy(ov_Canister)
11350imageDestroy(ov_Campfire)
11351imageDestroy(ov_Drugs)
11352imageDestroy(ov_Fish)
11353imageDestroy(ov_UncookedFish)
11354textDestroy(ov_DrugsText)
11355textDestroy(ov_FishText)
11356textDestroy(ov_CampfireText)
11357textDestroy(ov_UncookedFishText)
11358}
11359}
11360ov_UpdatePosition(id) {
11361global
11362if (id == 1) {
11363if (spotifyOv) {
11364textSetPos(ov_spotify, spotifyXPos, spotifyYPos)
11365}
11366} else if (id == 2) {
11367if (cooldownOv) {
11368if (cooldownBoxOv) {
11369boxSetPos(ov_CooldownBox, cooldownBoxX, cooldownBoxY)
11370}
11371textSetPos(ov_Cooldown, cooldownXPos, cooldownYPos)
11372}
11373} else if (id == 3) {
11374if (pingOv) {
11375textSetPos(ov_Ping, pingXPos, pingYPos)
11376}
11377} else if (id == 4) {
11378if (infoOv) {
11379imageSetPos(ov_Phone, infoPhoneX, infoPhoneY)
11380}
11381} else if (id == 5) {
11382if (infoOv) {
11383imageSetPos(ov_Firstaid, infoFirstaidX, InfoFirstaidY)
11384}
11385} else if (id == 6) {
11386if (infoOv) {
11387if (isPlayerInAnyVehicle()) {
11388imageSetPos(ov_Canister, infoCanisterX, infoCanisterY)
11389}
11390}
11391} else if (ovMoveMode == 7) {
11392if (infoOv) {
11393textSetPos(ov_FishText, infoFishCookedX + 8, infoFishCookedY + 8)
11394imageSetPos(ov_Fish, infoFishCookedX, infoFishCookedY)
11395}
11396} else if (ovMoveMode == 8) {
11397if (infoOv) {
11398textSetPos(ov_UncookedFishText, infoFishUncookedX + 8, infoFishUncookedY + 8)
11399imageSetPos(ov_UncookedFish, infoFishUncookedX, infoFishUncookedY)
11400}
11401} else if (ovMoveMode == 9) {
11402if (infoOv) {
11403textSetPos(ov_CampfireText, infoCampfireX + 10, infoCampfireY + 14)
11404imageSetPos(ov_Campfire, infoCampfireX, infoCampfireY)
11405}
11406} else if (ovMoveMode == 10) {
11407if (infoOv) {
11408textSetPos(ov_DrugsText, infoDrugsX + 11, infoDrugsY + 14)
11409imageSetPos(ov_Drugs, infoDrugsX, infoDrugsY)
11410}
11411} else if (ovMoveMode == 11) {
11412if (enemyOv) {
11413textSetPos(ov_Enemy, enemyX, enemyY)
11414}
11415}
11416}
11417destroyOverlay() {
11418global
11419SetTimer, loadOverlay, off
11420imageDestroy(ov_Phone)
11421imageDestroy(ov_Firstaid)
11422imageDestroy(ov_Canister)
11423imageDestroy(ov_Campfire)
11424imageDestroy(ov_Drugs)
11425imageDestroy(ov_Fish)
11426textDestroy(ov_UncookedFishText)
11427textDestroy(ov_Cooldown)
11428textDestroy(ov_Ping)
11429textDestroy(ov_spotify)
11430textDestroy(ov_Enemy)
11431destroyAllVisual()
11432}
11433debug(message) {
11434global
11435if (debugMode == true) {
11436SendInfo("[DEBUG]: " . message)
11437}
11438}