mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
CLASS.name = "Headcrab rapide"
|
||||
CLASS.faction = FACTION_HEADCRAB
|
||||
CLASS.model = "models/headcrab.mdl"
|
||||
|
||||
function CLASS:OnSet(client)
|
||||
client:SetWalkSpeed(ix.config.Get("runSpeed"))
|
||||
client:SetRunSpeed(ix.config.Get("runSpeed") * 2)
|
||||
client:SetModel("models/headcrab.mdl")
|
||||
end
|
||||
|
||||
function CLASS:CanSwitchTo(client)
|
||||
return false
|
||||
end
|
||||
|
||||
CLASS_FASTHEADCRAB = CLASS.index
|
||||
25
gamemodes/darkrp/plugins/headcrabs/classes/sh_headcrab.lua
Normal file
25
gamemodes/darkrp/plugins/headcrabs/classes/sh_headcrab.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
CLASS.name = "Headcrab"
|
||||
CLASS.faction = FACTION_HEADCRAB
|
||||
CLASS.isDefault = true
|
||||
|
||||
function CLASS:OnSet(client)
|
||||
client:SetWalkSpeed(ix.config.Get("walkSpeed") * 0.5)
|
||||
client:SetRunSpeed(ix.config.Get("walkSpeed"))
|
||||
client:SetModel("models/headcrabclassic.mdl")
|
||||
client:SetBodygroup(0, 1)
|
||||
end
|
||||
|
||||
CLASS_HEADCRAB = CLASS.index
|
||||
@@ -0,0 +1,28 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
CLASS.name = "Headcrab poison"
|
||||
CLASS.faction = FACTION_HEADCRAB
|
||||
CLASS.model = "models/headcrabblack.mdl"
|
||||
|
||||
function CLASS:OnSet(client)
|
||||
client:SetWalkSpeed(ix.config.Get("walkSpeed") * 0.3)
|
||||
client:SetRunSpeed(ix.config.Get("walkSpeed") * 0.5)
|
||||
client:SetModel("models/headcrabblack.mdl")
|
||||
end
|
||||
|
||||
function CLASS:CanSwitchTo(client)
|
||||
return false
|
||||
end
|
||||
|
||||
CLASS_POISONHEADCRAB = CLASS.index
|
||||
66
gamemodes/darkrp/plugins/headcrabs/factions/sh_headcrab.lua
Normal file
66
gamemodes/darkrp/plugins/headcrabs/factions/sh_headcrab.lua
Normal file
@@ -0,0 +1,66 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
FACTION.name = "Headcrab"
|
||||
FACTION.description = "Une créature qui s'accroche à la tête des gens et les contrôlent."
|
||||
FACTION.color = Color(255,82,63)
|
||||
FACTION.runSpeed = 70
|
||||
FACTION.walkSpeed = 30
|
||||
|
||||
FACTION.isDefault = false
|
||||
FACTION.DisableInv = true
|
||||
FACTION.bAllowDatafile = false
|
||||
FACTION.noAppearances = true
|
||||
FACTION.noBackground = true
|
||||
FACTION.noBeard = true
|
||||
FACTION.noGender = true
|
||||
FACTION.noNeeds = true
|
||||
FACTION.noGenetics = true
|
||||
FACTION.ReadOptionDisabled = true
|
||||
FACTION.noAttributes = true
|
||||
FACTION.noGas = true
|
||||
FACTION.noTBC = true
|
||||
FACTION.humanVoices = false
|
||||
FACTION.allLanguages = true
|
||||
FACTION.canEatRaw = true
|
||||
FACTION.bDrinkUnfilteredWater = true
|
||||
|
||||
FACTION.factionImage = "willardnetworks/faction_imgs/xen.png"
|
||||
FACTION.selectImage = "willardnetworks/faction_imgs/xen.png"
|
||||
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/sewers.png"
|
||||
|
||||
FACTION.models = {
|
||||
"models/headcrabclassic.mdl",
|
||||
"models/headcrab.mdl",
|
||||
"models/headcrabblack.mdl"
|
||||
}
|
||||
|
||||
FACTION.npcRelations = {
|
||||
["npc_zombie"] = D_LI,
|
||||
["npc_zombie_torso"] = D_LI,
|
||||
["npc_zombine"] = D_LI,
|
||||
["npc_headcrab_fast"] = D_LI,
|
||||
["npc_fastzombie"] = D_LI,
|
||||
["npc_fastzombie_torso"] = D_LI,
|
||||
["npc_headcrab"] = D_LI,
|
||||
["npc_headcrab_black"] = D_LI,
|
||||
["npc_poisonzombie"] = D_LI,
|
||||
}
|
||||
|
||||
-- function FACTION:OnSpawn(client)
|
||||
-- timer.Simple(0.1, function()
|
||||
-- client:StripWeapons()
|
||||
-- end)
|
||||
-- end
|
||||
|
||||
FACTION_HEADCRAB = FACTION.index
|
||||
60
gamemodes/darkrp/plugins/headcrabs/sh_anims.lua
Normal file
60
gamemodes/darkrp/plugins/headcrabs/sh_anims.lua
Normal file
@@ -0,0 +1,60 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
ix.anim.headcrab = {
|
||||
["normal"] = {
|
||||
[ACT_MP_STAND_IDLE] = {1, 1},
|
||||
[ACT_MP_CROUCH_IDLE] = {1, 1},
|
||||
[ACT_MP_WALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_CROUCHWALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_RUN] = {ACT_RUN, ACT_RUN},
|
||||
},
|
||||
["pistol"] = {
|
||||
[ACT_MP_STAND_IDLE] = {1, 1},
|
||||
[ACT_MP_CROUCH_IDLE] = {1, 1},
|
||||
[ACT_MP_WALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_CROUCHWALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_RUN] = {ACT_RUN, ACT_RUN},
|
||||
},
|
||||
["smg"] = {
|
||||
[ACT_MP_STAND_IDLE] = {1, 1},
|
||||
[ACT_MP_CROUCH_IDLE] = {1, 1},
|
||||
[ACT_MP_WALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_CROUCHWALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_RUN] = {ACT_RUN, ACT_RUN},
|
||||
},
|
||||
["shotgun"] = {
|
||||
[ACT_MP_STAND_IDLE] = {1, 1},
|
||||
[ACT_MP_CROUCH_IDLE] = {1, 1},
|
||||
[ACT_MP_WALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_CROUCHWALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_RUN] = {ACT_RUN, ACT_RUN},
|
||||
},
|
||||
["grenade"] = {
|
||||
[ACT_MP_STAND_IDLE] = {1, 1},
|
||||
[ACT_MP_CROUCH_IDLE] = {1, 1},
|
||||
[ACT_MP_WALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_CROUCHWALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_RUN] = {ACT_RUN, ACT_RUN},
|
||||
},
|
||||
["melee"] = {
|
||||
[ACT_MP_STAND_IDLE] = {1, 1},
|
||||
[ACT_MP_CROUCH_IDLE] = {1, 1},
|
||||
[ACT_MP_WALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_CROUCHWALK] = {ACT_RUN, ACT_RUN},
|
||||
[ACT_MP_RUN] = {ACT_RUN, ACT_RUN},
|
||||
}
|
||||
}
|
||||
|
||||
ix.anim.SetModelClass("models/headcrabclassic.mdl", "headcrab")
|
||||
ix.anim.SetModelClass("models/headcrabblack.mdl", "headcrab")
|
||||
ix.anim.SetModelClass("models/headcrab.mdl", "headcrab")
|
||||
25
gamemodes/darkrp/plugins/headcrabs/sh_hooks.lua
Normal file
25
gamemodes/darkrp/plugins/headcrabs/sh_hooks.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
function PLUGIN:AdjustStaminaOffset(client, offset)
|
||||
if (offset > 0 and client:Team() == FACTION_HEADCRAB and client:GetCharacter():GetClass() == CLASS_FASTHEADCRAB
|
||||
and client:GetCharacter():GetClass() == CLASS_POISONHEADCRAB) then
|
||||
return offset * 2
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:InitializedPlugins()
|
||||
if (ix.plugin.list.inventoryslosts and FACTION_HEADCRAB) then
|
||||
ix.plugin.list.inventoryslots.noEquipFactions[FACTION_HEADCRAB] = true
|
||||
end
|
||||
end
|
||||
20
gamemodes/darkrp/plugins/headcrabs/sh_plugin.lua
Normal file
20
gamemodes/darkrp/plugins/headcrabs/sh_plugin.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
PLUGIN.name = "Headcrab Faction"
|
||||
PLUGIN.author = "Syn"
|
||||
PLUGIN.description = "Adds Half-Life 2 headcrab faction"
|
||||
|
||||
ix.util.Include("sh_hooks.lua")
|
||||
ix.util.Include("sv_hooks.lua")
|
||||
ix.util.Include("sh_anims.lua")
|
||||
67
gamemodes/darkrp/plugins/headcrabs/sv_hooks.lua
Normal file
67
gamemodes/darkrp/plugins/headcrabs/sv_hooks.lua
Normal file
@@ -0,0 +1,67 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
local classAnim = {
|
||||
[CLASS_HEADCRAB] = "jumpattack_broadcast",
|
||||
[CLASS_FASTHEADCRAB] = "attack",
|
||||
[CLASS_POISONHEADCRAB] = "tele_attack_a"
|
||||
}
|
||||
|
||||
function PLUGIN:KeyPress(client, key)
|
||||
if (client:Team() == FACTION_HEADCRAB) then
|
||||
if (key == IN_JUMP and client:IsOnGround() and client:Alive() and client:GetLocalVar("stm", 0) >= 30) then
|
||||
client:EmitSound("npc/headcrab/attack1.wav")
|
||||
client:SetVelocity(client:GetAimVector() * 300 + Vector(0, 0, 300))
|
||||
client:ConsumeStamina(30)
|
||||
client:ForceSequence(classAnim[client:GetCharacter():GetClass()], nil, nil, true)
|
||||
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:PlayerStaminaGained(client)
|
||||
if (client:Team() == FACTION_HEADCRAB) then
|
||||
client:SetRunSpeed(70)
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:GetFallDamage(client, speed)
|
||||
if (client:Team() == FACTION_HEADCRAB and client:GetCharacter():GetClass() == CLASS_FASTHEADCRAB) then
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:PlayerTick(client)
|
||||
if (!client:GetCharacter()) then return end
|
||||
|
||||
if (client:Team() != FACTION_HEADCRAB and client:GetCharacter():GetClass() != CLASS_FASTHEADCRAB) then return end
|
||||
|
||||
if (!client.nextChatter or (CurTime() >= client.nextChatter)) then
|
||||
client.nextChatter = CurTime() + math.random(60, 180)
|
||||
|
||||
client:EmitSound("npc/headcrab/idle" .. math.random(1, 4) .. ".wav", 65)
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:GetPlayerDeathSound(client)
|
||||
if (client:Team() == FACTION_HEADCRAB) then
|
||||
return "npc/headcrab/die" .. math.random(1, 2) .. ".wav"
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:GetPlayerPainSound(client)
|
||||
if (client:Team() == FACTION_HEADCRAB) then
|
||||
return "npc/headcrab/pain" .. math.random(1, 3) .. ".wav"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user