Message is send 4 times.
#1

So, /t is to talk on a phone, but it sends the message correct(1 time) to the reciever. but 4 times to the sender.

pawn Code:
CMD:t(playerid, params[])
{
    if(isoncall[playerid] == true)
    {
        if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /t [Text]");
        new string[128], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "[phone]%s: %s", name, params);
        foreach(Player, i)
        {
            if(callnumber[i] == PlayerInfo[playerid][PhoneNumber] && i != playerid) SendClientMessage(i, COLOR_PINK, string);
            ProxDetector(10.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
        }
    }
    else return SendClientMessage(playerid, COLOR_GREY, "You are not on a call!");
    return 1;
}
Reply


Messages In This Thread
Message is send 4 times. - by milanosie - 02.02.2012, 08:41
Re: Message is send 4 times. - by Snowman12 - 02.02.2012, 09:13
Re: Message is send 4 times. - by milanosie - 02.02.2012, 09:17
Re: Message is send 4 times. - by milanosie - 02.02.2012, 09:35

Forum Jump:


Users browsing this thread: 1 Guest(s)