rendered paste body// Gestures And Tid Bits
Wave = false
function MakePlayerWave()
Wave = true
end
function GM:SetPlayerAnimation( pl, anim )
local wep = tostring(pl:GetActiveWeapon())
local Speed = pl:GetVelocity():Length()
local OnGround = pl:OnGround()
if( pl:GetActiveWeapon():IsValid() ) then Wep_name = pl:GetActiveWeapon():GetClass() end
//local Wep_name = pl:GetActiveWeapon():GetClass()
// ----------------------------------------------------------
// IDLE
// ----------------------------------------------------------
local anim = "idle_angry"
//----------------------------------------------------------
// SMG/Idle
//----------------------------------------------------------
if (OnGround && Wep_name == "weapon_smg1") then
anim = "Idle_Angry_SMG1"
end
//-----------------------------------------------------------
// SMG/Moving
//-----------------------------------------------------------
if ( Speed > 0 && OnGround && Wep_name == "weapon_smg1" && !pl:Crouching() ) then
if (Speed > 150) then
anim = "run_SMG1_Relaxed_all"
else
anim = "walk_SMG1_Relaxed_all"
end
end
// ----------------------------------------------------------
// SMG/Firing
//-----------------------------------------------------------
if ( OnGround && Wep_name == "weapon_smg1" && pl:KeyDown( IN_ATTACK ) ) then
anim = "shoot_smg1"
end
// ----------------------------------------------------------
// Gesture/Wave
//-----------------------------------------------------------
if ( OnGround && Wave == true ) then
anim = "Wave"
Wave = false
end
// ----------------------------------------------------------
// CROUCHING & NOT MOVING
// ----------------------------------------------------------
if ( OnGround && pl:Crouching() ) then
anim = "Sit_Ground"
end
// ----------------------------------------------------------
// CROUCHING & MOVING
// ----------------------------------------------------------
if ( Speed > 0 && OnGround && pl:Crouching() ) then
anim = "Crouch_walk_all"
end
// ----------------------------------------------------------
// RUNNING/WALKING
// ----------------------------------------------------------
if (Speed > 0 && OnGround && !pl:Crouching() ) then
if (Speed > 150) then
anim = "run_all"
else
anim = "walk_all"
end
end
// ----------------------------------------------------------
// JUMPING
// ----------------------------------------------------------
if ( !OnGround ) then
anim = "jump_holding_glide"
end
// ----------------------------------------------------------
// TRANSLATION AND UPDATING ANIM
// ----------------------------------------------------------
anim = pl:LookupSequence(anim)
if (pl:GetSequence() == anim) then return end
pl:SetPlaybackRate( 1.0 )
pl:ResetSequence( anim )
pl:SetCycle( 0 )
end
// Gestures & Tid Bits COMMANDS
concommand.Add( "npl_wave", MakePlayerWave )