Hello, I would like to ask for help, because I created a command, dialogue, table in the database and added a phrase Language to PlayerData, it is worth noting that the search does not concern me in the database, why?
This is my command
And this is my dialog. Please help me :(
Code:
CMD:language(playerid, params[])
{
Dialog_Show(playerid, Language, DIALOG_STYLE_LIST, "Select language", "English\nPolish", "Select", "Cancel");
return 1;
}
Code:
Dialog:Language(playerid, response, listitem, inputtext[])
{
if (response)
{
new
message[256+1],
query[2048];
if(listitem == 0)
{
format(message, 256, "You have changed the server language to English!", listitem);
SendClientMessage(playerid, 0xFFFFFFFF, message);
PlayerData[playerid][pLanguage] = 0;
format(query, sizeof(query), "UPDATE `account` SET `Language` = '%d'",
PlayerData[playerid][pLanguage]
);
return 1;
}
if(listitem == 1)
{
format(message, 256, "Zmieniłeś język serwera na polski!", listitem);
SendClientMessage(playerid, 0xFFFFFFFF, message);
PlayerData[playerid][pLanguage] = 1;
format(query, sizeof(query), "UPDATE `account` SET `Language` = '%d'",
PlayerData[playerid][pLanguage]
);
return 1;
}
}
return 1;
}