Hello can anyone help me add a cvar to block using this plugin function from team, like block for red or blue team. Thanks!
#include <sourcemod>
#include <tf2>
#include <tf2attributes>
new Handle:CheckTimers[MAXPLAYERS+1];
public Plugin:myinfo =
{
name = "pluginname",
author = "",
description = "",
version = "1.0",
url = ""
}
new LastUsed[MAXPLAYERS+1];
public OnPluginStart()
{
AddCommandListener(oncallmedic, "voicemenu");
}
public Action
ncallmedic(iClient, const String:command[], iArgc)
{
decl String:Cmd1[8], String:Cmd2[8];
GetCmdArg(1, Cmd1, sizeof(Cmd1));
GetCmdArg(2, Cmd2, sizeof(Cmd2));
new i_cmd1 = StringToInt(Cmd1);
new i_cmd2 = StringToInt(Cmd2);
new bool:Access = CheckCommandAccess(iClient, "speedboost", ADMFLAG_RESERVATION);
if(Access)
{
if(i_cmd1==0 && i_cmd2==0 && iClient>0)
{
CheckTimers[iClient] = CreateTimer(10.0, h_reset, iClient);
new currentTime = GetTime();
if (currentTime - LastUsed[iClient] < 25)
{
return Plugin_Handled;
}
LastUsed[iClient] = GetTime();
TF2_AddCondition(iClient, TFCond_SpeedBuffAlly, 10.0);
TF2_AddCondition(iClient, TFCond_MegaHeal, 10.0);
TF2Attrib_SetByName(iClient, "increased jump height", 2.0);
}
}
}
public Action:h_reset(Handle:timer, any:iClient)
{
TF2Attrib_SetByName(iClient, "increased jump height", 1.0);
CheckTimers[iClient] = INVALID_HANDLE;
}