AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   player animation (https://forums.alliedmods.net/showthread.php?t=317448)

LearninG 07-14-2019 07:44

player animation
 
Hi, I want to show a "player" animation when user shoots with the bow :
PHP Code:

public FireArrow(id)
{
             
playanim(idanim_shot1)// this is weapon animation and only user can see that 
             //here I would add "player" animation so that all other players can see that. 

Do I need to make a completely different anim or it is possible to convert the current one into "player" animation?
If I need to make different "player" animation , how do I do that?

Natsheh 07-14-2019 12:04

Re: player animation
 
What's playanim?

LearninG 07-14-2019 12:34

Re: player animation
 
PHP Code:

//play anim
public playanim(player,anim)
{
    
set_pev(playerpev_weaponanimanim)
    
message_begin(MSG_ONESVC_WEAPONANIM, {000}, player)
    
write_byte(anim)
    
write_byte(pev(playerpev_body))
    
message_end()



thEsp 07-14-2019 13:37

Re: player animation
 
A player is not a weapon so pev_weaponanim and SVC_WEAPONANIM are useless, pev_gaitsequence is the way it should work I think.

LearninG 07-14-2019 13:40

Re: player animation
 
Quote:

Originally Posted by thEsp (Post 2659106)
A player is not a weapon so pev_weaponanim and SVC_WEAPONANIM are useless, pev_sequence is the way it should work I think.

can you show me an example with pev_squence ?

LearninG 07-14-2019 13:54

Re: player animation
 
Quote:

squence_num
last question, how to find these numbers , needed anims (player anims) ?

HamletEagle 07-14-2019 14:01

Re: player animation
 
To set player animations you have to use pev_sequence, pev_gaitsequence, but it's not a one time setup(because on the next call of SetAnimation it will overwrite your animation).

edon1337 07-14-2019 16:00

Re: player animation
 
Quote:

Originally Posted by LearninG (Post 2659110)
last question, how to find these numbers , needed anims (player anims) ?

Open the model with Jed's Model Viewer and you'll have each sequence listed there.

As HamletEagle said, you can't just play a sequence on a player because it will be overwritten by the default animations, you have to use Arkshines module, you can find it somewhere in the forum.


All times are GMT -4. The time now is 17:16.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.