[Ajuda] ajuda com chat proximo.
#1

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?
Reply
#2

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;
}
Reply
#3

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?
Reply
#4

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....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)