14.12.2013, 17:54
Sure, You could use isnull instead of sscanf when executing strings because you don't use any placeholder you just use placeholder s
pawn Код:
CMD:r( playerid, params[ ] )
{
new
string[ 128 ];
if( isnull( params ) )
return SendClientMessage( playerid, COLOR_GREY, "Syntax: /r [text]" );
foreach( Player, i )
{
if( GetPlayerTeam( playerid ) == TEAM_TERRORIST )
{
format( string, sizeof( string ),"[Radio] %s: %s", PlayerName(playerid), params);
SendClientMessage( i, TEAM_TERRORIST_COLOR, string );
}
if( GetPlayerTeam( playerid ) == TEAM_ARMY )
{
format( string, sizeof( string ),"[Radio] %s: %s", PlayerName(playerid), params);
SendClientMessage( i, TEAM_ARMY_COLOR, string );
}
}
return true;
}