Quote:
Originally Posted by Arkshine
Try that.
Unzip setanimation-files in /dlls (1.8.2) or /modules (1.8.3-dev)
In your plugin use the OnSetAnimation forward:
Code:
public OnSetAnimation(player, anim)
{
// return PLUGIN_HANDLED to block the call
}
EDIT: I guess I could add a native later.
|
Any chance you could add the ability to call SetAnimation with a native? I tried to add it but I get a crash as soon as it gets called.
PHP Code:
cell AMX_NATIVE_CALL CallSetAnimation(AMX * Handle, cell * Parameter)
{
int id = Parameter[1];
int anim = Parameter[2];
const void *pvPlayer = reinterpret_cast<const void*>((INDEXENT(id)->pvPrivateData));
SetAnimationDetour->DisableDetour();
SetAnimationOrig(pvPlayer, anim);
SetAnimationDetour->EnableDetour();
return 1;
}
Testing on windows.
__________________