Colors in Dialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Colors in Dialog (
/showthread.php?tid=660813)
Colors in Dialog -
JaskaranSingh - 14.11.2018
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.
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");
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.
Re: Colors in Dialog -
JaskaranSingh - 14.11.2018
Thank you. I solved it.