16-01-2008, 06:52 PM
so i have simply to put your code in the server under and then in the client
right??
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
Code:
Case "warpto"
Call PlayerWarp(index, Val(Parse(1)), GetPlayerX(index), GetPlayerY(index))
Exit Sub
Code:
Select Case SelectWarp.Text
Case "Castle"
Call WarpTo2(m,x,y)
Case Else
Call AddText("no such destination", BrightRed)
End Select