Quote:
Originally Posted by hleV
Code:
#include <amxmodx>
#include <fakemeta>
#define XXX_SPEED 320.0
public plugin_init()
register_forward(FM_CmdStart, "fwdCmdStart");
public fwdCmdStart(iCl, iHandle)
{
if (get_uc(iHandle, UC_Buttons) & IN_ATTACK)
set_pev(iCl, pev_maxspeed, XXX_SPEED);
else
set_pev(iCl, pev_maxspeed, 250.0);
}
Do you really have to check what speed client currently has so you could add some more? IMO it's OK just to set default XXX_SPEED.
|
Some weapons have different maxspeeds [awp/auto-snipe=210, M249=220, pistols/knife/...=250] so you should cache the current weapons maxspeed at CurWeapon so it can be set appropriately instead of using 250 for everything. I just made this fix in my speed toggle plugin [not yet posted].
__________________