10.12.2015, 14:12
Criei alguns chats para as Torcidas do servidor que to fazendo, quando o player digitar !texto aparece somente para a equipe. isso ta ate acontecendo so pq quando o player digita !texto aparece para torcida e em cima da cabeзa do player, e eu so quero que apareзa para a torcida
PHP код:
public OnPlayerText(playerid, text[])
{
new String[180];
GetPlayerName(playerid,Nome,sizeof(Nome));
SetPlayerChatBubble(playerid, text, 3823363071, 1120403456, 10000);
if(text[0] == '!')
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][pTorcidas] == 12)
{
format(String,sizeof(String),"[Torcida Comando Rubro Negro - Zona Norte] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 12)
SendClientMessage(i,COLOR_UPC,String);
}
if(PlayerInfo[playerid][pTorcidas] == 13)
{
format(String,sizeof(String),"[Torcida Comando Rubro Negro - Leste] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 13)
SendClientMessage(i,COLOR_PC,String);
}
if(PlayerInfo[playerid][pTorcidas] == 14)
{
format(String,sizeof(String),"[Torcida Ultras Cotia 12 - Grande SP] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 14)
SendClientMessage(i,COLOR_DPA,String);
}
if(PlayerInfo[playerid][pTorcidas] == 15)
{
format(String,sizeof(String),"[Torcida Jovem Santos - Zona Oeste ] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 15)
SendClientMessage(i,COLOR_TVP,String);
}
if(PlayerInfo[playerid][pTorcidas] == 16)
{
format(String,sizeof(String),"[Torcida Jovem Santos - Zona Norte] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 16)
SendClientMessage(i,COLOR_PDA,String);
}
if(PlayerInfo[playerid][pTorcidas] == 17)
{
format(String,sizeof(String),"[Torcida Leхes da Fabulosa - Zona Norte] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 17)
SendClientMessage(i,COLOR_PCA,String);
}
if(PlayerInfo[playerid][pTorcidas] == 18)
{
format(String,sizeof(String),"[Torcida Furia Independente - Sul ] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 18)
SendClientMessage(i,COLOR_LDA,String);
}
if(PlayerInfo[playerid][pTorcidas] == 19)
{
format(String,sizeof(String),"[Sangue Jovem do Santos - Baixada ] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 19)
SendClientMessage(i,COLOR_DPA,String);
}
if(PlayerInfo[playerid][pTorcidas] == 20)
{
format(String,sizeof(String),"[Torcida Jovem Ponte - Campinas ] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 20)
SendClientMessage(i,COLOR_TVP,String);
}
if(PlayerInfo[playerid][pTorcidas] == 21)
{
format(String,sizeof(String),"[Torcida Dragхes Da Real - Zona Leste] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 21)
SendClientMessage(i,COLOR_UPC,String);
}
if(PlayerInfo[playerid][pTorcidas] == 22)
{
format(String,sizeof(String),"[Torcida Dragхes da Real - Interior ] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 22)
SendClientMessage(i,COLOR_UPC,String);
}
if(PlayerInfo[playerid][pTorcidas] == 23)
{
format(String,sizeof(String),"[Torcida Uniformizada Palmeiras - Zona Sul ] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 23)
SendClientMessage(i,COLOR_DPA,String);
}
if(PlayerInfo[playerid][pTorcidas] == 24)
{
format(String,sizeof(String),"[Torcida Fiel Forзa tricolor - Interior ] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pTorcidas] == 23)
SendClientMessage(i,COLOR_PCA,String);
}
}
return 0;
}
return 1;
}