08.01.2017, 21:35
(
Последний раз редактировалось danielpalade; 25.09.2017 в 22:00.
)
-- DELETED --
I'm just going to guess that your GetFactionLeader function is shit. Also I hope you do realize that you're hanging the entire server at that point and NOTHING gets done, not even player sync.
|
GetFactionLeader(id) { new pNa[60]; new Cache:r = mysql_query(dbHandle, sprintf("SELECT user, ID, LastLogin FROM `players` WHERE `Member` = '%d' AND `Rank` = 7", id), true); format(pNa, sizeof(pNa), "No Leader"), sLeaderF = "-"; if(cache_num_rows()) cache_get_field_content(0, "user", pNa), cache_get_field_content(0, "LastLogin", sLeaderF), format(pNa, sizeof(pNa), "%s (%s{FFFFFF})", pNa, GetAccountStatus(pNa) > 0 ? ("{00BA19}Online") : ("{C90000}Offline")); cache_delete®; return pNa; }
I assume your GetAccountStatus also performs cached MySQL query which is probably why it takes some time. Use threaded query instead.
|