#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define ADMIN_ACCESS ADMIN_BAN // Флаг, которому будет выдана скорость
#define ADMIN_SPEED 300.0 // Какую скорость выдавать админу? ( Стандартно 260.0 , вроде :D )
public plugin_init()
{
register_plugin("Admin Speed", "1.0", "TBONTB");
RegisterHam(Ham_Spawn, "player", "CBasePlayer_Spawn");
register_event("CurWeapon", "WeaponChange", "be", "1=1");
}
public CBasePlayer_Spawn(id)
{
if(!is_user_alive(id) || ~get_user_flags(id) & ADMIN_ACCESS) return;
set_pev(id, pev_maxspeed, ADMIN_SPEED);
}
public WeaponChange(id)
{
if(is_user_alive(id) && get_user_flags(id) & ADMIN_ACCESS)
set_pev(id, pev_maxspeed, ADMIN_SPEED);
}
#include < amxmodx >
#include < hamsandwich >
#if !defined Ham_CS_Player_ResetMaxSpeed
#define Ham_CS_Player_ResetMaxSpeed Ham_Item_PreFrame
#endif
#define ADMIN_ACCESS ADMIN_BAN // Флаг, которому будет выдана скорость
#define ADMIN_SPEED 300.0 // Какую скорость выдавать админу? ( Стандартно 260.0 , вроде :D )
public plugin_init() {
RegisterHam(Ham_CS_Player_ResetMaxSpeed, "player", "HamHook_ResetMaxSpeed", true);
}
public HamHook_ResetMaxSpeed(const iPlayer){
if (!is_user_alive(iPlayer) || pev(iPlayer, pev_maxspeed) == 1.0) //in freezetime player have 1.0 maxspeed
return HAM_IGNORED;
if (get_user_flags(iPlayer) & ADMIN_ACCESS) {
set_pev(iPlayer, pev_maxspeed, ADMIN_SPEED);
}
return HAM_IGNORED;
}