Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.19 KB | None | 0 0
  1. include("allspawnprefabs.lua")
  2.  
  3. local PLAYER = {}
  4. PLAYER.DisplayName = "Justice of Lands" -- Lawful Good
  5. PLAYER.WalkSpeed = 150 -- How fast to move when not running
  6. PLAYER.RunSpeed = 275 -- How fast to move when running
  7. PLAYER.CrouchedWalkSpeed = 0.3 -- Multiply move speed by this when crouching
  8. PLAYER.DuckSpeed = 0.3 -- How fast to go from not ducking, to ducking
  9. PLAYER.UnDuckSpeed = 0.3 -- How fast to go from ducking, to not ducking
  10. PLAYER.JumpPower = 300 -- How powerful our jump should be
  11. PLAYER.CanUseFlashlight = true -- Can we use the flashlight
  12. PLAYER.MaxHealth = 125 -- Max health we can have
  13. PLAYER.StartHealth = 125 -- How much health we start with
  14. PLAYER.StartArmor = 0 -- How much armour we start with
  15. PLAYER.DropWeaponOnDie = false -- Do we drop our weapon when we die
  16. PLAYER.TeammateNoCollide = true -- Do we collide with teammates or run straight through them
  17. PLAYER.AvoidPlayers = true -- Automatically swerves around other players
  18. PLAYER.UseVMHands = true -- Uses viewmodel hands
  19.  
  20. --
  21. -- Name: PLAYER:SetupDataTables
  22. -- Desc: Set up the network table accessors
  23. -- Arg1:
  24. -- Ret1:
  25. --
  26. function PLAYER:SetupDataTables()
  27. end
  28.  
  29. --
  30. -- Name: PLAYER:Init
  31. -- Desc: Called when the class object is created (shared)
  32. -- Arg1:
  33. -- Ret1:
  34. --
  35. function PLAYER:Init()
  36. end
  37.  
  38. --
  39. -- Name: PLAYER:Spawn
  40. -- Desc: Called serverside only when the player spawns
  41. -- Arg1:
  42. -- Ret1:
  43. --
  44. function PLAYER:Spawn()
  45. print("Lawful Good spawn.")
  46. local ent = ents.Create( "prop_physics" )
  47. //ply = LocalPlayer()
  48. //ply:SetPos( Vector(3127, -2662, 824) )
  49. //data = prefabs[1]
  50. ent:SetModel( prefabs[1][prop1model] )
  51. ent:SetPos( Vector( 3127, -2662, 824 ) )
  52. ent:SetAngles( Angle( 11, -177, 0 ) )
  53. ent:Spawn()
  54.  
  55. //cleanup.Add( self.Owner, "props", ent)
  56. end
  57.  
  58. --
  59. -- Name: PLAYER:Loadout
  60. -- Desc: Called on spawn to give the player their default loadout
  61. -- Arg1:
  62. -- Ret1:
  63. --
  64. function PLAYER:Loadout()
  65.  
  66. self.Player:Give( "weapon_lawfulgood" )
  67. self.Player:GiveAmmo( 255, "SMG1", true )
  68.  
  69. end
  70.  
  71. function PLAYER:SetModel()
  72.  
  73. //local cl_playermodel = self.Player:GetInfo( "models/alyx.mdl" )
  74. //local modelname = player_manager.TranslatePlayerModel( cl_playermodel )
  75. util.PrecacheModel( "models/player/breen.mdl" )
  76. self.Player:SetModel( "models/player/breen.mdl" )
  77.  
  78. end
  79.  
  80. -- Clientside only
  81. function PLAYER:CalcView( view ) end -- Setup the player's view
  82. function PLAYER:CreateMove( cmd ) end -- Creates the user command on the client
  83. function PLAYER:ShouldDrawLocal() end -- Return true if we should draw the local player
  84.  
  85. -- Shared
  86. function PLAYER:StartMove( cmd, mv ) end -- Copies from the user command to the move
  87. function PLAYER:Move( mv ) end -- Runs the move (can run multiple times for the same client)
  88. function PLAYER:FinishMove( mv ) end -- Copy the results of the move back to the Player
  89.  
  90. --
  91. -- Name: PLAYER:ViewModelChanged
  92. -- Desc: Called when the player changes their weapon to another one causing their viewmodel model to change
  93. -- Arg1: Entity|viewmodel|The viewmodel that is changing
  94. -- Arg2: string|old|The old model
  95. -- Arg3: string|new|The new model
  96. -- Ret1:
  97. --
  98. function PLAYER:ViewModelChanged( vm, old, new )
  99. end
  100.  
  101. --
  102. -- Name: PLAYER:PreDrawViewmodel
  103. -- Desc: Called before the viewmodel is being drawn (clientside)
  104. -- Arg1: Entity|viewmodel|The viewmodel
  105. -- Arg2: Entity|weapon|The weapon
  106. -- Ret1:
  107. --
  108. function PLAYER:PreDrawViewModel( vm, weapon )
  109. end
  110.  
  111. --
  112. -- Name: PLAYER:PostDrawViewModel
  113. -- Desc: Called after the viewmodel has been drawn (clientside)
  114. -- Arg1: Entity|viewmodel|The viewmodel
  115. -- Arg2: Entity|weapon|The weapon
  116. -- Ret1:
  117. --
  118. function PLAYER:PostDrawViewModel( vm, weapon )
  119. end
  120.  
  121. --
  122. -- Name: PLAYER:GetHandsModel
  123. -- Desc: Called on player spawn to determine which hand model to use
  124. -- Arg1:
  125. -- Ret1: table|info|A table containing model, skin and body
  126. --
  127. function PLAYER:GetHandsModel()
  128.  
  129. -- return { model = "models/weapons/c_arms_cstrike.mdl", skin = 1, body = "0100000" }
  130.  
  131. local playermodel = player_manager.TranslateToPlayerModelName( self.Player:GetModel() )
  132. return player_manager.TranslatePlayerHands( playermodel )
  133.  
  134. end
  135.  
  136. player_manager.RegisterClass( "player_lawfulgood", PLAYER, player_default )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement