Raised This Month: $51 Target: $400
 12% 

Set player animation


Post New Thread Reply   
 
Thread Tools Display Modes
arbol
Junior Member
Join Date: Sep 2013
Location: Argentina
Old 05-18-2014 , 22:30   Re: Set player animation
Reply With Quote #11

Would you explain please the function needed to set a client's animation?

I looked for SetAnimation and SetActivity here: http://docs.sourcemod.net/api/
They don't exist.

Anyway, i managed to associate the big number (m_hPlayer) with the client ID and so now i can set animations on any client ID , but my solution is very untidy and abuse of bad practises.
It would be really helpful to have something like this:

Code:
 
SetPlayerAnimation(clientid, animNumber){}; //sets a client animation
The animation i was talking about are the default ones (jump, reload, etc.)
arbol is offline
arbol
Junior Member
Join Date: Sep 2013
Location: Argentina
Old 06-12-2014 , 19:53   Re: Set player animation
Reply With Quote #12

Hi all modders.
I am still using the untidy piece of code.
Does any of you know how to set a player's animation?

The function should be something like this:

Code:
public setPlayerAnimation(client, animationID){
  //sets client animation to the animationID given by argument
}


I would appreciate help from your part.
And, i don't mean to be rude or unpolite, but i have a strong feeling that changing a player animation is something quite elemental (important, basic) to ANY mod for CS. This would surely help people from Zombie, Surf, etc. And , as i search for similar threads, it is still unresolved for CS GO. So it kind of surprises me.
arbol is offline
a3a3a
Member
Join Date: Jan 2014
Old 07-11-2014 , 06:29   Re: Set player animation
Reply With Quote #13

How you get Handle through client index ?

-------------------------

Sorry for bad english ..
a3a3a is offline
DJPlaya
Senior Member
Join Date: Nov 2014
Location: Germany
Old 03-05-2017 , 17:47   Re: Set player animation
Reply With Quote #14

Quote:
Originally Posted by arbol View Post
Code:
public setPlayerAnimation(client, animationID){
  //sets client animation to the animationID given by argument
}
I wasent aware that there is an function for doing so?

i would do it like in sm parachutes
Code:
SetVariantString("taunt06");
AcceptEntityInput(client, "SetAnimation");
__________________
My biggest Projects: Kigen AC Redux, Forlix Floodcheck Redux
DJPlaya is offline
Send a message via Skype™ to DJPlaya
Sreaper
髪を用心
Join Date: Nov 2009
Old 03-07-2017 , 01:12   Re: Set player animation
Reply With Quote #15

Quote:
Originally Posted by DJPlaya View Post
I wasent aware that there is an function for doing so?

i would do it like in sm parachutes
Code:
SetVariantString("taunt06");
AcceptEntityInput(client, "SetAnimation");
This thread is from 2014 and the user you quoted hasn't logged onto the forum in over a year.

Last edited by Sreaper; 03-07-2017 at 01:13.
Sreaper is offline
ghost35
New Member
Join Date: Aug 2021
Old 08-09-2021 , 16:30   Re: Set player animation
Reply With Quote #16

new amount = 8;
new iOffset = GetEntData(client, (FindDataMapInfo(client, "PA_Medic") + amount));

"m_hPlayer" from client index ( offset 2476 )

Last edited by ghost35; 08-09-2021 at 16:32.
ghost35 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:05.


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