Skip to content

Commit

Permalink
Merge pull request #292 from 1zc/selectPlayerRank-update
Browse files Browse the repository at this point in the history
Specify style = 0 when running db_selectPlayerRank
  • Loading branch information
dPexxIAM authored Sep 7, 2021
2 parents da4c9fa + 358c0e4 commit 5464877
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/surftimer/sql.sp
Original file line number Diff line number Diff line change
Expand Up @@ -7789,12 +7789,12 @@ public void db_selectPlayerRank(int client, int rank, char szSteamId[32])
{
g_rankArg[client] = rank;
rank -= 1;
Format(szQuery, 1024, "SELECT `name`, `points` FROM `ck_playerrank` ORDER BY `points` DESC LIMIT %i, 1;", rank);
Format(szQuery, 1024, "SELECT `name`, `points` FROM `ck_playerrank` WHERE `style` = 0 ORDER BY `points` DESC LIMIT %i, 1;", rank);
}
else if (rank == 0) // Self Rank Cmd
{
g_rankArg[client] = -1;
Format(szQuery, 1024, "SELECT `name`, `points` FROM `ck_playerrank` WHERE `steamid` = '%s';", szSteamId);
Format(szQuery, 1024, "SELECT `name`, `points` FROM `ck_playerrank` WHERE `steamid` = '%s' AND `style` = 0;", szSteamId);
}

SQL_TQuery(g_hDb, db_selectPlayerRankCallback, szQuery, client, DBPrio_Low);
Expand Down

0 comments on commit 5464877

Please sign in to comment.