//------------------------------------------------------------------------------
// GPL LISENCE (short)
//------------------------------------------------------------------------------
/*
* Copyright (c) 2016 R1KO
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public Plugin myinfo =
{
name = "Endurance",
author = "R1KO (skype: vova.andrienko1)",
version = "1.0.0"
};
#include <sourcemod>
int m_flVelocityModifier;
public void OnPluginStart()
{
if((m_flVelocityModifier = FindSendPropInfo("CCSPlayer", "m_flVelocityModifier")) == -1)
SetFailState("No found offset: m_flVelocityModifier");
}
public Action OnPlayerRunCmd(int iClient)
{
if(IsPlayerAlive(iClient) && GetEntDataFloat(iClient, m_flVelocityModifier) < 1.0)
SetEntDataFloat(iClient, m_flVelocityModifier, 1.0, true);
}