Move this to sh_player

This commit is contained in:
Fesiug 2023-11-15 19:01:38 -05:00
parent 2b4ddf604d
commit 6d2fdf2191
2 changed files with 20 additions and 19 deletions

View File

@ -1,22 +1,4 @@
function GM:PlayerSpawn( ply )
player_manager.SetPlayerClass( ply, "player_benny" )
ply:SetModel( "models/player/police.mdl" )
ply:SetViewOffset( Vector( 0, 0, 64 ) )
ply:SetViewOffsetDucked( Vector( 0, 0, 50 ) )
ply:SetPlayerColor( Vector( 0.275, 0.2, 0.145 ) )
ply:Give( "benny" )
ply:SetCrouchedWalkSpeed( 0.3 )
ply:SetDuckSpeed( 0.1 )
ply:SetUnDuckSpeed( 0.1 )
ply:SetSlowWalkSpeed( 100 )
ply:SetWalkSpeed( 160 )
ply:SetRunSpeed( 220 )
ply:SetStepSize( 16 )
ply:SetCanZoom( false )
end
if SERVER then if SERVER then
util.AddNetworkString( "benny_syncinv" ) util.AddNetworkString( "benny_syncinv" )
util.AddNetworkString( "benny_sendinvitem" ) util.AddNetworkString( "benny_sendinvitem" )

View File

@ -1,8 +1,27 @@
function GM:PlayerSpawn( ply )
player_manager.SetPlayerClass( ply, "player_benny" )
ply:SetModel( "models/player/police.mdl" )
ply:SetViewOffset( Vector( 0, 0, 64 ) )
ply:SetViewOffsetDucked( Vector( 0, 0, 50 ) )
ply:SetPlayerColor( Vector( 0.275, 0.2, 0.145 ) )
ply:Give( "benny" )
ply:SetCrouchedWalkSpeed( 0.3 )
ply:SetDuckSpeed( 0.1 )
ply:SetUnDuckSpeed( 0.1 )
ply:SetSlowWalkSpeed( 100 )
ply:SetWalkSpeed( 160 )
ply:SetRunSpeed( 220 )
ply:SetStepSize( 16 )
ply:SetCanZoom( false )
end
local PT = FindMetaTable( "Player" ) local PT = FindMetaTable( "Player" )
function PT:BennyCheck() function PT:BennyCheck()
return ( self:GetActiveWeapon():IsValid() and self:GetActiveWeapon():GetClass() == "benny" and self:GetActiveWeapon().GetUserAim ) local wep = self:GetActiveWeapon()
return ( wep:IsValid() and wep:GetClass() == "benny" and wep.GetUserAim )
end end
function PT:CamSpot( ang ) function PT:CamSpot( ang )