07.09.2014, 15:24
Try this one:
pawn Код:
#include <a_samp>
#include <YSI\y_va>
public OnPlayerText(playerid, text[])
{
if(text[0] = '!' && strlen(text[1]))
{
for (new i = 0; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && (gTeam[i] == gTeam[playerid])
Msg(playerid, 0xC8C8C8FF, "[Team Msg] %s: %s", PlayerNameEx(playerid), text[1]);
}
return 0;
}
return 1;
}
stock PlayerNameEx(playerid)
{
new
playerName[MAX_PLAYER_NAME+1],
string[MAX_PLAYER_NAME+1+7];
GetPlayerName(playerid, playerName, sizeof(playerName));
format(string, sizeof(string), "%s (%d)", playerName, playerid);
return string;
}
stock Msg(playerid, color, const fmat[], va_args<>)
{
return SendClientMessage(playerid, color, va_return(fmat, va_start<3>));
}