Nearest players list
#5

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Why get the name and than find the id if he already passes the id ?

pawn Код:
case 32767: {
    if(!response)return false;

    inputtext[strfind(inputtext, ")", 1)] = EOS;

    new
        string[128],
        giveplayerid = strval(inputtext[1])
    ;
    format(string, sizeof(string), "%s (%d) wybrał właśnie Ciebie!", PlayerName(playerid), playerid);
    SendClientMessage(giveplayerid , -1, string);

    format(string, sizeof(string), "Wybrałeś %s (%d)!", inputtext, giveplayerid);
    SendClientMessage(playerid, -1, string);
}
Tried.. and it works from ID 1 and above, because when ID 0 tries to choose someone from the list it's says:
Код:
Wybrałeś "Your_name" (your_id)!
pawn Код:
case 32767:
{
    if(!response)return false;
    else
    {
        inputtext[strfind(inputtext, ")", true) != -1] = EOS;

        new string[128],
            giveplayerid = strval(inputtext[1]);
           
        format(string, sizeof(string), "%s (%d) wybrał właśnie Ciebie!", PlayerName(playerid), playerid);
        SendClientMessage(giveplayerid , -1, string);

        format(string, sizeof(string), "Wybrałeś %s (%d)!", PlayerName(giveplayerid), giveplayerid);
        SendClientMessage(playerid, -1, string);
     }
}
However, I want to have this format:
pawn Код:
format(string, sizeof(string), "%s%d\t%s\n", string, i, PlayerName(i));
edit://
Fixed a message with "Wybrałeś ( (0)!" but still.. problem occurs with players list. When I am ID: 0 and I'm trying to choose player from list (1st player) it says "Wybrałeś Your_Nick (your_id)!" and "your_name (your_id) wybrał właśnie Ciebie!"
Reply


Messages In This Thread
Nearest players list - by Riddick94 - 10.04.2013, 16:23
Re: Nearest players list - by fordawinzz - 10.04.2013, 16:28
AW: Nearest players list - by Nero_3D - 10.04.2013, 16:38
Re: Nearest players list - by Riddick94 - 10.04.2013, 16:39
Re: AW: Nearest players list - by Riddick94 - 10.04.2013, 17:00
AW: Nearest players list - by Nero_3D - 10.04.2013, 19:16
Re: Nearest players list - by Riddick94 - 10.04.2013, 19:27

Forum Jump:


Users browsing this thread: 1 Guest(s)