add sborka

This commit is contained in:
2026-03-31 10:27:04 +03:00
commit f5e5f56c84
2345 changed files with 382127 additions and 0 deletions

View File

@@ -0,0 +1,99 @@
SWEP.ViewModelFlip = false
SWEP.UseHands = true
SWEP.ViewModel = "models/medicmod/defib/v_defib.mdl"
SWEP.WorldModel = "models/medicmod/defib/w_defib.mdl"
SWEP.Author = "Venatuss"
SWEP.Instructions = "Click to attack"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Primary.Damage = 2
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 2
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Category = "Medic Mod"
SWEP.PrintName = "Admin Defibrillator"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
function SWEP:SecondaryAttack()
end
function SWEP:ShouldDropOnDie()
return false
end
function SWEP:Reload()
end
function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
local ent = self.Owner:GetEyeTrace().Entity
if not IsValid( self.Owner ) then return end
if not IsValid(ent) or ent:GetPos():Distance( self.Owner:GetPos() ) > 200 then return end
if ent:IsPlayer() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
if ent:GetHeartAttack() then
ent:MedicalRespawn()
else
-- Heal if already alive to avoid weapon stripping by ent:Spawn() inside MedicalRespawn()
ent:SetHealth(ent:GetMaxHealth())
ent:SetBleeding(false)
ent:SetPoisoned(false)
for k, v in pairs( ent:GetFractures() or {} ) do
ent:SetFracture(false, k)
end
end
end
elseif ent:IsDeathRagdoll() && ent:GetOwner():GetHeartAttack() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
ent:GetOwner():MedicalRespawn()
end
elseif IsValid(ent.ragdoll) && ent.ragdoll:IsDeathRagdoll() && ent.ragdoll:GetOwner():GetHeartAttack() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
ent.ragdoll:GetOwner():MedicalRespawn()
end
end
end
function SWEP:Deploy()
return true
end
function SWEP:Initialize()
self:SetHoldType( "" )
end
function SWEP:Holster()
return true
end

View File

@@ -0,0 +1,232 @@
SWEP.ViewModelFlip = false
SWEP.UseHands = true
SWEP.Author = "Venatuss"
SWEP.Instructions = "Click to use"
SWEP.WorldModel = ""
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Primary.Damage = 0
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 1
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Category = "Medic Mod"
SWEP.PrintName = "Medic Analysis"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
local lang = ConfigurationMedicMod.Language
SWEP.Infos = {}
function SWEP:SetupDataTables()
self:NetworkVar("Bool", 0, "Searching")
self:NetworkVar("Entity", 0, "Player")
self:NetworkVar("Float", 1, "AnalyseEndTime")
self:NetworkVar("Entity", 1, "Patient")
end
function SWEP:SecondaryAttack()
end
function SWEP:ShouldDropOnDie()
return false
end
function SWEP:Reload()
end
function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
local ent = self.Owner:GetEyeTrace().Entity
if SERVER then
if not IsValid(ent) or ent:GetPos():Distance(self.Owner:GetPos()) > 200 then return end
if self:GetSearching() then return end
if ent:IsDeathRagdoll() then
self:SetSearching( true )
self:SetAnalyseEndTime( CurTime() + ConfigurationMedicMod.TimeToQuickAnalyse )
self:SetPatient( ent )
self:SetPlayer( ent:GetOwner() )
elseif IsValid(ent.ragdoll) && ent.ragdoll:IsDeathRagdoll() then
self:SetSearching( true )
self:SetAnalyseEndTime( CurTime() + ConfigurationMedicMod.TimeToQuickAnalyse )
self:SetPatient( ent )
self:SetPlayer( ent.ragdoll:GetOwner() )
end
end
end
function SWEP:Deploy()
if SERVER then timer.Simple( 0.1, function() self.Owner:DrawViewModel( false ) self.Owner:DrawWorldModel( false ) end) end
return true
end
function SWEP:Initialize()
self:SetHoldType( "normal" )
if SERVER then timer.Simple( 0.1, function() self.Owner:DrawViewModel( false ) self.Owner:DrawWorldModel( false ) end) end
end
function SWEP:Holster()
return true
end
function SWEP:Think()
if not self:GetSearching() then return end
if self:GetAnalyseEndTime() > CurTime() && self:GetAnalyseEndTime() > 0 then
if IsValid(self:GetPatient()) && IsValid(self.Owner:GetEyeTrace().Entity) && self:GetPatient() == self.Owner:GetEyeTrace().Entity then
if self.Owner:GetPos():Distance(self:GetPatient():GetPos()) > 200 then
self:SetSearching( false )
self:SetPatient( nil )
self:SetPlayer( nil )
self:SetAnalyseEndTime( 0 )
end
else
self:SetSearching( false )
self:SetPlayer( nil )
self:SetAnalyseEndTime( 0 )
self:SetPatient( nil )
end
else
if not IsValid(self:GetPatient()) then
self:SetSearching( false )
self:SetPlayer( nil )
self:SetAnalyseEndTime( 0 )
self:SetPatient( nil )
return
end
local ply = self:GetPlayer()
self.Infos = {}
self.Infos[1] = ConfigurationMedicMod.Sentences["The name of the individu is"][lang].." "..ply:Name()
if ply:IsBleeding() then
self.Infos[#self.Infos + 1] = ConfigurationMedicMod.Sentences["There's blood everywhere, it seems he's bleeding"][lang]
end
if ply:IsPoisoned() then
self.Infos[#self.Infos + 1] = ConfigurationMedicMod.Sentences["He is greenish, may have been poisoned"][lang]
end
if ply:GetHeartAttack() then
self.Infos[#self.Infos + 1] = ConfigurationMedicMod.Sentences["His heart no longer beats"][lang]
end
timer.Simple( 60, function() self.Infos = {} end)
self:SetSearching( false )
self:SetPatient( nil )
self:SetPlayer( nil )
self:SetAnalyseEndTime( 0 )
end
end
local notepad = Material( "materials/note_paper_medic.png" )
local dots = {
[0] = ".",
[1] = "..",
[2] = "...",
[3] = ""
}
function SWEP:DrawHUD()
surface.SetDrawColor( 255,255,255,255 )
surface.SetMaterial( notepad )
surface.DrawTexturedRect( ScrW() - 518 - 20, ScrH() - 720 - 20, 518, 720 )
surface.SetFont("WrittenMedicMod80")
local sizetextx, sizetexty = surface.GetTextSize(ConfigurationMedicMod.Sentences["Notebook"][lang])
local posx = ScrW() - 518 - 20 + 518/2 - sizetextx/2 + 20
local posy = ScrH() - 720 - 20
surface.SetTextPos( posx, posy)
surface.SetTextColor( 0, 0, 0, 255)
surface.DrawText( ConfigurationMedicMod.Sentences["Notebook"][lang] )
if self:GetSearching() then
if (not self.NextDotsTime or SysTime() >= self.NextDotsTime) then
self.NextDotsTime = SysTime() + 0.5
self.Dots = self.Dots or ""
local len = string.len(self.Dots)
self.Dots = dots[len]
end
local sizetextx, sizetexty = surface.GetTextSize(ConfigurationMedicMod.Sentences["Writing"][lang]..self.Dots)
local posx = ScrW() - 518 - 20 + 518/2 - sizetextx/2 + 20
local posy = ScrH() - 720 - 20 + 518/2 + 10
surface.SetTextPos( posx, posy)
surface.SetTextColor( 0, 0, 0, 255)
surface.DrawText( ConfigurationMedicMod.Sentences["Writing"][lang]..self.Dots )
return
end
if self.Infos != nil then
local line = 0
for k, v in pairs(self.Infos) do
-- stop the loop if there is too many lines
if line > 24 then return end
local sizetextx, sizetexty = surface.GetTextSize(v)
local posy = ScrH() - 720 - 20 + 57 * 1.5 + 10
local posx = ScrW() - 518 - 20 + 65 * 1.5
surface.SetFont("WrittenMedicMod40")
surface.SetTextColor( 0, 0, 0, 255)
if sizetextx > (518) - 65 - 20 then
surface.SetFont("WrittenMedicMod40")
end
sizetextx, sizetexty = surface.GetTextSize(v)
if sizetextx > (518) - 65 - 20 then
local lengh = string.len( v )
local ftcl = string.find(v," ", lengh/2-1)
local text1 = string.sub(v, 1, ftcl-1)
local text2 = string.sub(v, ftcl+1)
surface.SetTextPos( posx, posy + 24 * line)
surface.DrawText( text1 )
line = line + 1
surface.SetTextPos( posx , posy + 24 * line)
surface.DrawText( text2 )
line = line + 2
else
surface.SetTextPos( posx, posy + 24 * line)
surface.DrawText( v )
line = line + 2
end
end
end
end

View File

@@ -0,0 +1,129 @@
SWEP.ViewModelFlip = false
SWEP.UseHands = true
SWEP.ViewModel = "models/medicmod/bandage/v_bandage.mdl"
SWEP.WorldModel = "models/medicmod/bandage/w_bandage.mdl"
SWEP.Author = "Venatuss"
SWEP.Instructions = "Click to attack"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Primary.Damage = 2
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 2
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Secondary.Delay = 2
SWEP.Category = "Medic Mod"
SWEP.PrintName = "Bandage"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
function SWEP:SecondaryAttack()
self.Weapon:SetNextSecondaryFire( CurTime() + self.Secondary.Delay )
local ply = self.Owner
if not IsValid( ply ) or not ply:IsBleeding() then return end
self.Weapon:SendWeaponAnim( ACT_VM_SECONDARYATTACK )
if SERVER then
ply:SetBleeding( false )
ply:MedicNotif( ConfigurationMedicMod.Sentences["StopBleedingOfYourself"][ConfigurationMedicMod.Language], 5 )
timer.Simple(1.3, function() if not IsValid(self) then return end self:Remove() end)
end
end
function SWEP:ShouldDropOnDie()
return false
end
function SWEP:Reload()
end
function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
local ent = self.Owner:GetEyeTrace().Entity
if not IsValid( self.Owner ) then return end
if not IsValid(ent) or ent:GetPos():Distance( self.Owner:GetPos() ) > 200 then return end
if ent:IsPlayer() && ent:IsBleeding() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
ent:SetBleeding( false )
self.Owner:MedicNotif( ConfigurationMedicMod.Sentences["StopBleedingOfSomeone"][ConfigurationMedicMod.Language], 5 )
ent:MedicNotif( ConfigurationMedicMod.Sentences["SomeoneStopBleedingOfYou"][ConfigurationMedicMod.Language], 5 )
timer.Simple(1.3, function() if not IsValid(self) then return end self:Remove() end)
end
elseif ent:IsDeathRagdoll() && ent:GetOwner():IsBleeding() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
local ply = ent:GetOwner()
ply:SetBleeding( false )
ply:Stabilize( self.Owner )
self.Owner:MedicNotif( ConfigurationMedicMod.Sentences["StopBleedingOfSomeone"][ConfigurationMedicMod.Language], 5 )
ply:MedicNotif( ConfigurationMedicMod.Sentences["SomeoneStopBleedingOfYou"][ConfigurationMedicMod.Language], 5 )
timer.Simple(1, function() if not IsValid(self) then return end self:Remove() end)
end
elseif IsValid(ent.ragdoll) && ent.ragdoll:IsDeathRagdoll() && ent.ragdoll:GetOwner():IsBleeding() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
local ply = ent.ragdoll:GetOwner()
ply:SetBleeding( false )
ply:Stabilize( self.Owner )
self.Owner:MedicNotif( ConfigurationMedicMod.Sentences["StopBleedingOfSomeone"][ConfigurationMedicMod.Language], 5 )
ply:MedicNotif( ConfigurationMedicMod.Sentences["SomeoneStopBleedingOfYou"][ConfigurationMedicMod.Language], 5 )
timer.Simple(1, function() if not IsValid(self) then return end self:Remove() end)
end
end
end
function SWEP:Deploy()
return true
end
function SWEP:Initialize()
self:SetHoldType( "pistol" )
end
function SWEP:Holster()
return true
end

View File

@@ -0,0 +1,121 @@
SWEP.ViewModelFlip = false
SWEP.UseHands = true
SWEP.ViewModel = "models/medicmod/defib/v_defib.mdl"
SWEP.WorldModel = "models/medicmod/defib/w_defib.mdl"
SWEP.Author = "Venatuss"
SWEP.Instructions = "Click to attack"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Primary.Damage = 2
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 2
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Category = "Medic Mod"
SWEP.PrintName = "Defibrillator"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
function SWEP:SecondaryAttack()
end
function SWEP:ShouldDropOnDie()
return false
end
function SWEP:Reload()
end
local percentageChance = math.Clamp( ConfigurationMedicMod.DefibrillatorShockChance,1,100)
function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
local ent = self.Owner:GetEyeTrace().Entity
if not IsValid( self.Owner ) then return end
if not IsValid(ent) or ent:GetPos():Distance( self.Owner:GetPos() ) > 200 then return end
if ent:IsPlayer() && ent:GetHeartAttack() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
local randChance = math.random( 1, 100 )
if randChance <= percentageChance then self.Owner:MedicNotif(ConfigurationMedicMod.Sentences["The shock did not work. Try again"][ConfigurationMedicMod.Language]) return end
ent:SetHeartAttack( false )
self.Owner:MedicNotif( ConfigurationMedicMod.Sentences["The heart of the wounded man began to beat again"][ConfigurationMedicMod.Language], 5 )
ent:MedicNotif( ConfigurationMedicMod.Sentences["Your heart started to beat again"][ConfigurationMedicMod.Language], 5 )
end
elseif ent:IsDeathRagdoll() && ent:GetOwner():GetHeartAttack() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
local randChance = math.random( 1, 100 )
if randChance <= percentageChance then self.Owner:MedicNotif(ConfigurationMedicMod.Sentences["The shock did not work. Try again"][ConfigurationMedicMod.Language]) return end
local ply = ent:GetOwner()
ply:SetHeartAttack( false )
ply:Stabilize( self.Owner )
self.Owner:MedicNotif( ConfigurationMedicMod.Sentences["The heart of the wounded man began to beat again"][ConfigurationMedicMod.Language], 5 )
ply:MedicNotif( ConfigurationMedicMod.Sentences["Your heart started to beat again"][ConfigurationMedicMod.Language], 5 )
end
elseif IsValid(ent.ragdoll) && ent.ragdoll:IsDeathRagdoll() && ent.ragdoll:GetOwner():GetHeartAttack() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
local randChance = math.random( 1, 100 )
if randChance <= percentageChance then self.Owner:MedicNotif(ConfigurationMedicMod.Sentences["The shock did not work. Try again"][ConfigurationMedicMod.Language]) return end
local ply = ent.ragdoll:GetOwner()
ply:SetHeartAttack( false )
ply:Stabilize( self.Owner )
self.Owner:MedicNotif( ConfigurationMedicMod.Sentences["The heart of the wounded man began to beat again"][ConfigurationMedicMod.Language], 5 )
ply:MedicNotif( ConfigurationMedicMod.Sentences["Your heart started to beat again"][ConfigurationMedicMod.Language], 5 )
end
end
end
function SWEP:Deploy()
return true
end
function SWEP:Initialize()
self:SetHoldType( "" )
end
function SWEP:Holster()
return true
end

View File

@@ -0,0 +1,181 @@
SWEP.ViewModelFlip = false
SWEP.UseHands = true
SWEP.ViewModel = "models/medicmod/firstaidkit/v_firstaidkit.mdl"
SWEP.WorldModel = "models/medicmod/firstaidkit/w_firstaidkit.mdl"
SWEP.Author = "Venatuss"
SWEP.Instructions = "Click to attack"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Primary.Damage = 2
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 0.5
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Category = "Medic Mod"
SWEP.PrintName = "First Aid Kit"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
function SWEP:SetupDataTables()
self:NetworkVar("Int", 0, "Bandage")
self:NetworkVar("Int", 1, "Antidote")
self:NetworkVar("Int", 2, "Morphine")
self:NetworkVar("Int", 3, "Active")
if SERVER then
self:SetBandage( 0 )
self:SetAntidote( 0 )
self:SetMorphine( 0 )
self:SetActive( 1 )
end
end
local sentences = ConfigurationMedicMod.Sentences
local lang = ConfigurationMedicMod.Language
function SWEP:SecondaryAttack()
self:SetHoldType("grenade")
self:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
timer.Simple(0.3, function()
if self:GetBandage() > 0 or self:GetAntidote() > 0 or self:GetMorphine() > 0 then
local fak = ents.Create("firstaidkit_medicmod")
fak:SetPos(self.Owner:GetPos() + self.Owner:GetAngles():Forward() * 15 + self.Owner:GetAngles():Up() * 50)
fak:Spawn()
fak.Content = {
["bandage"] = self:GetBandage(),
["syringe_antidote"] = self:GetAntidote(),
["syringe_morphine"] = self:GetMorphine(),
}
else
self.Owner:MedicNotif(sentences["Your care kit was thrown away because it is empty"][lang], 5)
end
if IsValid( self ) then self:Remove() end
end)
end
end
function SWEP:ShouldDropOnDie()
return false
end
local nextSelectTime = CurTime()
function SWEP:Reload()
if nextSelectTime >= CurTime() then return end
nextSelectTime = CurTime() + 1
if self:GetActive() == 3 then
self:SetActive(1)
else
self:SetActive(self:GetActive()+1)
end
end
function SWEP:PrimaryAttack()
if not SERVER then return end
if not IsValid( self.Owner ) then return end
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
local items = {
[1] = "bandage",
[2] = "syringe_morphine",
[3] = "syringe_antidote"
}
local selecteditem = items[self:GetActive()]
if selecteditem == "bandage" && self:GetBandage() > 0 then
if self.Owner:HasWeapon( selecteditem ) then self.Owner:MedicNotif(sentences["You already carry this element on you"][lang]) return end
self:SetBandage( self:GetBandage() - 1)
self.Owner:Give(selecteditem)
return
end
if selecteditem == "syringe_morphine" && self:GetMorphine() > 0 then
if self.Owner:HasWeapon( selecteditem ) then self.Owner:MedicNotif(sentences["You already carry this element on you"][lang]) return end
self:SetMorphine( self:GetMorphine() - 1)
self.Owner:Give(selecteditem)
return
end
if selecteditem == "syringe_antidote" && self:GetAntidote() > 0 then
if self.Owner:HasWeapon( selecteditem ) then self.Owner:MedicNotif(sentences["You already carry this element on you"][lang]) return end
self:SetAntidote( self:GetAntidote() - 1)
self.Owner:Give(selecteditem)
return
end
end
function SWEP:DrawHUD()
local outlineColor1 = Color(0,0,0)
local outlineColor2 = Color(0,0,0)
local outlineColor3 = Color(0,0,0)
local items = {
[1] = sentences["Bandage"][lang],
[2] = sentences["Morphine"][lang],
[3] = sentences["Antidote"][lang]
}
if self:GetActive() == 1 then
outlineColor1 = Color(200,50,50)
elseif self:GetActive() == 2 then
outlineColor2 = Color(200,50,50)
elseif self:GetActive() == 3 then
outlineColor3 = Color(200,50,50)
end
draw.SimpleTextOutlined(sentences["Bandage"][lang].." : "..self:GetBandage(), "MedicModFont20", ScrW()/2 - ScrW()*0.1,ScrH()/2 + ScrH()*0.2,Color(255,255,255),1,1,1,outlineColor1)
draw.SimpleTextOutlined(sentences["Antidote"][lang].." : "..self:GetAntidote(), "MedicModFont20", ScrW()/2 + ScrW()*0.1,ScrH()/2 + ScrH()*0.2,Color(255,255,255),1,1,1,outlineColor3)
draw.SimpleTextOutlined(sentences["Morphine"][lang].." : "..self:GetMorphine(), "MedicModFont20", ScrW()/2,ScrH()/2 + ScrH()*0.25,Color(255,255,255),1,1,1,outlineColor2)
draw.SimpleTextOutlined(sentences["Item selected"][lang].." : "..items[self:GetActive()], "MedicModFont20", ScrW()/2,ScrH()/2 + ScrH()*0.3 + 40,Color(255,255,255),1,1,1,Color(0,0,0))
draw.SimpleTextOutlined(sentences["Press [RELOAD] to select another item"][lang], "MedicModFont20", ScrW()/2,ScrH()/2 + ScrH()*0.3 + 70,Color(255,255,255),1,1,1,Color(0,0,0))
draw.SimpleTextOutlined(sentences["Press [LEFT CLICK] to take"][lang], "MedicModFont20", ScrW()/2,ScrH()/2 + ScrH()*0.3 + 100,Color(255,255,255),1,1,1,Color(0,0,0))
draw.SimpleTextOutlined(sentences["Press [RIGHT CLICK] to drop"][lang], "MedicModFont20", ScrW()/2,ScrH()/2 + ScrH()*0.3 + 130,Color(255,255,255),1,1,1,Color(0,0,0))
end
function SWEP:Deploy()
return true
end
function SWEP:Initialize()
self:SetHoldType( "normal" )
self:SetBandage( 0 )
self:SetAntidote( 0 )
self:SetMorphine( 0 )
self:SetActive( 1 )
end
function SWEP:Holster()
return true
end

View File

@@ -0,0 +1,55 @@
SWEP.ViewModelFlip = false
SWEP.UseHands = true
SWEP.WorldModel = ""
SWEP.ViewModel = "models/medicmod/heart_massage/v_heart_massage.mdl"
SWEP.Author = "Venatuss"
SWEP.Instructions = "Click to attack"
SWEP.Spawnable = false
SWEP.AdminSpawnable = false
SWEP.Primary.Damage = 0
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 2
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Category = "Medic Mod"
SWEP.PrintName = "Heart Massage"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
function SWEP:SecondaryAttack()
end
function SWEP:ShouldDropOnDie()
return false
end
function SWEP:Reload()
end
function SWEP:PrimaryAttack()
end
function SWEP:Deploy()
return true
end
function SWEP:Initialize()
self:SetHoldType( "normal" )
end
function SWEP:Holster()
return true
end

View File

@@ -0,0 +1,104 @@
SWEP.ViewModelFlip = false
SWEP.UseHands = true
SWEP.ViewModel = "models/medicmod/bandage/v_bandage.mdl"
SWEP.WorldModel = "models/medicmod/bandage/w_bandage.mdl"
SWEP.Author = "Scripty"
SWEP.Instructions = "На лкм лечить другого, на пкм сеья(спасает от переломов)"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Primary.Damage = 2
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 2
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Secondary.Delay = 2
SWEP.Category = "Medic Mod"
SWEP.PrintName = "Шина"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
local ply = self.Owner
if not IsValid(ply) then return end
local ent = ply:GetEyeTrace().Entity
if not IsValid(ent) or not ent:IsPlayer() or ent:GetPos():Distance(ply:GetPos()) > 200 then
return
end
if SERVER then
local used = false
if ent:HaveFractures() then
for k,v in pairs(ent:GetFractures() or {}) do
ent:SetFracture(false, k)
used = true
end
end
if ent:IsBleeding() then
ent:SetBleeding(false)
used = true
end
if used then
self:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
ply:SetAnimation(PLAYER_ATTACK1)
ply:MedicNotif(ConfigurationMedicMod.Sentences["SomeoneStopBleedingOfYou"][ConfigurationMedicMod.Language], 5)
ent:MedicNotif(ConfigurationMedicMod.Sentences["You have no more fracture"][ConfigurationMedicMod.Language], 5)
ent:MedicNotif(ConfigurationMedicMod.Sentences["SomeoneStopBleedingOfYou"][ConfigurationMedicMod.Language], 5)
self:Remove()
end
end
end
function SWEP:SecondaryAttack()
self.Weapon:SetNextSecondaryFire(CurTime() + self.Secondary.Delay)
local ply = self.Owner
if not IsValid(ply) then return end
if SERVER then
local used = false
if ply:HaveFractures() then
for k,v in pairs(ply:GetFractures() or {}) do
ply:SetFracture(false, k)
used = true
end
end
if ply:IsBleeding() then
ply:SetBleeding(false)
used = true
end
if used then
self:SendWeaponAnim(ACT_VM_SECONDARYATTACK)
ply:SetAnimation(PLAYER_ATTACK1)
ply:MedicNotif(ConfigurationMedicMod.Sentences["You have no more fracture"][ConfigurationMedicMod.Language], 5)
ply:MedicNotif(ConfigurationMedicMod.Sentences["StopBleedingOfYourself"][ConfigurationMedicMod.Language], 5)
self:Remove()
end
end
end
function SWEP:Deploy()
return true
end
function SWEP:Initialize()
self:SetHoldType("pistol")
end
function SWEP:Holster()
return true
end

View File

@@ -0,0 +1,127 @@
SWEP.ViewModelFlip = false
SWEP.UseHands = true
SWEP.ViewModel = "models/medicmod/syringe/v_syringe.mdl"
SWEP.WorldModel = "models/medicmod/syringe/w_syringe.mdl"
SWEP.Author = "Venatuss"
SWEP.Instructions = "Click to attack"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Primary.Damage = 2
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 2
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Secondary.Delay = 2
SWEP.Category = "Medic Mod"
SWEP.PrintName = "Antidote"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
function SWEP:SecondaryAttack()
self.Weapon:SetNextSecondaryFire( CurTime() + self.Secondary.Delay )
local ply = self.Owner
if not IsValid( ply ) or not ply:IsPoisoned() then return end
self.Weapon:SendWeaponAnim( ACT_VM_SECONDARYATTACK )
if SERVER then
ply:SetPoisoned( false )
ply:MedicNotif( ConfigurationMedicMod.Sentences["You have stopped your poisoning"][ConfigurationMedicMod.Language], 5 )
timer.Simple(1, function() if not IsValid(self) then return end self:Remove() end)
end
end
function SWEP:ShouldDropOnDie()
return false
end
function SWEP:Reload()
end
function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
local ent = self.Owner:GetEyeTrace().Entity
if not IsValid( self.Owner ) then return end
if not IsValid(ent) or ent:GetPos():Distance( self.Owner:GetPos() ) > 200 then return end
if ent:IsPlayer() && ent:IsPoisoned() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
ent:SetPoisoned( false )
self.Owner:MedicNotif( ConfigurationMedicMod.Sentences["You have stopped the poisoning of someone"][ConfigurationMedicMod.Language], 5 )
ent:MedicNotif( ConfigurationMedicMod.Sentences["Someone stopped your poisoning"][ConfigurationMedicMod.Language], 5 )
timer.Simple(1, function() if not IsValid(self) then return end self:Remove() end)
end
elseif ent:IsDeathRagdoll() && ent:GetOwner():IsPoisoned() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
local ply = ent:GetOwner()
ply:SetPoisoned( false )
ply:Stabilize( self.Owner )
self.Owner:MedicNotif( ConfigurationMedicMod.Sentences["You have stopped the poisoning of someone"][ConfigurationMedicMod.Language], 5 )
ply:MedicNotif( ConfigurationMedicMod.Sentences["Someone stopped your poisoning"][ConfigurationMedicMod.Language], 5 )
timer.Simple(1, function() if not IsValid(self) then return end self:Remove() end)
end
elseif IsValid(ent.ragdoll) && ent.ragdoll:IsDeathRagdoll() && ent.ragdoll:GetOwner():IsPoisoned() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
local ply = ent.ragdoll:GetOwner()
ply:SetPoisoned( false )
ply:Stabilize( self.Owner )
self.Owner:MedicNotif( ConfigurationMedicMod.Sentences["You have stopped the poisoning of someone"][ConfigurationMedicMod.Language], 5 )
ply:MedicNotif( ConfigurationMedicMod.Sentences["Someone stopped your poisoning"][ConfigurationMedicMod.Language], 5 )
timer.Simple(1, function() if not IsValid(self) then return end self:Remove() end)
end
end
end
function SWEP:Deploy()
return true
end
function SWEP:Initialize()
self:SetHoldType( "pistol" )
end
function SWEP:Holster()
return true
end

View File

@@ -0,0 +1,100 @@
SWEP.ViewModelFlip = false
SWEP.UseHands = true
SWEP.ViewModel = "models/medicmod/syringe/v_syringe.mdl"
SWEP.WorldModel = "models/medicmod/syringe/w_syringe.mdl"
SWEP.Author = "Venatuss"
SWEP.Instructions = "Click to use"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Primary.Damage = 0
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 2
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Secondary.Delay = 2
SWEP.Category = "Medic Mod"
SWEP.PrintName = "Morphine"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
function SWEP:SecondaryAttack()
self.Weapon:SetNextSecondaryFire( CurTime() + self.Secondary.Delay )
local ply = self.Owner
if not IsValid( ply ) or ply:IsMorphine() then return end
self.Weapon:SendWeaponAnim( ACT_VM_SECONDARYATTACK )
if SERVER then
ply:SetMorphine( true )
ply:MedicNotif( ConfigurationMedicMod.Sentences["You injected some morphine"][ConfigurationMedicMod.Language], 5 )
timer.Simple(1, function() if not IsValid(self) then return end self:Remove() end)
timer.Simple( ConfigurationMedicMod.MorphineEffectTime, function() ply:SetMorphine( false ) end )
end
end
function SWEP:ShouldDropOnDie()
return false
end
function SWEP:Reload()
end
function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
local ent = self.Owner:GetEyeTrace().Entity
if not IsValid( self.Owner ) then return end
if not IsValid(ent) or ent:GetPos():Distance( self.Owner:GetPos() ) > 200 then return end
if ent:IsPlayer() and not ent:IsMorphine() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
ent:SetMorphine( true )
self.Owner:MedicNotif( ConfigurationMedicMod.Sentences["You injected morphine to somebody"][ConfigurationMedicMod.Language], 5 )
timer.Simple( 1, function() if not IsValid(self) then return end self:Remove() end)
timer.Simple( ConfigurationMedicMod.MorphineEffectTime, function() ent:SetMorphine( false ) end )
end
end
end
function SWEP:Deploy()
return true
end
function SWEP:Initialize()
self:SetHoldType( "pistol" )
end
function SWEP:Holster()
return true
end

View File

@@ -0,0 +1,103 @@
SWEP.ViewModelFlip = false
SWEP.UseHands = true
SWEP.ViewModel = "models/medicmod/syringe/v_syringe.mdl"
SWEP.WorldModel = "models/medicmod/syringe/w_syringe.mdl"
SWEP.Author = "Venatuss"
SWEP.Instructions = "Click to attack"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Primary.Damage = 2
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 2
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Secondary.Delay = 2
SWEP.Category = "Medic Mod"
SWEP.PrintName = "Poison Syringe"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
function SWEP:SecondaryAttack()
end
function SWEP:ShouldDropOnDie()
return false
end
function SWEP:Reload()
end
function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
local ent = self.Owner:GetEyeTrace().Entity
if not IsValid( self.Owner ) then return end
if not IsValid(ent) or ent:GetPos():Distance( self.Owner:GetPos() ) > 200 then return end
if ent:IsPlayer() and not ent:IsPoisoned() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
ent:SetPoisoned( true )
timer.Simple(1, function() if not IsValid(self) then return end self:Remove() end)
end
elseif ent:IsDeathRagdoll() and not ent:GetOwner():IsPoisoned() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
local ply = ent:GetOwner()
ply:SetPoisoned( true )
timer.Simple(1, function() if not IsValid(self) then return end self:Remove() end)
end
elseif IsValid(ent.ragdoll) && ent.ragdoll:IsDeathRagdoll() && not ent.ragdoll:GetOwner():IsPoisoned() then
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
if SERVER then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
local ply = ent.ragdoll:GetOwner()
ply:SetPoisoned( true )
timer.Simple(1, function() if not IsValid(self) then return end self:Remove() end)
end
end
end
function SWEP:Deploy()
return true
end
function SWEP:Initialize()
self:SetHoldType( "pistol" )
end
function SWEP:Holster()
return true
end