CapsAdmin

Untitled

Mar 17th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. local def =
  2. {
  3.     run = 500,
  4.     walk = 250,
  5.     step = 18,
  6.     jump = 200,
  7.    
  8.     view = Vector(0,0,64),
  9.     viewducked = Vector(0,0,28),   
  10.     mass = 85,
  11.    
  12.     min = Vector(-16, -16, 0),
  13.     max = Vector(16, 16, 72),
  14.     maxduck = Vector(16, 16, 36),
  15. }
  16. hook.Add("UpdateAnimation", "pac_check_scale", function(ply)
  17.             local ply = pac.LocalPlayer
  18.             local siz = ply.pac_player_size or 1
  19.        
  20.             if siz ~= 1 and (ply:GetModelScale() ~= siz or ply:GetViewOffset() ~= def.view * siz) then
  21.                 pac.SetPlayerSize(ply, ply.pac_player_size)
  22.             end
  23.            
  24.             if siz ~= 1 then
  25.                 ply:SetPlaybackRate(1/siz)
  26.                 return true
  27.             end
  28.         end)
Advertisement
Add Comment
Please, Sign In to add comment