12.07.2011, 10:38
I don't know why, but try :
Or, somethings wrong with the SendCopMessage function?
EDIT: Just added an example of a "SendCopMessage function".
pawn Код:
if ( !strcmp( cmdtext, "/e", true, 2 ) )
{
if ( gTeam[ playerid ] == TEAM_COP || gTeam[ playerid ] == TEAM_WSPD || gTeam[ playerid ] == TEAM_FBI || gTeam[ playerid ] == TEAM_MEDIC || gTeam[ playerid ] == TEAM_FIREMAN )
{
if ( cmdtext[ 2 ] != ' ' || !cmdtext[ 3 ] )
return SendClientMessage( playerid, -1, "{FF0000}USAGE: {AAAAAA}/e [ text ]" );
new
tempName[ 24 ],
tempString[ 128 ]
;
GetPlayerName( playerid, tempName, sizeof ( tempName );
format( tempString, sizeof ( tempString ), "* Radio %s( %i ): %s, over.", tempName, playerid, cmdtext[ 2 ] );
SendCopMessage( COLOR_BLUE, string );
return 1;
}
else return SendClientMessage( playerid, -1, "{FF0000}ERROR: {AAAAAA}You are not in the correct team." );
return 1;
}
pawn Код:
stock SendCopMessage( color, const string[ ] )
{
for ( new j = GetMaxPlayers( ), i; i < j; i ++ )
{
if ( !IsPlayerConnected( i ) )
continue;
if ( gTeam[ i ] == TEAM_COP || gTeam[ i ] == TEAM_WSPD || gTeam[ i ] == TEAM_FBI || gTeam[ i ] == TEAM_MEDIC || gTeam[ i ] == TEAM_FIREMAN )
{
SendClientMessage( i, color, string );
}
}
return 1;
}