Inventory dialog response
#1

So i made this: [it shows the correct list, i just need some ideas to make the dialog response work]

PHP Code:
CMD:inv(playeridparams[])
{
    new 
string[1000];
    new 
Pname[MAX_PLAYER_NAME];
    
slotsused[playerid]=0;
    for(new 
ii<41i++)
    {
    if(
PlayerItems[playerid][i] > 0)
    {
        
GetPlayerName(iPnameMAX_PLAYER_NAME);
        
format(stringsizeof(string), "{FFFFFF}%s\t%d\n%s"GetItemName(i), PlayerItems[playerid][i], string);
        
ShowPlayerDialog(playerid5024DIALOG_STYLE_TABLIST"Your Inventory"string"Okay","");
        
slotsused[playerid]++;
    }
    }
    if(
slotsused[playerid]==0) return ShowPlayerDialog(playerid5022DIALOG_STYLE_MSGBOX"Your Inventory""Your inventory is empty""Okay","");
    return 
1;

but i don't really know how to detect which item is 'slot' the player is choosing
PHP Code:
if(dialogid == 5024)
    {
        if(
response)
        {
        for(new 
islotsused[playerid]; i++)
        {
        if(
listitem == i)
        {
        
        }
        }
        }
    } 
Reply


Messages In This Thread
Inventory dialog response - by SaiyanZ - 28.03.2019, 12:42
Re: Inventory dialog response - by NaS - 28.03.2019, 13:16
Re: Inventory dialog response - by SaiyanZ - 28.03.2019, 14:22
Re: Inventory dialog response - by NaS - 28.03.2019, 14:56
Re: Inventory dialog response - by SaiyanZ - 28.03.2019, 16:33

Forum Jump:


Users browsing this thread: 1 Guest(s)