11.12.2018, 13:12
Код:
} forward OnQueryFinished(threadid, extraid); public OnQueryFinished(threadid, extraid) { new rows = cache_get_row_count(connectionID); switch(threadid) { case THREAD_LOOKUP_BANS: { if(rows) { new bannedby[24], date[24], reason[128]; cache_get_field_content(0, "bannedby", bannedby); cache_get_field_content(0, "date", date); cache_get_field_content(0, "reason", reason); GameTextForPlayer(extraid, "~r~You are banned!", 999999, 3); TextDrawHideForPlayer(extraid, welcomenew); if(cache_get_field_content_int(0, "permanent")) SendClientMessageEx(extraid, COLOR_YELLOW, "You are permanently banned from this server."); else SendClientMessageEx(extraid, COLOR_YELLOW, "You are banned from this server. You can appeal your ban at Deviation.cf."); SendClientMessageEx(extraid, COLOR_LIGHTRED, "Admin: %s", bannedby); SendClientMessageEx(extraid, COLOR_LIGHTRED, "Date: %s", date); SendClientMessageEx(extraid, COLOR_LIGHTRED, "Reason: %s", reason); KickPlayer(extraid); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%s'", GetPlayerNameEx(extraid)); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOOKUP_ACCOUNT, extraid); } } case THREAD_LOOKUP_ACCOUNT: { if(rows) {