I want it for one server. Thanks
CASE "!kick1":
IF( UserInGroup( "admin",$userName ) == 1 )
THEN
privMsg " kicked for swearing " . GetPlayerVar( $argv, "Nickname" ) );
cmdLFS( "/kick " . $argv );
ENDIF
BREAK;
CASE "!kick2":
IF( UserInGroup( "admin",$userName ) == 1 )
THEN
privMsg " kicked for bad behaviour " . GetPlayerVar( $argv, "Nickname" ) );
cmdLFS( "/kick " . $argv );
ENDIF
BREAK;
In the message recieve part, split all incoming messages into pieces...
Select case msg(0)
case "!blaat"
...
case "!kick"
Send InSim command: /kick msg(1)
reason = Take your original message, Substring the !kick (=msg(0)) and the playername (=msg(1)) out
Send InSim text: reason
end select
[Command("kick", "kick <username> <reason>")]
public void kick(string Msg, string[] StrMsg, Packets.IS_MSO MSO)
{
clsConnection Conn = Connections[GetConnIdx(MSO.UCID)];
if (StrMsg.Length > 2)
{
if (Conn.IsAdmin == 1 || Conn.IsSuperAdmin == 1 || Conn.IsModerator == 1)
{
bool KickUserfound = false;
foreach (clsConnection C in Connections)
{
string Message20 = Msg.Remove(0, C.Username.Length + 6);
if (C.Username == StrMsg[1] && StrMsg[1].Length > 1)
{
KickUserfound = true;
MsgAll("^1" + C.PlayerName + " was kicked by " + Conn.PlayerName);
MsgAll("^1Reason:^7" + Message20);
Message("/kick " + C.Username);
}
}
if (KickUserfound == false)
{
InSim.Send_MTC_MessageToConnection("^3Wrong username.", MSO.UCID, 0);
}
}
}
else
{
InSim.Send_MTC_MessageToConnection("^3Wrong command", MSO.UCID, 0);
}
}