mirror of
https://codeberg.org/spire/docker-comp-server.git
synced 2026-08-02 04:14:50 +02:00
fix ExtendHumiliation.sp
This commit is contained in:
parent
4fe16bef54
commit
1c0884386c
1 changed files with 7 additions and 5 deletions
|
|
@ -8,12 +8,12 @@ public Plugin:myinfo =
|
|||
}
|
||||
|
||||
new Handle:gBonusRoundTime = INVALID_HANDLE;
|
||||
new Int:bonustime = 0;
|
||||
int bonustime = 0;
|
||||
|
||||
ConVar g_cvTime;
|
||||
|
||||
|
||||
public OnPluginStart() {
|
||||
public void OnPluginStart() {
|
||||
CreateTimer(1.0, UpdateCvar, _, TIMER_REPEAT);
|
||||
gBonusRoundTime = FindConVar("mp_bonusroundtime");
|
||||
g_cvTime = CreateConVar("bonus_time", "15", "The length of bonus round time");
|
||||
|
|
@ -29,12 +29,14 @@ public OnPluginStart() {
|
|||
//somehow tell sourcemod the plugin has crashed.
|
||||
}
|
||||
}
|
||||
public Action UpdateCvar(Handle timer)
|
||||
{
|
||||
|
||||
public Action UpdateCvar(Handle timer) {
|
||||
bonustime = g_cvTime.IntValue;
|
||||
if (gBonusRoundTime != INVALID_HANDLE)
|
||||
{
|
||||
SetConVarBounds(gBonusRoundTime, ConVarBound_Upper, true, g_cvTime.FloatValue);
|
||||
ServerCommand("mp_bonusroundtime %d", bonustime);
|
||||
}
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue