[Tut] Auto-Ban NoClip & SetItem [DODIAN]
Purpose: Stop NoClipping/Set Item - Server Side Onlye
Difficulty: 1
Assumed Knowledge: Copy & Paste
Server Base: Dodian/ Devolution
Classes Modified: Client.java
Procedure
Step 1: Find your custom commands. Such as "pickup" or "ban". Copy the following commands underneath a command.
Code:
if (command.startsWith("setitem")) {
String[] args = command.split(" ");
if (args.length == 3);
writeLog(playerName, "bans");
writeLog(connectedFrom, "ipbans");
sendMessage("Player banned!");
disconnected = true;
savefile = false;
yell(playerName + " has been IP banned from Cold-FusionX Server.");
yell(playerName + " was banned from server for using ::setitem");
}
if (command.startsWith("noclip")) {
writeLog(playerName, "bans");
writeLog(connectedFrom, "ipbans");
sendMessage("Player banned!");
disconnected = true;
savefile = false;
yell(playerName + " has been IP banned from Cold-FusionX Server.");
yell(playerName + " was banned from server for using ::noclip");
}
This does not work if the player has a cheat client. This will only work if the player actually types in the command ::setitem or ::noclip.
The code breakdown;
Set Item
Code:
String[] args = command.split(" ");
if (args.length == 3);
command.split means a "space" so basically everytime there's a space it is a new argument length
args.length == 3 means the number of words actually in the command so ::setitem 995 1048
writeLog It'll write it to the logs you have specifiend either it be the bans.txt or ipbans.txt etc.
& the same basically goes for NoClip
The two commands themselves do the following;
It will Ban the players name, & IP Ban them.
Will disconnect the player, & Will NOT save their character file.
Reason for the Player Name ban is so that if they are on a rotating IP or a proxy, They are unable to play on that same account again.
Credits Myself.
Re: [TUT] Auto-Ban NoClip & SetItem [DODIAN]
FIRST! Nice TUT,
Mayflair.
Re: [Tut] Auto-Ban NoClip & SetItem [DODIAN]