SA-MP Forums Archive
[Ajuda] Chat proximo erro - 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 proximo erro (/showthread.php?tid=450619)



Chat proximo erro - ThiagoMK - 13.07.2013

Galera me ajudem a arrumar esse chat proximo ele ta com warning e nгo esta funcionando corretamente :\
pawn Код:
if(text[0] == ';')
 {
 PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
 for(new i; i != MAX_PLAYERS; i++)
 {
 new Float:p[3];
 GetPlayerPos(i,p[0],p[1],p[2]);
 if(IsPlayerInRangeOfPoint(playerid,15.0,p[0],p[1],p[2]))
 {
 new Float:MSG[3];
 if(MSG[i] == false)
 {
 new sStr[256];
 new Name[24];
 GetPlayerName(playerid,Name,24);
 format(sStr,128,"{FF0000}%s (%i): {00FFFF}%s",Name,playerid,text[1]);
 SendClientMessage(i,0x00FFFFAA,sStr);
 PlayerPlaySound(i,1057,0.0,0.0,0.0);
 MSG[i] = true;
 }
 MSG[i] = false;
 return 0;
 }
 }
 }
Quem me ajudar agradeзo


Re: Chat proximo erro - Markoss - 14.07.2013

qual warning que erro ?


Re : Chat proximo erro - ThiagoMK - 14.07.2013

Ta dando esses warning:
pawn Код:
C:\Users\Analia\Desktop\BmcV2.0\gamemodes\BRTruck.pwn(365) : warning 213: tag mismatch
C:\Users\Analia\Desktop\BmcV2.0\gamemodes\BR(373) : warning 213: tag mismatch
C:\Users\Analia\Desktop\BmcV2.0\gamemodes\BR(375) : warning 213: tag mismatch
E nгo ta aparecendo as mensagens sу aparece pra quem escreve...


Re: Chat proximo erro - Markoss - 14.07.2013

ta falando que a TAG ta incompativel


Re: Chat proximo erro - Detonador - 14.07.2013

Tente:
pawn Код:
if(text[0] == ';')
 {
 PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
 for(new i; i != MAX_PLAYERS; i++)
 {
 new Float:p[3];
 GetPlayerPos(i,p[0],p[1],p[2]);
 if(IsPlayerInRangeOfPoint(playerid,15.0,p[0],p[1],p[2]))
 {
 new Float:MSG[3];
 if(MSG[i] == 0)
 {
 new sStr[256];
 new Name[24];
 GetPlayerName(playerid,Name,24);
 format(sStr,128,"{FF0000}%s (%i): {00FFFF}%s",Name,playerid,text[1]);
 SendClientMessageToAll(0x00FFFFAA,sStr);
 PlayerPlaySound(i,1057,0.0,0.0,0.0);
 MSG[i] = 1;
 }
 MSG[i] = 0;
 return 0;
 }
 }
 }



Re : Re: Chat proximo erro - ThiagoMK - 14.07.2013

Quote:
Originally Posted by Detonador
Посмотреть сообщение
Tente:
pawn Код:
if(text[0] == ';')
 {
 PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
 for(new i; i != MAX_PLAYERS; i++)
 {
 new Float:p[3];
 GetPlayerPos(i,p[0],p[1],p[2]);
 if(IsPlayerInRangeOfPoint(playerid,15.0,p[0],p[1],p[2]))
 {
 new Float:MSG[3];
 if(MSG[i] == 0)
 {
 new sStr[256];
 new Name[24];
 GetPlayerName(playerid,Name,24);
 format(sStr,128,"{FF0000}%s (%i): {00FFFF}%s",Name,playerid,text[1]);
 SendClientMessageToAll(0x00FFFFAA,sStr);
 PlayerPlaySound(i,1057,0.0,0.0,0.0);
 MSG[i] = 1;
 }
 MSG[i] = 0;
 return 0;
 }
 }
 }
Vlw detonador vc й o cara Vou tentar da +rep


Re : Re: Chat proximo erro - ThiagoMK - 14.07.2013

Quote:
Originally Posted by Detonador
Посмотреть сообщение
Tente:
pawn Код:
if(text[0] == ';')
 {
 PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
 for(new i; i != MAX_PLAYERS; i++)
 {
 new Float:p[3];
 GetPlayerPos(i,p[0],p[1],p[2]);
 if(IsPlayerInRangeOfPoint(playerid,15.0,p[0],p[1],p[2]))
 {
 new Float:MSG[3];
 if(MSG[i] == 0)
 {
 new sStr[256];
 new Name[24];
 GetPlayerName(playerid,Name,24);
 format(sStr,128,"{FF0000}%s (%i): {00FFFF}%s",Name,playerid,text[1]);
 SendClientMessageToAll(0x00FFFFAA,sStr);
 PlayerPlaySound(i,1057,0.0,0.0,0.0);
 MSG[i] = 1;
 }
 MSG[i] = 0;
 return 0;
 }
 }
 }
Detonador eu achei um problema de qualquer distancia pode ver..
Ta tipo chat global


Re: Chat proximo erro - darkxdll - 14.07.2013

Troca o SendClientMessageToAll por SendClientMessage(i,cor,sStr);


Re: Chat proximo erro - Markoss - 14.07.2013

SendClientMessageToall e pra galera toda do serve ne vei agora tu mato ''-


Re : Re: Chat proximo erro - ThiagoMK - 14.07.2013

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
Troca o SendClientMessageToAll por SendClientMessage(i,cor,sStr);
Deu esse error nessa sua linha
pawn Код:
C:\Users\Analia\Desktop\BMCV2.0\gamemodes\BR.pwn(371) : error 017: undefined symbol "cor"