27.08.2014, 16:50
Ok, the problem is
The rank name for rank 6 in LSPD is "RANK6" but when I /stats and /gov it doesn't show.
Thats the loading, when I add print(szValue); all it says is RANK6 twice.
The rank name for rank 6 in LSPD is "RANK6" but when I /stats and /gov it doesn't show.
pawn Код:
stock LoadGroups()
{
new DBResult:query = db_query(Database, "SELECT * FROM Groups"), szValue[64];
for(new i=0; i < db_num_rows(query); i++)
{
db_get_field_assoc(query, "Active", szValue, sizeof(szValue));
GroupInfo[i][gActive] = strval(szValue);
db_get_field_assoc(query, "Name", szValue, sizeof(szValue));
format(GroupInfo[i][gName], sizeof(szValue), "%s", szValue);
db_get_field_assoc(query, "Type", szValue, sizeof(szValue));
GroupInfo[i][gType] = strval(szValue);
db_get_field_assoc(query, "Rank0", szValue, sizeof(szValue));
GroupInfo[i][gRank0] = strval(szValue);
db_get_field_assoc(query, "Rank1", szValue, sizeof(szValue));
GroupInfo[i][gRank1] = strval(szValue);
db_get_field_assoc(query, "Rank2", szValue, sizeof(szValue));
GroupInfo[i][gRank2] = strval(szValue);
db_get_field_assoc(query, "Rank3", szValue, sizeof(szValue));
GroupInfo[i][gRank3] = strval(szValue);
db_get_field_assoc(query, "Rank4", szValue, sizeof(szValue));
GroupInfo[i][gRank4] = strval(szValue);
db_get_field_assoc(query, "Rank5", szValue, sizeof(szValue));
GroupInfo[i][gRank5] = strval(szValue);
db_get_field_assoc(query, "Rank6", szValue, sizeof(szValue));
GroupInfo[i][gRank6] = strval(szValue);
db_next_row(query);
}
}