[Ajuda] Chat - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Chat (
/showthread.php?tid=360953)
Chat -
denis15711 - 19.07.2012
Eae este chat ta bugado quando o player digita ! [Texto] Aparece um monte e sendo que nem й da torcida quem poder me ajuda vlw cуdigo :
No Topo :
pawn Код:
static Torcida[MAX_PLAYERS];
OnPlayerText:
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '!')
{
if(PlayerInfo[playerid][pTorcida] >= 1)
{
new VarTorcida[MAX_PLAYERS];
new Nome[24], String[128];
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), "[Chat de Torcida][Torcida Jovem do Flamengo]: %s Diz: %s", Nome, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(VarTorcida[playerid] == Torcida[i])
{
SendClientMessage(playerid, COLOR_PC, String);
}
}
}
if(PlayerInfo[playerid][pTorcida] >= 2)
{
new VarTorcida[MAX_PLAYERS];
new Nome[24], String[128];
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), "[Chat de Torcida][Raзa Rubro Negra]: %s : %s", Nome, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(VarTorcida[playerid] == Torcida[i])
{
SendClientMessage(playerid, COLOR_PC, String);
}
}
}
}
return 1;
}
Re: Chat -
RafaScripter - 19.07.2012
Ve se Te Ajuda Neguinha k
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '!')
{
if(PlayerInfo[playerid][pTorcida] = 1)
{
new Nome[24], String[128];
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), "[Chat de Torcida][Torcida Jovem do Flamengo]: %s Diz: %s", Nome, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pTorcida == 1)
{
SendClientMessage(playerid, COLOR_PC, String);
}
}
}
if(PlayerInfo[playerid][pTorcida] = 2)
{
new Nome[24], String[128];
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), "[Chat de Torcida][Raзa Rubro Negra]: %s : %s", Nome, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pTorcida == 2)
{
SendClientMessage(playerid, COLOR_PC, String);
}
}
}
}
return 1;
}
Re: Chat -
ViniBorn - 19.07.2012
Troque
pawn Код:
SendClientMessage(playerid, COLOR_PC, String);
Por:
pawn Код:
SendClientMessage(i, COLOR_PC, String);
E
Por:
Re: Chat -
denis15711 - 19.07.2012
Vlw pela ajuda ae consegui fazer + rep