Skip to content

Commit 37a82e1

Browse files
authored
Update API.ahk
added missing functions and changed names
1 parent 2f7e2db commit 37a82e1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

API.ahk

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,16 @@ isFloat(arg) {
340340
return false
341341
}
342342

343+
IntToHex(value, prefix := true) {
344+
CurrentFormat := A_FormatInteger
345+
SetFormat, Integer, hex
346+
value += 0
347+
SetFormat, Integer, %CurrentFormat%
348+
Int2 := SubStr(value, 3)
349+
StringUpper value, Int2
350+
return (prefix ? "0x" : "") . value
351+
}
352+
343353
evaluateString(string) {
344354
static sc := ComObjCreate("ScriptControl")
345355
sc.Language := "JScript"
@@ -1008,7 +1018,7 @@ pressDialogButton(button) {
10081018
}
10091019

10101020
blockDialog() {
1011-
return checkHandles() && NOP(hGTA, dwSAMP + 0x6C014, 7)
1021+
return checkHandles() && __NOP(hGTA, dwSAMP + 0x6C014, 7)
10121022
}
10131023

10141024
unblockDialog() {
@@ -1447,7 +1457,7 @@ setWanteds(wanteds) {
14471457
}
14481458

14491459
checkSendCMDNOP() {
1450-
return checkHandles() && NOP(hGTA, dwSAMP + 0x65DF8, 5) && NOP(hGTA, dwSAMP + 0x65E45, 5)
1460+
return checkHandles() && __NOP(hGTA, dwSAMP + 0x65DF8, 5) && __NOP(hGTA, dwSAMP + 0x65E45, 5)
14511461
}
14521462

14531463
patchSendSay(toggle := true) {

0 commit comments

Comments
 (0)