14.11.2018, 09:09
I want to store the color code in MySQL and show the dialog list item in that color along with the text (the color code).
I have tried everything from the past 48 hours.
It works if I remove the Notification list item. As soon as I add the notification list item, It is showing the correct color for that and changes the color for another one and does weird things.
I have tried everything from the past 48 hours.
PHP код:
if(listitem == 0)
strmid(Player[playerid][playerPMColor], "33CCFF", 0, 10, 128);
mysql_format(g_SQL, query, sizeof(query), "UPDATE `players` SET `ppmcolor` = '%d' WHERE `pname` = '%e'", Player[playerid][playerPMColor], GetName(playerid));
mysql_tquery(g_SQL, query);
if(listitem == 1)
strmid(Player[playerid][playerNotificationColor], "AA3333", 0, 10, 128);
PHP код:
format(text2, sizeof(text2), "\nPM Color\t{%s}%s\nNotification Color\t{%s}%s", Player[playerid][playerPMColor], Player[playerid][playerPMColor], Player[playerid][playerNotificationColor], Player[playerid][playerNotificationColor]);
strcat(text, text2);
ShowPlayerDialog(playerid, DIALOG_SETTINGS, DIALOG_STYLE_TABLIST_HEADERS, "Settings", text, "Select", "Cancel");