getid dialog
#1

Код:
CMD:getid(playerid, params[])
{
    new name[24];
    if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /getid [name/id]");
    new Count = 0;
    new fstr[150];
    for(new i = 0; i < MAX_PLAYERS; i++) //foreach would be the better option...
    {
        if(IsPlayerConnected(i))
        {
            new playersname[24];
            GetPlayerName(i, playersname, 24);
            if(strfind(name, playersname, true) != -1)
            {
                format(fstr, sizeof(fstr), "%s (ID: %i)", playersname, i);
                SendClientMessage(playerid, 0xFFFF00FF, fstr);
                Count++;
                continue;
            }
        }
    }
    if(Count == 0) return SendClientMessage(playerid, 0xFF0000FF, "There were no matches found.");
    format(fstr, sizeof(fstr), "There was a total of %i potential matches found.", Count);
    SendClientMessage(playerid, 0x00FF00FF, fstr);
    return 1;
}
Hi I would to ask if you someone know how to make a dialog getid.

It will be like this for example.

If I do "/getid Jor" after I enter it should show in dialog list box with the list of names of Jor like

Jorge (4)
Jorosh (1)
Jorja (6)
Jorlol(34)

Then when I click any name in the dialog list box it should teleport me to that player position that I have chosen.
Reply


Messages In This Thread
getid dialog - by gotwarzone - 25.10.2013, 20:25
Re: getid dialog - by DanishHaq - 25.10.2013, 20:35
Re: getid dialog - by gotwarzone - 25.10.2013, 20:41
Re: getid dialog - by gotwarzone - 28.10.2013, 16:54
Re: getid dialog - by -Prodigy- - 28.10.2013, 17:41
Re: getid dialog - by kbalor - 28.10.2013, 18:11
AW: Re: getid dialog - by Nero_3D - 28.10.2013, 19:17
Re: AW: Re: getid dialog - by gotwarzone - 28.10.2013, 19:26
AW: Re: AW: Re: getid dialog - by Nero_3D - 28.10.2013, 19:29
Re: AW: Re: getid dialog - by -Prodigy- - 28.10.2013, 20:10

Forum Jump:


Users browsing this thread: 3 Guest(s)