[size=18px>JAIL SYSTEM [size=9px]/jail <playername> command
i dunno who create this code :shock:
:::::::::::::::: ::::CLIENT:::: :::::::::::::::: Add this code at the bottom of modclienttcp
Sub JailPlayer(ByVal Name As String) Dim Packet As String
Packet = "JAILPLAYER" & SEP_CHAR & Name & SEP_CHAR & END_CHAR Call SendData(Packet) End Sub
Modgamelogic
' Jailing Player If LCase(Mid(MyText, 1, 5)) = "/jail" Then If Len(MyText) > 6 Then MyText = Mid(MyText, 7, Len(MyText) - 6) Call JailPlayer(MyText) End If MyText = "" Exit Sub End If
::::::::::::::: :::SERVER::: :::::::::::::::
HandleData :
' :::::::::::::::::::::::: ' :: Jail player packet :: ' :::::::::::::::::::::::: If LCase(Parse(0)) = "jailplayer" Then Dim m As String ' Prevent hacking If GetPlayerAccess(Index) < ADMIN_MAPPER Then Call HackingAttempt(Index, "Admin Cloning") Exit Sub End If
' Find the map number and player to jail N = FindPlayer(Parse(1)) m = 100 ' Map number...... X = 5 ' X of that map Y = 4 ' Y of that map
' Send the message that player has been jailed If Not Trim(GetPlayerName(N)) = "GameMaster" Then If N <> Index Then If N > 0 Then Call PlayerWarp(N, m, X, Y) Call PlayerMsg(N, "You have been jailed by " & GetPlayerName(Index) & ".", Black) Call GlobalMsg(GetPlayerName(N) & " has been jailed by " & GetPlayerName(Index) & ".", Black) Call AddLog(GetPlayerName(Index) & " has jailed " & GetPlayerName(N) & GetPlayerMap(Index) & ".", ADMIN_LOG) Else Call PlayerMsg(Index, "Player is not online.", Black) End If Else Call PlayerMsg(Index, "You cannot jail yourself!", Black) End If Else Call PlayerMsg(Index, "You cannot jail GameMaster!", Black) End If Exit Sub End If
guess that is done :P[size=18px]
|