How to code AHK, automatically get ID in samp

Ask gaming related questions (AHK v1.1 and older)
hhoanghh11
Posts: 2
Joined: 14 Jun 2021, 04:16

How to code AHK, automatically get ID in samp

15 Jun 2021, 01:55

I'm looking for AHK to manually enter the player ID in samp
for example: Tien Chibi (239) can be a taxi
id=239
chibi=playername
command to receive call t/taxi ID enter
IDs change constantly. How to code ahk so that it automatically recognizes that id from chatlog.txt and sends a command to receive call. who help. Thank you very much!
hhoanghh11
Posts: 2
Joined: 14 Jun 2021, 04:16

Re: How to code AHK, automatically get ID in samp

15 Jun 2021, 05:50

Code: Select all

F3::
; FileRead, Logs, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
Logs = Playername (342) get a taxi ; Replace this example with above commented line.
ID = 342

FoundPos  RegExMatch(Logs, "O)(.*) (?<id>\d+)", SubPat)
Msgbox % ": "getidi subpat["id"]
send t/ataxi [id]
[Mod edit: [code][/code] tags added.]
I managed to write a few things that go out of the game when I press F3. AI know code as any support with

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 79 guests