01.05.2015, 21:45
Hello, I'm currently trying to create a dialog that shows the items that you have in your inventory after pressing a key, here's what I have
However, nothing happens after pressing the key. If you don't have anything it does display the message, but if you have at least 1 item, the dialog doesn't show up.
I've also tried using format instead of strcat, but I get the same result. I don't want the dialog to show up items that you don't have, so is there another way to do this?
Thanks!
Код:
if (PRESSED(KEY_YES)) { new dialogstr[562]; if(UserData[playerid][sItem1] > 0) return strcat(dialogstr, ""W"Item1:\t%d\n", UserData[playerid][sItem1]); if(UserData[playerid][sItem2] > 0) return strcat(dialogstr, ""W"Item2:\t%d\n", UserData[playerid][sItem2]); else SendClientMessage(playerid, -1, ""W"You don't have anything in your inventory"); ShowPlayerDialog(playerid, DIALOG_INVENTORY, DIALOG_STYLE_TABLIST_HEADERS, ""COLORSV"Inventory", dialogstr, ""W"Select", ""W"Cancel"); }
I've also tried using format instead of strcat, but I get the same result. I don't want the dialog to show up items that you don't have, so is there another way to do this?
Thanks!