hello guys anyone can help with this code? i give example mp_roundtime is 60 min.
I want on every 10 min , dm_headshot_only to turn on and next 10 min turn off.And when this cvar is comming i want text message something like this : Headshot mode is Active , Headshot mode is Inactive , something like that.
Code:
#include <sourcemod>
public Plugin myinfo =
{
name = "HS Only timer test",
author = "Pankrakles",
description = "Changes to and from HS only every 25 mins",
version = "1.0",
};
ConVar g_hhsonly;
public void OnAllPluginsLoaded()
{
g_hhsonly = FindConVar("dm_headshot_only");
}
public void OnPluginStart()
{
CreateTimer(600.0, Timer_ChangeHSOnly, _, TIMER_REPEAT);
}
public Action Timer_ChangeHSOnly(Handle timer)
{
PrintCenterTextAll("Headshot Mode is Active/Inactive,test test test. %d seconds", 600);
g_hhsonly.SetBool(true);
return Plugin_Continue;
}
__________________