Quote:
Originally Posted by -Shunsui-
Alrite i made this so far , Yet it kicks me insted of the user i set the name to, : )
Code:
if (Cmd[0] == "/kick")
{
Game.Character C = Game.World.CharacterFromName(Cmd[1]);
if (C != null)
GC.Disconnect();
}
This is for 5165 FTW!!!
|
Yes, as he said you made a small mistake.
First you make a reference to a class and call it C, and afterwards you use GC, which is a completely different class. So what you did is, you disconnected yourself, or closed a socket, not sure what GC is, and what you should do is, disconnect the Character's client. Anyway, now the more important part, make sure it saves the character before it disconnects him, not sure if this is added in the disconnect void, but check this.