Created
February 14, 2017 15:43
-
-
Save LuxXx/185b03010f3e0af3fda1123f930a481e to your computer and use it in GitHub Desktop.
Set Time for SAMP AHK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; sets the ingame hour (day/night) | |
; @author luxdav aka David_Luchs | |
; @param hour the time between 0 and 23 | |
setTime(hour) | |
{ | |
if(!checkHandles()) | |
return | |
; disable gta setTime function | |
VarSetCapacity(nop, 6, 0) | |
Loop 6 { | |
NumPut(0x90,nop,A_INDEX-1,"UChar") | |
} | |
writeRaw(hGTA, 0x52D168, &nop, 6) | |
; set our own weather | |
VarSetCapacity(time, 1, 0) | |
NumPut(hour, time,0,"Int") | |
writeRaw(hGTA, 0xB70153, &time, 1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment