Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Sorry To Post Again Need Help.


adamsharp
 Share

Recommended Posts

Hey Its Me And Ive Got 2 Commands That I need Debugging thanks

```
Case "/get 4 25"
If CanTake(Index, 1, 25) = True Then
    Dim G4
    G4 = Rand(1,6)
    If G4 = 4 Then
    Call PlayerMsg(index, "Well done You Win"
    Call GivePlayerItem(Index, 1, 75)
    Else
    Call TakeItem(Index, 1, 25)
    Exit Sub

```
And

```
Case "/money"
If GetPlayerAccess(Index) > 0 Then
Call GivePlayerItem(Index, 1, 1000)
Exit Sub

```
Thanks, Adamsharp.
Link to comment
Share on other sites

```
case "/get425
    Dim G4
    G4 = Rand(1,6)
If CanTake(Index, 1, 25) = True Then
    If G4 = 4 Then
    Call PlayerMsg(index, "Well done You Win"
    Call GivePlayerItem(Index, 1, 75)
EndIf
Exit Sub
    Else
    Call TakeItem(Index, 1, 25)
EndIf
    Exit Sub

```Should work
```
Case "/money"
If GetPlayerAccess(index) > 0 Then
call GiveCurrency(index, 1, 1000)
EndIf
Exit Sub
Else
Call PlayerMsg(index,"You are not high enough access to do this!",0)
EndIf
Exit Sub

```Should work.
Link to comment
Share on other sites

```
Case "/get425"
    Dim G4
    G4 = Rand(1,6)
If CanTake(Index, 1, 25) = True Then
    If G4 = 4 Then
    Call PlayerMsg(index, "Well done You Win", 10)
    Call GiveCurrency(Index, 1, 75)
    Else
    Call TakeItem(Index, 1, 25)
    Exit Sub
End If
Else
Call PlayerMsg(Index, "You need 25 Currency to gamble!", 12)
End If
```
Link to comment
Share on other sites

```
Case "/get425"
    Dim G4
    G4 = Rand(1,6)
If CanTake(Index, 1, 25) Then
    If G4 = 4 Then
      Call PlayerMsg(index, "Well done You Win", 10)
      Call GiveCurrency(Index, 1, 75)
    Else
      Call TakeItem(Index, 1, 25)
  End If
Else
  Call PlayerMsg(Index, "You need 25 Currency to gamble!", 12)
End If
Exit Sub
```
CanTake is automaticly if its true it gives a value of 1, so no need the "= True"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...