Пишу систему бана.
В проверке на блокировку не показывается диалог. Для проверки вписал SendClientMessage, чтобы выводилось вместе с диалогом - выводится.
Может вы поможете? Голова уже завалена, может не вижу элементарного)
PHP код:
publics: BanListCheck(playerid)
{
cache_get_data(rows, fields);
if(!rows) return true;
new admin[MAX_PLAYER_NAME], reason[90], dateban[27], dateunban[27], str[123 - 2 + 27 - 2 + 27 - 2 + MAX_PLAYER_NAME - 2 + 11 - 2 + 90];
getstr(0, "DateBan", dateban);
getstr(0, "DateUnBan", dateunban);
getstr(0, "Admin", admin);
getstr(0, "Reason", reason);
if(gettime() < getint(0, "BanSec"))
{
format(str, sizeof(str),"\
Аккаунт заблокирован!\n\n\
Дата блокировки: %s\n\
Дата разблокировки: %s\n\
Блокировщик: %s\n\
Ваш личный ID: %d\n\
Причина блокировки: %s",
dateban, dateunban, admin, getint(0, "Acc_ID"), reason);
Dialog(playerid, 5, DIALOG_STYLE_MSGBOX, "Заблокирован", str, "Выход", "");
Message(playerid, -1, "Проверка");
return Kick(playerid);
}
mysql_format(cHandle, str, sizeof(str), "DELETE FROM `Bans` WHERE `Nick` = '%s'", Nick(playerid));
mysql_function_query(cHandle, str, false, "", "");
return SendClientMessage(playerid, cWHITE, "Вы были разбанены.");
}