11.01.2012, 23:17
Well I am trying to make a team chat and I have some code tho, but how I actually make the command out of it...
I want to make like
[Team Chat] Name: Text
Edit: I don't want to loose global chat.
And I tried with
But I think I did that wrong?
Код:
stock SendTeamMessage( playerid, t_MSG[ ] )
{
for( new i = 0; i < MAX_PLAYERS; i ++ )
{
if( GetPlayerTeam( i ) == GetPlayerTeam( playerid ) )
{
new c_msg[ 128 ], c_name[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, c_name, sizeof c_name );
format( c_msg, ( 128 ), "[Team Chat] %s: {FFFFFF}%s", c_name, t_MSG );
SendClientMessage( i, GetPlayerColor( playerid ), c_msg );
}
else continue;
}
return ( 1 );
}
[Team Chat] Name: Text
Edit: I don't want to loose global chat.
And I tried with
Код:
if (strcmp("/teamchat", cmdtext, true) == 0 || (strcmp("/tc", cmdtext, true) == 0))
{
SendTeamMessage( playerid, t_MSG[ ] );
return 1;
}


: error 017: undefined symbol "SendClientUsage"
Sorry i couldnt help you more