Dialog help ! I give rep , thanks !!! -
buburuzu19 - 06.11.2014
PROBLEM SOLVED.
Re: Dialog help ! I give rep , thanks !!! -
Runn3R - 06.11.2014
You can't storage all players into one string... Make an array like this.. new szString[MAX_PLAYERS][500];
Re: Dialog help ! I give rep , thanks !!! -
buburuzu19 - 06.11.2014
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
Re: Dialog help ! I give rep , thanks !!! -
Runn3R - 06.11.2014
Edit this: format(szString, sizeof (szString)
With: format(szString[playerid], sizeof(szString[playerid])
Re: Dialog help ! I give rep , thanks !!! -
BroZeus - 06.11.2014
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...
Re: Dialog help ! I give rep , thanks !!! -
buburuzu19 - 06.11.2014
PROBLEM SOLVED.
Re: Dialog help ! I give rep , thanks !!! -
BroZeus - 06.11.2014
i dont understood what you are trying to say...
Show your sistem thing so that i can understand what you are trying to say...
Re: Dialog help ! I give rep , thanks !!! -
buburuzu19 - 06.11.2014
PROBLEM SOLVED.
Re: Dialog help ! I give rep , thanks !!! -
M0HAMMAD - 06.11.2014
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;
}
Re: Dialog help ! I give rep , thanks !!! -
buburuzu19 - 06.11.2014
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 ?