mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
Make it easier to change the max tier
This commit is contained in:
parent
a350d7982c
commit
7cbb250541
@ -631,9 +631,11 @@ public Action Command_SetTier(int client, int args)
|
|||||||
|
|
||||||
int tier = StringToInt(sArg);
|
int tier = StringToInt(sArg);
|
||||||
|
|
||||||
if(args == 0 || tier < 1 || tier > 10)
|
int maxtier = GetMaxTier();
|
||||||
|
|
||||||
|
if(args == 0 || tier < 1 || tier > maxtier)
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "%T", "ArgumentsMissing", client, "sm_settier <tier> (1-10) [map]");
|
ReplyToCommand(client, "%T", "ArgumentsMissing", client, "sm_settier <tier> (1-%d) [map]", maxtier);
|
||||||
|
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
@ -1722,3 +1724,10 @@ public void SQL_DeleteMap_Callback(Database db, DBResultSet results, const char[
|
|||||||
UpdateAllPoints(true);
|
UpdateAllPoints(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int GetMaxTier()
|
||||||
|
{
|
||||||
|
float val = 10.0;
|
||||||
|
gCV_DefaultTier.GetBounds(ConVarBound_Upper, val);
|
||||||
|
return RoundToFloor(val);
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user