Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
frmWarp
#13
so i have simply to put your code
Code:
' :::::::::::::::::::::::::::::::::
    ' :: Warp(map,x,y) to map packet ::
    ' :::::::::::::::::::::::::::::::::
    If LCase(Parse(0)) = "warpto2" Then
        ' Prevent hacking[commented]
        'just in case you want this to be a admin only
        'feature if you want it to be an admin only feature
        'uncomment the commented code below
        '/////////////////////////////////////////////////
        'If GetPlayerAccess(Index) < ADMIN_MAPPER Then
        '    Call HackingAttempt(Index, "Admin Cloning")
        '    Exit Sub
        'End If
        '/////////////end admin only code/////////////////
      
        ' The map
        n = Val(Parse(1))
      
        'x and y
        x = Val(Parse(2))
        y = Val(Parse(3))
      
        ' Prevent hacking
        If n < 0 Or n > MAX_MAPS Then
            Call HackingAttempt(Index, "Invalid map")
            Exit Sub
        End If
      
        'prevent out of range[hacking]
        If x > MAX_MAPX Or y > MAX_MAPY Or x < 0 Or y < 0 Then
            Call HackingAttempt(Index, "Warping out of range")
            Exit Sub
        End If
      
        Call PlayerWarp(Index, n, x, y)
        Call PlayerMsg(Index, "You have been warped to map #" & n & "(" & x & "," & y & ")", BrightBlue)
        Call AddLog(GetPlayerName(Index) & " warped to map #" & n & "(" & x & "," & y & ")", ADMIN_LOG)
        Exit Sub
    End If
in the server under
Code:
Case "warpto"
        Call PlayerWarp(index, Val(Parse(1)), GetPlayerX(index), GetPlayerY(index))
        Exit Sub
and then in the client
Code:
Select Case SelectWarp.Text
Case "Castle"
    Call WarpTo2(m,x,y)
Case Else
    Call AddText("no such destination", BrightRed)
End Select
right??
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)