SA-MP Forums Archive
[Ajuda] ajuda com chat proximo. - 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] ajuda com chat proximo. (/showthread.php?tid=160812)



[Ajuda] ajuda com chat proximo. - [GET]Vidaloka - 17.07.2010

meu amigo me passou este chat proximo:

if (strcmp(cmd, "/f", true)==0){
new tmp[256];
new string22[256];
strmid(tmp, cmdtext, 2, strlen(cmdtext));
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, " /f [texto]");
return 1;
}else{
for(new i=0; i<MAX_PLAYERS; i++){
if(GetDistanceBetweenPlayers(playerid, i) < 10){
format(string22, sizeof(string22), "| Chat-Proximo | ~ %s: %s", PlayerName(playerid), tmp);
SendClientMessage(playerid, Vermelho, string22);
return 1;
}
}
}
}

porem ele nгo esta funcionando,o que deve estar acontecendo?


Re: [Ajuda] ajuda com chat proximo. - [NWD]Tweener_ - 17.07.2010

Usa esse aqui, eu uso ele no meu GM, apenas faзa as alteraзхes necessбrias:

pawn Код:
//OnPlayerCommandText
if(!strcmp(cmd, "/f", true))
    {
    new tmp[128];
        strmid(tmp, cmdtext, 3, strlen(cmdtext), 128);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "/f [texto]");
    new
    Float:jx,
    Float:jy,
    Float:jz;
        strins(tmp, " (Chat-Prуximo):", 0, 128);
        strins(tmp, PlayerName(playerid), 0, 128);
        GetPlayerPos(playerid, jx, jy, jz);
    for(new j; j < MAX_PLAYERS; j++)
    {
   if(IsPlayerInRangeOfPoint(j, 10.0, jx, jy, jz))
   {
       SendClientMessage(j, COLOR_RED, tmp);
   }
}
return 1;
}



Re: [Ajuda] ajuda com chat proximo. - rafa3dify - 18.07.2010

Quote:

Usa esse aqui, eu uso ele no meu GM, apenas faзa as alteraзхes necessбrias:


pawn Code:
//OnPlayerCommandTextif(!strcmp(cmd, "/f", true)) { new tmp[128]; strmid(tmp, cmdtext, 3, strlen(cmdtext), 12; if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "/f [texto]"); new Float:jx, Float:jy, Float:jz; strins(tmp, " (Chat-Prуximo):", 0, 12; strins(tmp, PlayerName(playerid), 0, 12; GetPlayerPos(playerid, jx, jy, jz); for(new j; j < MAX_PLAYERS; j++) { if(IsPlayerInRangeOfPoint(j, 10.0, jx, jy, jz)) { SendClientMessage(j, COLOR_RED, tmp); }}return 1;}

Esse nгo funciona em meu gm,fala que o comando nao existe e renicia o meu gm, porque?


Respuesta: Re: [Ajuda] ajuda com chat proximo. - [GET]Vidaloka - 18.07.2010

Quote:
Originally Posted by rafa3dify
Посмотреть сообщение
Esse nгo funciona em meu gm,fala que o comando nao existe e renicia o meu gm, porque?
no meu funcionou perfeitamente,so estou mi matando pra colocar o nome do cara depois de chate proximo....