[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=362092)
ChatІ -
denis15711 - 23.07.2012
Eae galera to criando segundo tуpico ae mals mais o outro ficou na pag 3 e ngm vai ver vim aki pedir suas ajuda para poder arrumar um bug tipow quando o player digita ! [Texto] So aparece para ele mais nгo aparece para outros menbros da torcida por que sera alguem me ajuda ae porfavor cуdigo :
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 Gaviхes da Fiel] %s : %s", Nome, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(VarTorcida[i] == Torcida[i])
{
SendClientMessage(i, COLOR_TVP, String);
return 0;
}
}
}
}
return 1;
}
Re: ChatІ -
Don_Speed - 23.07.2012
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 Gaviхes da Fiel] %s : %s", Nome, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(VarTorcida[i] == Torcida[playerid])
{
SendClientMessage(i, COLOR_TVP, String);
return 0;
}
}
}
}
return 0;
}
Re: ChatІ -
Jason` - 23.07.2012
Tenta trocar
pawn Код:
if(VarTorcida[i] == Torcida[i])
por
pawn Код:
if(PlayerInfo[i][pTorcida] == 1)
Re: ChatІ -
Don_Speed - 23.07.2012
Quote:
Originally Posted by Pedro_Miranda
Tenta trocar
pawn Код:
if(VarTorcida[i] == Torcida[i])
por
pawn Код:
if(PlayerInfo[i][pTorcida] == 1)
|
Assim
pawn Код:
if(VarTorcida[i] == Torcida[playerid])
Re: ChatІ -
blacktrindade - 23.07.2012
ja foi resolvido por msn....
Re: ChatІ -
denis15711 - 23.07.2012
Nгo deu certo nem aparece a msg com PlayerInfo ajuda --'
Re: ChatІ -
Schocc - 23.07.2012
OMG RESOLVIDO OU NГO? SE NГO TENTE OQUE O Pedro_Miranda MOSTROU
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 Gaviхes da Fiel] %s : %s", Nome, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pTorcida] == 1)
{
SendClientMessage(i, COLOR_TVP, String);
return 1;
}
}
}
}
return 0;
}
Re: ChatІ -
denis15711 - 23.07.2012
Nгo deu certo eu e meu amg foi testar n deu . Se o ID 0 Fala ele ve a msg do outro player mais outro player n ve a msg , ajudem ae