Advertisement
Guest User

Untitled

a guest
Aug 27th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.00 KB | None | 0 0
  1. function SuitUp( ply, args)
  2. if (ply:CanSuitUp()) then
  3. if (ply:GetModel() != "models/player/bms_hev.mdl" and table.HasValue(ents.FindInBox( Vector(-6528.979980, -126.016434, -265.046753), Vector(-6573.441895, 240.18765,3 -183.015472)), ply)) then
  4. ply.CModel = ply:GetModel()
  5. ply:SetModel("models/player/bms_hev.mdl")
  6. ply:SetRunSpeed(240)
  7. DarkRP.notify(ply, 1, 3, "You are now wearing a suit")
  8. return ""
  9. elseif (ply:GetModel() == "models/player/bms_hev.mdl") then
  10. ply:SetModel(ply.CModel)
  11. ply:SetRunSpeed(300)
  12. DarkRP.notify(ply, 1, 3, "You are no longer wearing a suit")
  13. return ""
  14. else
  15. DarkRP.notify(ply, 1, 5, "You must be in a HEV podium inorder to suitup")
  16. return ""
  17. end
  18. elseif (ply:IsSecurity() and ply:Team() != TEAM_ADMIN) then
  19. if(ply:GetModel() == "models/player/guard_pack/guard_01.mdl") then
  20. ply:SetArmor(0)
  21. ply:StripWeapons()
  22. ply:Give( "gmod_tool" )
  23. ply:Give( "gmod_camera" )
  24. ply:Give( "weapon_physgun" )
  25. ply:Give( "pocket" )
  26. ply:Give( "keys" )
  27. ply:Give( "weapon_physcannon" )
  28. ply:SetModel("models/player/guard_pack/guard_01.mdl")
  29. DarkRP.notify(ply, 1, 3, "You are no longer wearing a suit")
  30. return ""
  31. elseif(table.HasValue(ents.FindInBox( Vector(-5965.968750, 177.844528, -233.064758), Vector(-5590.031250, 134.031250, -233.064758)), ply) or table.HasValue(ents.FindInBox( Vector(-6257.984375, 250.031250, -233.064758), Vector(-6214.031250, 577.968750, -233.064758)), ply) or table.HasValue(ents.FindInBox( Vector(-5885.968750, 661.968750, -233.064758), Vector(-5622.031250, 618.031250, -233.064758)), ply) or table.HasValue(ents.FindInBox( Vector(-5506.031250, 545.968750, -233.064758), Vector(-5549.968750, 458.031250, -233.064758)), ply) ) then
  32. ply:SetArmor(100)
  33. ply:Give( "stunstick" )
  34. ply:Give( "door_ram" )
  35. ply:Give( "weaponchecker" )
  36. ply:Give( "weapon_cuff_elastic" )
  37. ply:Give( "weapon_cuff_tactical" )
  38. ply:SetModel("models/player/guard_pack/guard_01.mdl")
  39. DarkRP.notify(ply, 1, 3, "You are now wearing a suit")
  40. return ""
  41. else
  42. DarkRP.notify(ply, 1, 5, "You must be in a locker inorder to suitup")
  43. return ""
  44. end
  45. elseif (ply:Team() == TEAM_GORDON) then
  46. if(ply:GetBodygroup(2) == 2) then
  47. ply:SetBodygroup(2, 0)
  48. DarkRP.notify(ply, 1, 3, "You are no longer wearing your helmet")
  49. else
  50. ply:SetBodygroup(2, 2)
  51. DarkRP.notify(ply, 1, 3, "You are now wearing your helmet")
  52. end
  53. else
  54. DarkRP.notify(ply, 1, 3, "You are unable to suitup")
  55. return ""
  56. end
  57. return ""
  58. end
  59. DarkRP.defineChatCommand("suitup", SuitUp)
  60.  
  61. function ForceSuitUp(ply, args)
  62. if ((ply:IsAdmin()) or (ply:IsSuperAdmin())) then
  63. local target = DarkRP.findPlayer(args)
  64. if(target) then
  65. if (target:CanSuitUp()) then
  66. if (target:GetModel() != "models/player/bms_hev.mdl") then
  67. target.CModel = target:GetModel()
  68. target:SetModel("models/player/bms_hev.mdl")
  69. target:SetRunSpeed(240)
  70. DarkRP.notify(target, 1, 3, "You have been forced to suitup")
  71. return ""
  72. end
  73. elseif (target:IsSecurity() and target:Team() != TEAM_ADMIN) then
  74. target:SetArmor(100)
  75. target:Give( "stunstick" )
  76. target:Give( "door_ram" )
  77. target:Give( "weaponchecker" )
  78. target:Give( "weapon_cuff_elastic" )
  79. target:Give( "weapon_cuff_tactical" )
  80. target:SetModel("models/player/hdpp/security/" .. string.Right(target:GetModel(), 11))
  81. DarkRP.notify(target, 1, 3, "You have been forced to wear a suit")
  82. return ""
  83. else
  84. DarkRP.notify(ply, 1, 3, "This player is unable to suitup")
  85. return ""
  86. end
  87. else
  88. DarkRP.notify(ply, 1, 3, "Invaild argument")
  89. return ""
  90. end
  91. else
  92. DarkRP.notify(ply, 1, 3, "You are unable to /forcesuitup")
  93. return ""
  94. end
  95. end
  96. DarkRP.defineChatCommand("forcesuitup", ForceSuitUp)
  97.  
  98. timer.Create( "XenCHECKforsuit", 2, 0, function()
  99. for k, ply in pairs( player.GetAll() ) do
  100. if(table.HasValue(ents.FindInBox(Vector(-11136.292969, -5578.504883, -2613.294922), Vector(-2896.915527, -12561.724609, 845.262817)), ply) and ply:IsInWorld() ) then
  101. if(ply:Team() == TEAM_GORDON and ply:GetBodygroup(2) != 2 ) then
  102. XenDamageInfoForXEN = DamageInfo()
  103. XenDamageInfoForXEN:SetDamage( 25 )
  104. XenDamageInfoForXEN:SetDamageType( DMG_DROWN )
  105. ply:TakeDamageInfo(XenDamageInfoForXEN )
  106. elseif (ply:GetModel() != "models/player/bms_hev.mdl" and ply:Team() != TEAM_GORDON and ply:Team() != TEAM_VORT and ply:Team() != TEAM_GARG and ply:Team() != TEAM_GRUNT) then
  107. XenDamageInfoForXEN = DamageInfo()
  108. XenDamageInfoForXEN:SetDamage( 25 )
  109. XenDamageInfoForXEN:SetDamageType( DMG_DROWN )
  110. ply:TakeDamageInfo( XenDamageInfoForXEN )
  111. end
  112. end
  113. end
  114. end )
  115.  
  116. shiftspam = 0
  117. function Shift( ply, key )
  118. if ( key == IN_SPEED and ply:GetModel() == "models/player/bms_hev.mdl" and !shiftspam) then
  119. ply:EmitSound( "hl1/hev_vox/hiss.wav", SNDLVL_TALKING, 100 )
  120. shiftspam = 1
  121. timer.Simple(3, function() shiftspam = 0 end)
  122. end
  123. end
  124. hook.Add( "KeyPress", "OnShiftP", Shift)
  125.  
  126. timer.Start("XenCHECKforsuit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement