getid dialog
#3

Quote:
Originally Posted by DanishHaq
Посмотреть сообщение
pawn Код:
CMD:getid(playerid, params[])
{
    new id[24], count = 0, dstring[500], string[50];
    if(sscanf(params, "s[24]", id)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /getid [name/id]"); // this can be used with name and ID, check sscanf usage
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            new name[MAX_PLAYER_NAME];
            GetPlayerName(i, name, sizeof(name));
            if(strfind(id, name, true) != -1)
            {
                format(string, sizeof(string), "%s (ID: %i)\n", name, i);
                strcat(dstring, string);
                count ++;
            }
        }
    }
    if(count == 0) return ShowPlayerDialog(playerid, 2500, DIALOG_STYLE_MSGBOX, "No players found!", "Unfortunately, we couldn't find any players with the specification you gave us.", "OK", "");
    new dialogtitle[50];
    format(dialogtitle, sizeof(dialogtitle), "%i players were found", count);
    ShowPlayerDialog(playerid, 2534, DIALOG_STYLE_LIST, dialogtitle, dstring, "Done", "");
    return 1;
}
Hi dan it was nice seeing you. Thank you. Im gald you are trying to help me again.

Is it possible to show it by DIALOG_STYLE_LIST?
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: 4 Guest(s)