Advertisement
no1star

Untitled

Apr 12th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. SWEP.Base = "weapon_lightsaber" -- No reason to change this
  2.  
  3. SWEP.Spawnable = true -- Can be spawned through the Q menu
  4. SWEP.PrintName = "Sith Acolyte Blade" -- SWEP name on the Q menu
  5. SWEP.IsLightsaber = true -- Self explanatory
  6.  
  7. function SWEP:GetForcePowers()
  8. return {"Force Repulse"} -- Force abilities added here, make sure each string is seperated by a comma
  9. end
  10.  
  11. function SWEP:GetForms()
  12. return {"Phalanx B"} -- Force abilities added here, make sure each string is seperated by a comma
  13. end
  14.  
  15. function SWEP:SetupDataTables()
  16. self:NetworkVar( "Float", 0, "BladeLength" )
  17. self:NetworkVar( "Float", 1, "MaxLength" )
  18. self:NetworkVar( "Float", 2, "BladeWidth" )
  19. self:NetworkVar( "Float", 3, "Force" )
  20. self:NetworkVar( "Float", 4, "MaxForce" )
  21. self:NetworkVar( "Float", 5, "ForceRegen" )
  22.  
  23. self:NetworkVar( "Bool", 0, "DarkInner" )
  24. self:NetworkVar( "Bool", 1, "Enabled" )
  25. self:NetworkVar( "Bool", 2, "Swung" )
  26. self:NetworkVar( "Bool", 3, "Blocking" )
  27. self:NetworkVar( "Bool", 4, "DualBlade" )
  28.  
  29. self:NetworkVar( "Int", 0, "ForceType" )
  30. self:NetworkVar( "Int", 1, "IncorrectPlayerModel" )
  31. self:NetworkVar( "Int", 2, "SwingSequence" )
  32. self:NetworkVar( "Int", 3, "HeroHealth" )
  33. self:NetworkVar( "Int", 4, "Blades" )
  34.  
  35. self:NetworkVar( "Vector", 0, "CrystalColor" )
  36. self:NetworkVar( "Vector", 1, "1CrystalColor" )
  37. self:NetworkVar( "Vector", 2, "2CrystalColor" )
  38. self:NetworkVar( "Vector", 3, "3CrystalColor" )
  39.  
  40. self:NetworkVar( "String", 0, "WorldModel" )
  41. self:NetworkVar( "String", 1, "OnSound" )
  42. self:NetworkVar( "String", 2, "OffSound" )
  43. self:NetworkVar( "String", 3, "SecWorldModel" )
  44.  
  45. self:NetworkVar( "Bool", 5, "Open" )
  46. self:NetworkVar( "Bool", 6, "Close" )
  47. self:NetworkVar( "Int", 5, "FormType" )
  48. self:NetworkVar( "Bool", 7, "Anim" )
  49. self:NetworkVar( "Bool", 8, "Stunned")
  50.  
  51. self:SetNWString("IdleAnim", "phalanx_b_idle")
  52. self:SetNWString("IdleAnimLower", "phalanx_b_idle")
  53. self:SetNWString("WalkAnimLower", "phalanx_b_run")
  54. self:SetNWString("RunAnimLower", "phalanx_b_run")
  55. self:SetNWString("RunAnimBody", "phalanx_b_run_body")
  56. self:SetNWString("BlockingAnim", "b_block_left")
  57.  
  58. if ( SERVER ) then
  59. self:SetBladeLength( 0 )
  60. self:SetBladeWidth( 2 )
  61. self:SetMaxLength( 42 )
  62. self:SetDarkInner( false )
  63. self:SetEnabled( true )
  64.  
  65. self:SetOnSound( "lightsaber/saber_on" .. math.random( 1, 4 ) .. ".wav" )
  66. self:SetOffSound( "lightsaber/saber_off" .. math.random( 1, 4 ) .. ".wav" )
  67. self:SetWorldModel( "models/sgg/starwars/weapons/w_anakin_ep2_saber_hilt.mdl" )
  68. self:SetCrystalColor( Vector(0, 0, 255 ) )
  69. self:SetForceType( 1 )
  70. self:SetForce( 100 )
  71. self:SetMaxForce(100)
  72. self:SetForceRegen(0)
  73. self:SetAnim(false)
  74.  
  75. self:SetOpen(false)
  76. self:SetClose(false)
  77. self:SetFormType( 1 )
  78. self:SetStunned(false)
  79. self:NetworkVarNotify( "Force", self.OnForceChanged )
  80. end
  81. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement