VB Code:
Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim CX, CY As Integer
Dim CursorPosition As PointAPI
GetCursorPos CursorPosition
CX = CursorPosition.x
CY = CursorPosition.y
If HoldSilPistol = True And CX <= MainFigure.Left - 600 Then
Image2.MouseIcon = LoadPicture(App.Path & "\data\images\Entities\nopistol.ico")
ElseIf HoldSilPistol = True And CX >= MainFigure.Left + MainFigure.Width + 600 Then
Image2.MouseIcon = LoadPicture(App.Path & "\data\images\Entities\nopistol.ico")
Else
Image2.MouseIcon = silpistol.Picture
End If
End Sub
nopistol.ico is a gun picture with a cross over it showing that the user cant shoot here. But if the cursor is within 600 twips of the player, it shows the pistol icon.