CS:S Player Animations / Models

I’ve been fumbling with this idea for awhile, and while I am aware it is possible to do this, I haven’t found anyone willing enough to actually start on this project. I have a basic understanding for LUA, but I was wondering if anyone would be willing to work on a project where CS:S player models could be dropped right into the game and use their proper animations and mounting points for W_ models in game. It’s primarily for a game mode I will be working on in the future, and was wondering if anyone had accomplished something similar or would be willing to work on it.


Im doing the same thing with my Day Of Defeat gamemode. Im just trying to get animations to work with weapons and such.

Maybe we could collaborate?



Also back on topic with the css animations. I tried doing it once and the best I could get was the walking, running, crouching, and jumping animations working. The only problem was the model wasn’t rotating with the player for some reason, they were always facing one direction, so I gave up. When I get home I’ll post what I had if you want it

I also belive _Kilburn did this in his TF2 Gamemode somehow…

//Server shit

function TranslateActivity(pl, act)
local weap = pl:GetActiveWeapon()
local hold = weap.HoldType or “secondary”

local e = _E[act .. "_" .. string.upper(hold)]

return e


function GM:SetPlayerAnimation( pl, anim )

local Speed = pl:GetVelocity():Length()
local OnGround = pl:OnGround()
local Water = pl:WaterLevel()

local act = TranslateActivity(pl, "ACT_MP_STAND")
local gesture = nil
local attack = false

if anim == PLAYER_RELOAD then

	gesture = TranslateActivity(pl, "ACT_MP_RELOAD_STAND")

elseif anim == PLAYER_JUMP then

	act = TranslateActivity(pl, "ACT_MP_JUMP_START")

elseif anim == PLAYER_ATTACK1 then

	gesture = TranslateActivity(pl, "ACT_MP_ATTACK_STAND")
	attack = true

elseif OnGround && pl:Crouching() then

	if Speed > 0 then
		act = TranslateActivity(pl, "ACT_MP_CROUCHWALK")
		act = TranslateActivity(pl, "ACT_MP_CROUCH")

elseif !OnGround && Water == 0 then

	act = TranslateActivity(pl, "ACT_MP_AIRWALK")

elseif Water > 1 then

	act = TranslateActivity(pl, "ACT_MP_SWIM")

elseif Speed > 0 then

	act = TranslateActivity(pl, "ACT_MP_RUN")


if gesture then
	pl:RestartGesture( pl:Weapon_TranslateActivity( gesture ) )
	if attack then	
		pl:Weapon_SetActivity( pl:Weapon_TranslateActivity( ACT_RANGE_ATTACK1 ), 0 );

local seq = pl:SelectWeightedSequence( act ) 

if (pl:GetSequence() == seq) then return end

pl:SetPlaybackRate( 1.0 )
pl:ResetSequence( seq )
pl:SetCycle( 0 )


//shared shit
function GM:UpdateAnimation(pl, anim)

local vel = pl:GetVelocity()
local velspeed = vel:Length()
local eye = pl:EyeAngles()

pl:SetPoseParameter("body_pitch", -eye.p)

eye.p = 0
local forward, right = eye:Forward(), eye:Right()

local veln = vel:GetNormal()
local dot = veln:Dot(forward)
local dotr = veln:Dot(right)

local spd = math.Clamp(velspeed/pl:GetMaxSpeed(), 0, 1)

pl:SetPoseParameter("move_x", spd*dot)
pl:SetPoseParameter("move_y", spd*dotr)


Made by AzuiSleet too, just can’t find the original post.