Quote:
Originally Posted by Arkshine
In CS, SendWeaponAnim doesn't have the same parameter as Hl (one param removed), that's why, in 1.8.3-dev you need to use Ham_CS_Weapon_SendWeaponAnim instead. That it was working in 1.8.2 is probably a bad thing.
|
Maybe it is a bug in 1.8.2, yes.
Well, what i can say now.
I've compiled the mp.dll (removed the check of skiplocal and CanSkip part).
void CBasePlayerWeapon::__MAKE_VHOOK(SendWeaponAni m)(int iAnim, int skiplocal)
{
m_pPlayer->pev->weaponanim = iAnim;
MESSAGE_BEGIN(MSG_ONE, SVC_WEAPONANIM, NULL, m_pPlayer->pev);
WRITE_BYTE(iAnim); // sequence number
WRITE_BYTE(pev->body); // weaponmodel bodygroup.
MESSAGE_END();
}
The amxmod part should look like that:
RegisterHam(Ham_CS_Weapon_SendWeaponAnim, "weapon_glock18", "HamF_CS_Weapon_SendWeaponAnim", 1);
public HamF_CS_Weapon_SendWeaponAnim(iEnt, iAnim, Skiplocal)
{
Skiplocal = 0;
static id;
id = get_pdata_cbase(iEnt, m_pPlayer, 4);
client_print(id, print_chat, "%d", Skiplocal)
}
register_forward(FM_CanSkipPlayer, "Forward_CanSkipPlayer");
public Forward_CanSkipPlayer(pPlayer)
{
return 0;
}
And this is:
int PF_CanSkipPlayer( const edict_t *pClient )
{
client_t *client;
int entnum;
entnum = NUM_FOR_EDICT( pClient );
if (entnum < 1 || entnum > svs.maxclients)
{
Con_Printf ("tried to PF_CanSkipPlayer a non-client\n");
return 0;
}
client = &svs.clients[entnum-1];
return client->lw != 0;
}
So i guess playing just with send weapon anim and skiplocal will give nothing without setting client weapons to zero.
Btw, i found to make it without CD_ID like in previous examples.
Making now full plugin with native to change viewmodel body. Will take some time, just wait.