Last active
January 2, 2016 12:49
-
-
Save MrBluePotato/8305550 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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