Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Rcon = new MinecraftRcon;
- $Rcon->Connect( MQ_SERVER_ADDR, MQ_SERVER_PORT, MQ_SERVER_PASS, MQ_TIMEOUT );
- $element[]='give $nick 130 1';
- $element[]='give $nick 1 64';
- $cmd = $element[array_rand($element,1)];
- $Rcon->Command("$cmd");
- $Data = $Rcon->Command( null );
- if( $Data === false )
- {
- throw new MinecraftRconException( "" );
- }
- else if( StrLen( $Data ) == 0 )
- {
- throw new MinecraftRconException( "" );
- }
- echo HTMLSpecialChars( $Data );
- }
- catch( MinecraftRconException $e )
- {
- echo $e->getMessage( );
- }
- $Rcon->Disconnect( );
- }
- else{
- echo '<b><center>Kod niepoprawny</center></b>';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement