Code:
#include < amxmodx >
#include < orpheu >
#include < orpheu_stocks >
new Float:g_vecMoveAngles[ 3 ];
public plugin_init( )
{
new OrpheuFunction:funcPM_Move = OrpheuGetDLLFunction( "pfnPM_Move", "PM_Move" );
OrpheuRegisterHook( funcPM_Move, "OnPM_Move" );
OrpheuRegisterHook( funcPM_Move, "OnPM_Move_Post", OrpheuHookPost );
}
public OnPM_Move( OrpheuStruct:ppmove, server )
{
OrpheuGetStructMember( ppmove, "angles", g_vecMoveAngles );
OrpheuSetStructMember( ppmove, "angles", Float:{ 0.0, 0.0, 0.0 } );
}
public OnPM_Move_Post( OrpheuStruct:ppmove, server )
{
OrpheuSetStructMember( ppmove, "angles", g_vecMoveAngles );
}
The idea is to set angles to 0,0,0 so that the movement is always the same direction for each movement key.
For example, holding +forward key will always go the same direction regardless of player angles.
However, it isn't working.
There are no errors in parsing anything when Orpheu loads, and there are no errors in the plugin.
__________________