pawn Код:
CMD:clearchat(playerid,params[])
{
if(!IsPlayerAdmin( playerid ) ) return SCM( playerid, RED, "Unknown Command! Type /help" );
for( new i = 0; i < 100; i++ ) SCMA( -1 , " " );
new
sz_msg[ 52 ]
;
GetPlayerName( playerid, sz_msg, MAX_PLAYER_NAME );
format( sz_msg, sizeof( sz_msg ), "Admin %s has cleared the chat", sz_msg );
SendClientMessageToAll( 0xFF0000FF, sz_msg );
return 1;
}
Quote:
Originally Posted by pds2k12
pawn Код:
CMD:clearchat(playerid,params[]) { if(!IsPlayerAdmin( playerid ) )return SCM( playerid, RED, "Unknown Command! Type /help" );
for(new i = 0; i < 100; i++) { SCMA(-1 ," "); }
new pString[ 128 ], PlayerName[ 24 ] ; GetPlayerName( playerid, PlayerName, sizeof( PlayerName ) ); format(pString, sizeof( pString ), ""); SCMA(-1, "%s(%d) Has cleared the chat box.", PlayerName, playerid ); return 1; }
|
I guess you were in a hurry! You used what the format should had to SCMA.