VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



make a cool slot machine game!

by Dwight Luscombe (1 Submission)
Category: Games
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 1st September 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

make a cool slot machine game!

API Declarations


Dim Bankroll As Integer

Rate make a cool slot machine game!



MsgBox " You ended with" + Str(Bankroll) + " points.", vbOKOnly, "GAME OVER"
End
End Sub

Private Sub cmdSpin_Click()
If Bankroll = 0 Then
    MsgBox " HA! YOU ARE OUT OF MONEY! SUCKER!", vbOKOnly, "GAME OVER"
    End
    End If
    Bankroll = Bankroll - 1
    lblBank.Caption = Str(Bankroll)
    timSpin.Enabled = True
    timDone.Enabled = True
End Sub

Private Sub Form_Load()
Randomize Timer
Bankroll = Val(lblBank.Caption)
End Sub

Private Sub imgBandit_Click(Index As Integer)

End Sub

Private Sub imgChoice_Click(Index As Integer)

End Sub

Private Sub timDone_Timer()
Dim P0 As Integer, P1 As Integer, P2 As Integer
Dim Winnings As Integer
Const FACE = 3
timSpin.Enabled = False
timDone.Enabled = False
P0 = Int(Rnd * 4)
P1 = Int(Rnd * 4)
P2 = Int(Rnd * 4)
imgBandit(0).Picture = imgChoice(P0).Picture
imgBandit(1).Picture = imgChoice(P1).Picture
imgBandit(2).Picture = imgChoice(P2).Picture
If P0 = FACE Then
    Winnings = 1
    If P1 = FACE Then
    Winnings = 3
    If P2 = FACE Then
    Winnings = 10
End If
End If
ElseIf P0 = P1 Then
    Winnings = 2
    If P1 = P2 Then Winnings = 4

    End If
Bankroll = Bankroll = Winnings
lblBank.Caption = Str(Bankroll)
End Sub

Private Sub timSpin_Timer()
imgBandit(0).Picture = imgChoice(Int(Rnd * 4)).Picture
imgBandit(1).Picture = imgChoice(Int(Rnd * 4)).Picture
imgBandit(2).Picture = imgChoice(Int(Rnd * 4)).Picture
End Sub


Download this snippet    Add to My Saved Code

make a cool slot machine game! Comments

No comments have been posted about make a cool slot machine game!. Why not be the first to post a comment about make a cool slot machine game!.

Post your comment

Subject:
Message:
0/1000 characters