Dialog help ! I give rep , thanks !!!
#1

PROBLEM SOLVED.
Reply
#2

You can't storage all players into one string... Make an array like this.. new szString[MAX_PLAYERS][500];
Reply
#3

Into my dialog, or at the top of my gm ? I replaced szString with new szString[MAX_PLAYERS][500] and i get error 048: array dimensions do not match
Reply
#4

Edit this: format(szString, sizeof (szString)
With: format(szString[playerid], sizeof(szString[playerid])
Reply
#5

like this ._.
btw u can store all player name into one string..
pawn Код:
CMD:checkwanted(playerid, params[])
{
    new szString[500],ee[50];
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            if(playerAccount[i][WantedLevel] >= 1)
            {
               
                format(ee, sizeof (ee), "[W:%d][ID:%d]%s\n",playerAccount[i][WantedLevel],i,GetName(i));
                strcat(szString, ee);
            }
        }
    }
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Title",szString,"Find", "Close");
    return 1;
}
DONT do what Runn3R told u...
Reply
#6

PROBLEM SOLVED.
Reply
#7

i dont understood what you are trying to say...
Show your sistem thing so that i can understand what you are trying to say...
Reply
#8

PROBLEM SOLVED.
Reply
#9

pawn Код:
CMD:checkwanted(playerid, params[])
{
    new string[128],pname[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            if(playerAccount[i][WantedLevel] >= 1)
            {
                GetPlayerName(i, pname, sizeof(pname));
                ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Title",string,"Find", "Close");
                format(string, sizeof (string), "[W:%d][ID:%d]%s",playerAccount[i][WantedLevel],i,pname);
                return 1;
            }
        }
    }
    return 1;
}
Reply
#10

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
i dont understood what you are trying to say...
Show your sistem thing so that i can understand what you are trying to say...
We have 2 buttons on the dialog. "Find" , "Close" , when player click Find : to find the specific player in the wanted dialog. That's what i want , to make the find button work . Understood ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)