All pastes #252686 Raw Edit

Stuff

public cpp v1 · immutable
#252686 ·published 2006-11-19 21:14 UTC
rendered paste body
	if ( strcmp( cmdtext, "/announce", true, 9 ) == 0 )	{	    new Message[256];		format( Message, sizeof( Message ), "%s", cmdtext[9] );	    	    if( strlen( Message ) == 0 )	    {	        SendClientMessage( playerid, 0xFF0000, "* USAGE: /announce [message]" );	    }	    else	    {	        // Message OK, Implent this fix in order to stop people crashing			// the server if they use a wrong ~. You'll lose support for custom			// colours, but it won't crash player's.			for( new i = 0; i < strlen( Message ); i ++ )			{			    if( Message[ i ] == '~' )			    {					Message[ i ] = '_';			    }			}						// Now show the gametext.			GameTextForAll( Message, 3000, 5 );	    }	    	    return 1;	}