• Running an Animation on a player
    3 replies, posted
Hi, i need to make the player do the sit sequence(Looks like he/she is sitting ofc), while they are spectating an entity. I'm using [lua]p:Spectate(OBS_MODE_FIXED)[/lua] so all i really need to know is how to make the player perform the animation.
why dont you just put them in a chair?
[QUOTE=SeveredSkull;23036709]why dont you just put them in a chair?[/QUOTE] Because they can only do certain actions while in this entity, and i don't know a way for my entity to know if the player is sat in the chair
This is my animations code (shared): [url]http://code.google.com/p/raamatukogu/source/browse/trunk/gamemode/shared/animations.lua[/url] This is my player code (serverside): [url]http://code.google.com/p/raamatukogu/source/browse/trunk/gamemode/server/sv_player.lua[/url] The function is ply:SitFor (defined in the player code file). But you must use NPC player models (so models/human/bleh.mdl, not models/player/bleh.mdl) which will break most other animations.
Sorry, you need to Log In to post a reply to this thread.