Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Jail Command Difficulty: 1/5 C&P (Now works with latest ver)
#4
First off when I just copy and paste the packet it highlights CJailPlayer() and says only comments may be placed after subs and I have it the way you said to. So then I tried turning it into a sub and it worked until If GetPlayerAccess(Index) It highlights index and said variable not defined. And yes I am trying so Robin and others dont freak out I tried to fix it and could not solve it can you give me some insight on this please.

Code:
' ::::::::::::::::::::::
' :: Quit game packet ::
' ::::::::::::::::::::::
Sub HandleQuit(ByVal Index As Long)
    Call CloseSocket(Index)
End Sub

      ' ::::::::::::::::::::::::
        ' :: Jail Player Packet ::
        ' ::::::::::::::::::::::::
       Case CJailPlayer()
        ' Prevent hacking...
        If GetPlayerAccess(Index) < ADMIN_CREATOR Then
            Call HackingAttempt(Index, "Admin Cloning")
        Exit Sub
    End If

n = FindPlayer(Parse(1))

    If n  Index Then
    If n > 0 Then
    'Sends messages out
        Call PlayerMsg(n, "You have been jailed by an admin.", BrightRed)
        Call GlobalMsg(GetPlayerName(n) & " has been jailed by an admin.", BrightRed)
    'Warp to Jail map (Change the coordinates to fit your needs)
        Call PlayerWarp(n, 5, 8, 8)
    Else
        Call PlayerMsg(Index, "Player is not online.", White)
    End If
    Else
        Call PlayerMsg(Index, "You cannot jail yourself!", White)
    End If

Exit Sub
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)