01.06.2018, 16:41
This is a command i made!
and here its Dialog Respons
But when we click on any listed item, Just nothing happens :/
+REP if helped!
Code:
COMMAND:settings(playerid, params[]) { if(playerData[playerid][playerLoggedIn]) { ShowPlayerDialog(playerid, DIALOG_SETTINGS, DIALOG_STYLE_LIST, "Account Settings", "Change Password\nMy Stats\nMy Packet Loss\nBank Information\nMy Cookies\nMy Tokens\nInventory\nMy IP", "Go", "Cancel"); } return 1; }
Code:
if(dialogid == DIALOG_SETTINGS) { // If the user clicked on a document if(response) { switch(listitem) { case 0: // Change Password { return cmd_changepass(playerid, " "); } case 1: // My Stats { return cmd_stats(playerid, " "); } case 2: // My Packet Loss { return cmd_mypacketloss(playerid, " "); } case 3: // Bank Information { new cash[48], bank[68], showstats[500]; format(bank, sizeof bank, "Bank Balance: $%s", FormatNumber(playerData[playerid][playerBank])); format(cash, sizeof cash, "Cash Balance: $%s", FormatNumber(playerData[playerid][playerMoney])); format(showstats, sizeof showstats, "%s\n%s", bank, cash); // Show dialog containing stats ShowPlayerDialog(playerid, 150, DIALOG_STYLE_MSGBOX, "Bank Account Information", showstats, "Okay", "Close"); } case 4: // My Cookies { return cmd_mycookies(playerid, " "); } case 5: // My Tokens { return cmd_mytokens(playerid, " "); } case 6: // Inventory { return cmd_inventory(playerid, " "); } case 7: // My IP { return cmd_getmyip(playerid, " "); } } } }
+REP if helped!