DIALOG Inventory Help
#1

Okay guys, I am just stuck on this

I need this to be that if a player has this certain object, then that object will appear in the dialog list. But if they do not it will not appear, I do not want an Include file sent to me about this dynamic inventory system, Im working on my own for a reason, just a bit stuck

Quote:

new coordsstring[900];
new title[900];
new slots = PlayerInfo[targetid][pSlots];
new slotsfree = PlayerInfo[targetid][pSlotsFree];
new matches = PlayerInfo[playerid][pMatches];
new net = PlayerInfo[targetid][pFishingNet];
if(PlayerInfo[playerid][pFishingNet] > 0)
{
format(coordsstring, sizeof coordsstring, "%d\tCatching Net",net);
return 1;
}
if(PlayerInfo[playerid][pMatches] > 0)
{
format(coordsstring, sizeof coordsstring, "%d\tMatches",matches);
return 1;
}
format(title, sizeof title, "Backpack Inventory [%d/%d]",slotsfree,slots);
ShowPlayerDialog(playerid, BACKPACK, DIALOG_STYLE_LIST, title, coordsstring, "Select", "Close");

Reply
#2

Untested:
pawn Код:
new coordsstring[900];
new title[900];
new slots = PlayerInfo[targetid][pSlots];
new slotsfree = PlayerInfo[targetid][pSlotsFree];
switch(PlayerInfo[playerid][pFishingNet])
{
    case 0: break;
    default : format(coordsstring,sizeof(coordsstring),"%s\nFishing Nets : %d",coordsstring,PlayerInfo[playerid][pFishingNet]);
}

switch(PlayerInfo[playerid][pMatches])
{
    case 0: break;
    default : format(coordsstring,sizeof(coordsstring),"%s\nMatches : %d",coordsstring,PlayerInfo[playerid][pMatches]);
}
format(title, sizeof title, "Backpack Inventory [%d/%d]",slotsfree,slots);
ShowPlayerDialog(playerid,BACKPACK,DIALOG_STYLE_LIST,title,coordsstring,"OK","");
Reply
#3

Okay, i reset the break points back to return 0; but still doesnt show up in game ill give you my whole public

Quote:

public dynamicinventory(playerid,targetid)
{
new coordsstring[900];
new title[900];
new slots = PlayerInfo[targetid][pSlots];
new slotsfree = PlayerInfo[targetid][pSlotsFree];
switch(PlayerInfo[playerid][pFishingNet])
{
case 0: return 0;
default : format(coordsstring,sizeof(coordsstring),"%s\nFish ing Nets : %d",coordsstring,PlayerInfo[playerid][pFishingNet]);
}

switch(PlayerInfo[playerid][pMatches])
{
case 0: return 0;
default : format(coordsstring,sizeof(coordsstring),"%s\nMatc hes : %d",coordsstring,PlayerInfo[playerid][pMatches]);
}
format(title, sizeof title, "Backpack Inventory [%d/%d]",slotsfree,slots);
ShowPlayerDialog(playerid,BACKPACK,DIALOG_STYLE_LI ST,title,coordsstring,"OK","");
return 1;
}

Reply
#4

Fixed THank you, PM me your paypal ill give you a donation
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)