28.08.2015, 08:17
PHP код:
Dialog:CreateChar(playerid, response, listitem, inputtext[])
{
if (!response)
return PlayerData[playerid][pCharacter] = 0;
else if (isnull(inputtext) || strlen(inputtext) > 20)
return Dialog_Show(playerid, CreateChar, DIALOG_STYLE_INPUT, "Create Character", "Please enter the name of your new character below:\n\nWarning: Your name must be in the Firstname_Lastname format and not exceed 20 characters.", "Create", "Cancel");
else
{
new query[128];
format(query, sizeof(query), "SELECT `ID` FROM `characters` WHERE `Character` = '%s'", inputtext);
mysql_tquery(g_iHandle, query, "OnCharacterCheck", "ds", playerid, inputtext);
}
return 1;
}