24.11.2014, 13:53
But on every item i click it's showing the value of the first, the values are showed with style_msgbox.
I don't want to make with listitem , i want that the response identificate the clicked row.
And the command for wanted is:
I don't want to make with listitem , i want that the response identificate the clicked row.
And the command for wanted is:
pawn Код:
CMD:wanted(playerid, params[])
{
if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1)
{
new szString[500], name[24], title[128], ee[50];
new l=0;
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(playerVariables[i][pWarrants] >= 1)
{
l++;
GetPlayerName(i, name, 24);
format(title, sizeof(title),"Wanted Players: %d",l);
format(ee, sizeof (ee), "[W:%d][ID:%d][%.0f meters]%s\n",playerVariables[i][pWarrants],i,GetDistanceBetweenPlayers(playerid, i),GetName(i));
strcat(szString, ee);
}
}
}
if(l == 0) return SCM(playerid, COLOR_WHITE, "Niciun player nu are wanted in acest moment.");
ShowPlayerDialog(playerid,1155,DIALOG_STYLE_LIST,title,szString,"Find", "Close");
}
else return SCM(playerid, COLOR_WHITE, "You are not in a department to use this command.");
return 1;
}