Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SuitUp( ply, args)
- if (ply:CanSuitUp()) then
- 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
- ply.CModel = ply:GetModel()
- ply:SetModel("models/player/bms_hev.mdl")
- ply:SetRunSpeed(240)
- DarkRP.notify(ply, 1, 3, "You are now wearing a suit")
- return ""
- elseif (ply:GetModel() == "models/player/bms_hev.mdl") then
- ply:SetModel(ply.CModel)
- ply:SetRunSpeed(300)
- DarkRP.notify(ply, 1, 3, "You are no longer wearing a suit")
- return ""
- else
- DarkRP.notify(ply, 1, 5, "You must be in a HEV podium inorder to suitup")
- return ""
- end
- elseif (ply:IsSecurity() and ply:Team() != TEAM_ADMIN) then
- if(ply:GetModel() == "models/player/guard_pack/guard_01.mdl") then
- ply:SetArmor(0)
- ply:StripWeapons()
- ply:Give( "gmod_tool" )
- ply:Give( "gmod_camera" )
- ply:Give( "weapon_physgun" )
- ply:Give( "pocket" )
- ply:Give( "keys" )
- ply:Give( "weapon_physcannon" )
- ply:SetModel("models/player/guard_pack/guard_01.mdl")
- DarkRP.notify(ply, 1, 3, "You are no longer wearing a suit")
- return ""
- 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
- ply:SetArmor(100)
- ply:Give( "stunstick" )
- ply:Give( "door_ram" )
- ply:Give( "weaponchecker" )
- ply:Give( "weapon_cuff_elastic" )
- ply:Give( "weapon_cuff_tactical" )
- ply:SetModel("models/player/guard_pack/guard_01.mdl")
- DarkRP.notify(ply, 1, 3, "You are now wearing a suit")
- return ""
- else
- DarkRP.notify(ply, 1, 5, "You must be in a locker inorder to suitup")
- return ""
- end
- elseif (ply:Team() == TEAM_GORDON) then
- if(ply:GetBodygroup(2) == 2) then
- ply:SetBodygroup(2, 0)
- DarkRP.notify(ply, 1, 3, "You are no longer wearing your helmet")
- else
- ply:SetBodygroup(2, 2)
- DarkRP.notify(ply, 1, 3, "You are now wearing your helmet")
- end
- else
- DarkRP.notify(ply, 1, 3, "You are unable to suitup")
- return ""
- end
- return ""
- end
- DarkRP.defineChatCommand("suitup", SuitUp)
- function ForceSuitUp(ply, args)
- if ((ply:IsAdmin()) or (ply:IsSuperAdmin())) then
- local target = DarkRP.findPlayer(args)
- if(target) then
- if (target:CanSuitUp()) then
- if (target:GetModel() != "models/player/bms_hev.mdl") then
- target.CModel = target:GetModel()
- target:SetModel("models/player/bms_hev.mdl")
- target:SetRunSpeed(240)
- DarkRP.notify(target, 1, 3, "You have been forced to suitup")
- return ""
- end
- elseif (target:IsSecurity() and target:Team() != TEAM_ADMIN) then
- target:SetArmor(100)
- target:Give( "stunstick" )
- target:Give( "door_ram" )
- target:Give( "weaponchecker" )
- target:Give( "weapon_cuff_elastic" )
- target:Give( "weapon_cuff_tactical" )
- target:SetModel("models/player/hdpp/security/" .. string.Right(target:GetModel(), 11))
- DarkRP.notify(target, 1, 3, "You have been forced to wear a suit")
- return ""
- else
- DarkRP.notify(ply, 1, 3, "This player is unable to suitup")
- return ""
- end
- else
- DarkRP.notify(ply, 1, 3, "Invaild argument")
- return ""
- end
- else
- DarkRP.notify(ply, 1, 3, "You are unable to /forcesuitup")
- return ""
- end
- end
- DarkRP.defineChatCommand("forcesuitup", ForceSuitUp)
- timer.Create( "XenCHECKforsuit", 2, 0, function()
- for k, ply in pairs( player.GetAll() ) do
- if(table.HasValue(ents.FindInBox(Vector(-11136.292969, -5578.504883, -2613.294922), Vector(-2896.915527, -12561.724609, 845.262817)), ply) and ply:IsInWorld() ) then
- if(ply:Team() == TEAM_GORDON and ply:GetBodygroup(2) != 2 ) then
- XenDamageInfoForXEN = DamageInfo()
- XenDamageInfoForXEN:SetDamage( 25 )
- XenDamageInfoForXEN:SetDamageType( DMG_DROWN )
- ply:TakeDamageInfo(XenDamageInfoForXEN )
- 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
- XenDamageInfoForXEN = DamageInfo()
- XenDamageInfoForXEN:SetDamage( 25 )
- XenDamageInfoForXEN:SetDamageType( DMG_DROWN )
- ply:TakeDamageInfo( XenDamageInfoForXEN )
- end
- end
- end
- end )
- shiftspam = 0
- function Shift( ply, key )
- if ( key == IN_SPEED and ply:GetModel() == "models/player/bms_hev.mdl" and !shiftspam) then
- ply:EmitSound( "hl1/hev_vox/hiss.wav", SNDLVL_TALKING, 100 )
- shiftspam = 1
- timer.Simple(3, function() shiftspam = 0 end)
- end
- end
- hook.Add( "KeyPress", "OnShiftP", Shift)
- timer.Start("XenCHECKforsuit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement