Quote:
Originally Posted by SpannerSpammer
I don't know if this will work, but try this:
Hook UpdateClientData, see if the viewmodel is the custom one one you set.
If it is, then set a task for about 0.5 seconds or more to send an SVC_WEAPONANIM MSG
to the client (You have to delay this for the Update MSG to be sent to the client first).
Set the weapon animation and bodygroup as needed.
Code:
stock SendWeaponAnim( id, iAnim, iBody )
{
if ( !is_valid_player(id) || is_user_bot( id ) ) return 0; // check player validity first with some function (Humans only)
set_pev( id, pev_weaponanim, iAnim );
message_begin( MSG_ONE, SVC_WEAPONANIM, _, id );
write_byte( iAnim ); // sequence number.
write_byte( iBody ); // weaponmodel bodygroup.
message_end();
return 1;
}
|
First of all thank you for helping me!
Quote:
|
see if the viewmodel is the custom one one you set.
|
How can i check if the viewmodel is the one i set?
Quote:
to send an SVC_WEAPONANIM MSG
to the client
|
Like this?
PHP Code:
message_begin(MSG_ONE, SVC_WEAPONANIM, {0, 0, 0}, player)
write_byte(iAnim)
write_byte(iHands) // id of hands
message_end()
Quote:
|
Set the weapon animation and bodygroup as needed.
|
Where?
Btw user
Backstabnoob said it will look bad... (
https://forums.alliedmods.net/showpo...0&postcount=25)
I guess i should forget this and just make seperated model files.
Too much work and it will not look good.