16.05.2011, 18:34
Desse jeito que eu fiz irб funcionar?
pawn Код:
public OnPlayerText(playerid, text[])
{
if( (text[0] == '#' || text[0] == '@') && strlen(text) > 1)
{
new str[128];
new szPlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
if(gTeam(playerid) == TEAM_GREEN)
{
format(str, 128, "[Green Team Chat]» O jogador %s: %s", szPlayerName, text[1]);
for(new iPlayerID; iPlayerID < MAX_PLAYERS; iPlayerID++)
{
if(!IsPlayerConnected(iPlayerID)) continue;
if(!gTeam(iPlayerID) == TEAM_GREEN) continue;
SendClientMessage(iPlayerID, 0x0080C0AA, str);
}
}
return 0;
}
return 1;
}