Skip to content

Instantly share code, notes, and snippets.

@MrBluePotato
Last active January 2, 2016 12:49
Show Gist options
  • Select an option

  • Save MrBluePotato/8305550 to your computer and use it in GitHub Desktop.

Select an option

Save MrBluePotato/8305550 to your computer and use it in GitHub Desktop.
string targetName = cmd.Next();
if( targetName == null ) {
//Displays Usage if the Player Does not Properly Write the Command
CdNuke.PrintUsage( player );
return;
}
PlayerInfo target = PlayerDB.FindPlayerInfoOrPrintMatches( player, targetName );
string reason = cmd.NextAll();
if( !target == null )
{
string banMessage = "{0} has been &4NUKED&s", target
target.Ban( player, banMessage, true, true );
Random rnd = new Random();
targetPlayer.iName = "&4NUKED" + rnd.Next(1, 1000);
} catch( PlayerOpException ex ) {
player.Message( ex.MessageColored );
if( ex.ErrorCode == PlayerOpExceptionCode.ReasonRequired ) {
FreezeIfAllowed( player, target );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment