hmm
from player.cpp
Code:
void CBasePlayer::PlayerRunCommand(CUserCmd *ucmd, IMoveHelper *moveHelper)
{
m_touchedPhysObject = false;
if ( pl.fixangle == FIXANGLE_NONE)
{
VectorCopy ( ucmd->viewangles, pl.v_angle );
}
// Handle FL_FROZEN.
// Prevent player moving for some seconds after New Game, so that they pick up everything
if( GetFlags() & FL_FROZEN ||
(developer.GetInt() == 0 && gpGlobals->eLoadType == MapLoad_NewGame && gpGlobals->curtime < 3.0 ) )
{
ucmd->forwardmove = 0;
ucmd->sidemove = 0;
ucmd->upmove = 0;
ucmd->buttons = 0;
ucmd->impulse = 0;
VectorCopy ( pl.v_angle, ucmd->viewangles );
}
PlayerMove()->RunCommand(this, ucmd, moveHelper);
}
I couldn't figure yet arguments, but try this:
Code:
#include <hacks>
new g_iHooks[MAXPLAYERS + 1] = { -1, ... };
public OnClientPutInServer(client)
{
g_iHooks[client] = Hacks_Hook(client, HACKS_HTYPE_PLAYERRUNCOMMAND, HookClientCommand, false);
}
public OnClientDisconnect(client)
{
Hacks_Unhook(g_iHooks[client]);
}
public HookClientCommand(client, buttons, weapon, forwardmove, sidemove, upmove)
{
if(buttons & IN_RELOAD)
{
// stuff
}
return Hacks_Continue;
}