SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 28/07/2013, 10:51 PM   #1
ThiagoMK
Gangsta
 
ThiagoMK's Avatar
 
Join Date: May 2013
Posts: 718
Reputation: 3
Default Chat proximo

Galera meu chat proximo funciona normal quando não tem ninguem por perto quando chega alguem não aparece a mensagem nem pra mim nem para a pessoa alguem pode ajudar

pawn Code:
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,"(Chat Prox){FF0000}%s (%i): {00FFFF}%s",Name,playerid,text[1]);
                SendClientMessage(i,-1,sStr);
                PlayerPlaySound(i,1057,0.0,0.0,0.0);
                MSG[i] = 1;
            }
            MSG[i] = 0;
            return 0;
        }
    }
}
ThiagoMK is offline   Reply With Quote
Old 28/07/2013, 11:28 PM   #2
Gii
High-roller
 
Gii's Avatar
 
Join Date: Jun 2012
Location: Céu
Posts: 1,622
Reputation: 192
Default Re: Chat proximo

pawn Code:
if(text[0] == ';') {

    new Float:p[3],sStr[128],Name[21];

    GetPlayerName(playerid,Name,21);
    GetPlayerPos(playerid,p[0],p[1],p[2]);
    PlayerPlaySound(playerid,1057,0.0,0.0,0.0);

    for(new i; i != MAX_PLAYERS; i++) {

        if(IsPlayerInRangeOfPoint(i, 15.0,p[0],p[1],p[2])) {

            new Float:MSG[3];
           
            if(MSG[i] == 0) {

                format(sStr,128,"(Chat Prox){FF0000}%s (%i): {00FFFF}%s",Name,playerid,text[1]);
                SendClientMessage(i,-1,sStr);
                PlayerPlaySound(i,1057,0.0,0.0,0.0);
                MSG[i] = 1;
            }
            MSG[i] = 0;
            return 0;
        }
    }
}

Não era mais fácil usar http://wiki.sa-mp.com/wiki/LimitGlobalChatRadius ?
__________________
The NewRPG em desenvolvimento ...
Gii is offline   Reply With Quote
Old 28/07/2013, 11:30 PM   #3
darkxdll
High-roller
 
darkxdll's Avatar
 
Join Date: Jul 2012
Location: C:\Windows\DLLs
Posts: 1,533
Reputation: 87
Default Re: Chat proximo

iCasTiel , ele quer para quando digitar assim :

; oi

com o ";" antes da mensagem
__________________
Dúvida ? Chama aí : 044-88087215
darkxdll is offline   Reply With Quote
Old 28/07/2013, 11:31 PM   #4
ThiagoMK
Gangsta
 
ThiagoMK's Avatar
 
Join Date: May 2013
Posts: 718
Reputation: 3
Default Re : Re: Chat proximo

Quote:
Originally Posted by iCasTiel View Post
pawn Code:
if(text[0] == ';') {

    new Float:p[3],sStr[128],Name[21],MSG[3];

    GetPlayerName(playerid,Name,21);
    GetPlayerPos(playerid,p[0],p[1],p[2]);
    PlayerPlaySound(playerid,1057,0.0,0.0,0.0);

    for(new i; i != MAX_PLAYERS; i++) {

        if(IsPlayerInRangeOfPoint(i, 15.0,p[0],p[1],p[2])) {

            if(MSG[i] == 0) {

                format(sStr,128,"(Chat Prox){FF0000}%s (%i): {00FFFF}%s",Name,playerid,text[1]);
                SendClientMessage(i,-1,sStr);
                PlayerPlaySound(i,1057,0.0,0.0,0.0);
                MSG[i] = 1;
            }
            MSG[i] = 0;
            return 0;
        }
    }
}

Não era mais fácil usar http://wiki.sa-mp.com/wiki/LimitGlobalChatRadius ?
Vlw mais acho que não era não '-'
ThiagoMK is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Pedido] Chat Proximo. Supera Português/Portuguese 6 11/03/2019 11:22 PM
[Ajuda] Chat proximo erro ThiagoMK Português/Portuguese 12 14/07/2013 07:18 PM
[Ajuda] Chat Proximo ThiagoMK Português/Portuguese 8 01/07/2013 12:43 AM
[Ajuda] Chat Próximo Lord_Style Português/Portuguese 1 17/09/2012 06:59 PM
[Ajuda] Chat Proximo Maklister Português/Portuguese 4 25/06/2012 12:40 AM


All times are GMT. The time now is 06:04 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.