Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'THEVIDEOVOLCANO/RGSOFTWARE
- Imports GTA
- Public Class TTimer
- Public Shared Sub SetTimer()
- Native.Function.Call(Native.Hash.SETTIMERA, 0)
- End Sub
- Public Shared ReadOnly Property ElapsedMilliSeconds() As Int32
- Get
- Return Native.Function.Call(Of Int32)(Native.Hash.TIMERA)
- End Get
- End Property
- Public Shared ReadOnly Property GameDuration(ByVal unit As TimeUnit) As Int32
- Get
- Dim dura As Int32 = Native.Function.Call(Of Int32)(Native.Hash.GET_GAME_TIMER)
- If unit <> TimeUnit.Milliseconds Then
- Return dura / unit
- End If
- Return dura
- End Get
- End Property
- Public Shared ReadOnly Property GameDuration() As Int32
- Get
- Return Native.Function.Call(Of Int32)(Native.Hash.GET_GAME_TIMER)
- End Get
- End Property
- Public Enum TimeUnit
- Milliseconds = 0
- Seconds = 1000
- Minutes = 60 * Seconds
- Hours = 60 * Minutes
- Day = 23 * Hours
- End Enum
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement