26-09-2008, 01:05 AM
Dunno if this is already up but here ya go, really simple
Clientside
frmMirage, Replace:
With
You could also add
which makes it only available to level 1 admins and up, which you would wanna do.
Serverside
HandleData, Add anywhere
Now it's easy to add but your gonna wanna edit it not to work whilst in the Mapeditor. Since while editing maps, right clicking deletes the tile. If you try to Rwarp while editing the map it'll warp you and close the editor.
EDIT: Added statement to cancel out when editor is open
Clientside
frmMirage, Replace:
Code:
Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, X As Single, y As Single)
Call EditorMouseDown(Button, Shift, X, y)
Call PlayerSearch(Button, Shift, X, y)
End Sub
With
Code:
Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Call EditorMouseDown(Button, Shift, x, y)
Call PlayerSearch(Button, Shift, x, y)
' Right Click Warping
If InEditor = False Then
If Button = 2 Then
Dim Packet As String
x = Int(x / 32)
y = Int(y / 32)
Packet = "RIGHTWARP" & SEP_CHAR & x & SEP_CHAR & y & END_CHAR
Call SendData(Packet)
End If
Else
Exit Sub
End If
End Sub
You could also add
Code:
If Player(MyIndex).Access >= 1 Then
End if
Serverside
HandleData, Add anywhere
Code:
' ::::::::::::::::::::::::::::::::
' :: Right Click Warping Packet ::
' ::::::::::::::::::::::::::::::::
If LCase(Parse(0)) = "Rwarping" Then
' Prevent hacking
If GetPlayerAccess(index) < ADMIN_MONITOR Then
Call HackingAttempt(index, "Admin Cloning")
Exit Sub
End If
X = Parse(1)
y = Parse(2)
Call PlayerWarp(index, GetPlayerMap(index), X, y)
End If
Now it's easy to add but your gonna wanna edit it not to work whilst in the Mapeditor. Since while editing maps, right clicking deletes the tile. If you try to Rwarp while editing the map it'll warp you and close the editor.
EDIT: Added statement to cancel out when editor is open
