Well, can someone really help me with this? i wanna add a command that bans players from using "[Chat" command i want my system custom i want it to be like the [Ban command a gump will pop up and lets yo uselect the duration but i want it to be like "[BanChat" how would i do this? BECAUSE THIS GUY WONT STOP so yeah :/.... heres my chat script...
Code:
}
[Usage( "Chat <text>" )]
[Aliases( "chat" )]
[Description( "Broadcasts a message to everyone online." )]
public static void PlayerMessage_OnCommand( CommandEventArgs e )
{
if ( CanChat( e.Mobile ) )
BroadcastMessage( AccessLevel.Player, 0x842, String.Format( "{0} : {1} ", e.Mobile.Name, e.ArgString ) );
else
e.Mobile.SendMessage( "You must wait some time before chating again" );
}
private static ArrayList ChatTimers = new ArrayList();
private static ArrayList ChatMobiles = new ArrayList();
public static int ChatDelay = 3; // seconds
private static bool CanChat( Mobile m )
{
if ( ChatMobiles.Contains( m ) )
{
if ( (DateTime)ChatTimers[ ChatMobiles.IndexOf( m ) ] + TimeSpan.FromSeconds( ChatDelay ) < DateTime.Now )
ChatTimers[ ChatMobiles.IndexOf( m ) ] = DateTime.Now;
else
return false;
}
else
{
ChatMobiles.Add( m );
ChamTimers.Add( DateTime.Now );
}
return true;
}
i know this is a request of some sort but i just really need this done to get rid of this guy....