wats wrong with this weapon code

Posts 1–4 of 4 · Page 1 of 1
wats wrong with this weapon code
Private Sub Timer9_Timer()
If GetAsyncKeyState(vbKeyControl) <> 0 And GetAsyncKeyState(vbKeyB) <> 0 Then
Dim weapons As Long
Dim weapons1 As Long
Dim weapons2 As Single
Call ReadALong("Warrock", &H896E28, weapons)
weapons1 = weapons + &H4C
weapons2 = Text4.Text
Call WriteAFloat("Warrock", weapons1, weapons2)
End If
End Sub
------------------------------------
added this is the command button
Timer9.Interval = 1
-------------------------------------
it makes warrock pause and then exits the whole game and i need to reopen it to play again
your trying to write a single for the weapon value instead of a long. Single is a float basically. Dim the weapon value as a long and use writelong
Quote Originally Posted by Stranger00 View Post
your trying to write a single for the weapon value instead of a long. Single is a float basically. Dim the weapon value as a long and use writelong
Private Sub Timer9_Timer()
If GetAsyncKeyState(vbKeyControl) <> 0 And GetAsyncKeyState(vbKeyB) <> 0 Then
Dim weapons As Long
Dim weapons1 As Long
Dim weapons2 As Long
Call ReadALong("Warrock", &H896E28, weapons)
weapons1 = weapons + &H4C
weapons2 = Text4.Text
Call WriteALong("Warrock", weapons1, weapons2)
End If
End Sub


so like that ^
Yeah that should work. You did put the module that needed for that into your project right? w/o that none of the functions (like WriteALong or ReadALong) will work.

Edit: Make sure your timer is enabled. I think it is by default though.
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?