04.03.2017, 15:04
Looks like the problem is a command.
I ckecked 3 times when freezed and last OnPlayerCommandReceived was /members.
This is the command:
CMD:members(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
if(PlayerInfo[playerid][pMember] >= 1 && PlayerInfo[playerid][pRank] >= 6)
{
new aim[4000],
query[300],
test[300],
test1[300],
test2[300],
test3[300],
test4,
aimtotal[4000],
result[300],
idd,
mid=0;
format(query, sizeof(query), "SELECT * FROM `users` WHERE `users`.`Member` = '%d' ORDER BY `users`.`Rank` DESC LIMIT 50", PlayerInfo[playerid][pMember]);
new Cache: membresult = mysql_query(SQL, query);
for(new i, j = cache_get_row_count (); i != j; ++i)
{
cache_get_field_content(i, "name", result); format(test, 300, result);
cache_get_field_content(i, "Rank", result); format(test1, 300, result);
cache_get_field_content(i, "lastOn", result); format(test2, 300, result);
cache_get_field_content(i, "FWarn", result); format(test3, 300, result);
test4 = cache_get_field_content_int(i, "FactionJoin");
idd = cache_get_field_content_int(i, "id");
Selected[playerid][mid] = idd;
new id = GetPlayerID(test);
if(id != INVALID_PLAYER_ID)
{
format(aim, sizeof(aim), "%s%s - %s\tonline right now\t%s/3 fw\t%d days\n", aim, test1, test, test3, GetDaysFromTimestamp(test4));
}
else
{
format(aim, sizeof(aim), "%s%s - %s\t%s\t%s/3 fw\t%d days\n", aim, test1, test, test2, test3, GetDaysFromTimestamp(test4));
}
mid++;
}
cache_delete(membresult);
format(aimtotal, sizeof(aimtotal), "Rank - Name\tLast Login\tFW\tDays in faction\n%s",aim);
if(PlayerInfo[playerid][pRank] >= 6)
{
ShowPlayerDialog(playerid,DIALOG_MEMBERS,DIALOG_ST YLE_TABLIST_HEADERS,"Faction members",aimtotal,"Select","Exit");
}
else
{
ShowPlayerDialog(playerid,DIALOG_MEMBERS,DIALOG_ST YLE_TABLIST_HEADERS,"Faction members",aimtotal,"Exit","");
}
}
return 1;
}
What is the problem with it?
For now I removed this command but I need it.
I ckecked 3 times when freezed and last OnPlayerCommandReceived was /members.
This is the command:
CMD:members(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
if(PlayerInfo[playerid][pMember] >= 1 && PlayerInfo[playerid][pRank] >= 6)
{
new aim[4000],
query[300],
test[300],
test1[300],
test2[300],
test3[300],
test4,
aimtotal[4000],
result[300],
idd,
mid=0;
format(query, sizeof(query), "SELECT * FROM `users` WHERE `users`.`Member` = '%d' ORDER BY `users`.`Rank` DESC LIMIT 50", PlayerInfo[playerid][pMember]);
new Cache: membresult = mysql_query(SQL, query);
for(new i, j = cache_get_row_count (); i != j; ++i)
{
cache_get_field_content(i, "name", result); format(test, 300, result);
cache_get_field_content(i, "Rank", result); format(test1, 300, result);
cache_get_field_content(i, "lastOn", result); format(test2, 300, result);
cache_get_field_content(i, "FWarn", result); format(test3, 300, result);
test4 = cache_get_field_content_int(i, "FactionJoin");
idd = cache_get_field_content_int(i, "id");
Selected[playerid][mid] = idd;
new id = GetPlayerID(test);
if(id != INVALID_PLAYER_ID)
{
format(aim, sizeof(aim), "%s%s - %s\tonline right now\t%s/3 fw\t%d days\n", aim, test1, test, test3, GetDaysFromTimestamp(test4));
}
else
{
format(aim, sizeof(aim), "%s%s - %s\t%s\t%s/3 fw\t%d days\n", aim, test1, test, test2, test3, GetDaysFromTimestamp(test4));
}
mid++;
}
cache_delete(membresult);
format(aimtotal, sizeof(aimtotal), "Rank - Name\tLast Login\tFW\tDays in faction\n%s",aim);
if(PlayerInfo[playerid][pRank] >= 6)
{
ShowPlayerDialog(playerid,DIALOG_MEMBERS,DIALOG_ST YLE_TABLIST_HEADERS,"Faction members",aimtotal,"Select","Exit");
}
else
{
ShowPlayerDialog(playerid,DIALOG_MEMBERS,DIALOG_ST YLE_TABLIST_HEADERS,"Faction members",aimtotal,"Exit","");
}
}
return 1;
}
What is the problem with it?
For now I removed this command but I need it.