mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
151
gamemodes/darkrp/schema/factions/sh_vortigaunt.lua
Normal file
151
gamemodes/darkrp/schema/factions/sh_vortigaunt.lua
Normal file
@@ -0,0 +1,151 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
FACTION.name = "Vortigaunt"
|
||||
FACTION.description = "Un vortiguaunt libre."
|
||||
FACTION.color = Color(138, 181, 40)
|
||||
FACTION.isDefault = false
|
||||
|
||||
FACTION.noBeard = true
|
||||
FACTION.noGender = true
|
||||
FACTION.factionImage = "materials/willardnetworks/faction_imgs/vort.png"
|
||||
FACTION.selectImage = "materials/willardnetworks/charselect/vort.png"
|
||||
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/xen.png"
|
||||
|
||||
FACTION.isGloballyRecognized = false
|
||||
|
||||
FACTION.noHair = true
|
||||
FACTION.noGas = true
|
||||
FACTION.bDrinkUnfilteredWater = true
|
||||
FACTION.canEatRaw = true
|
||||
|
||||
FACTION.maxHealth = 200
|
||||
|
||||
FACTION.models = {
|
||||
"models/willardnetworks/vortigaunt.mdl"
|
||||
};
|
||||
|
||||
FACTION.weapons = {"ix_vortheal", "ix_vortbeam", "ix_nightvision", "ix_vshield", "ix_vortsweep"}
|
||||
|
||||
function FACTION:OnCharacterCreated(client, character)
|
||||
local inventory = character:GetInventory()
|
||||
local background = character:GetBackground()
|
||||
local vortPlugin = ix.plugin.Get("vortigaunts")
|
||||
client:Give("ix_vortsweep") -- i dont see any reason not to give all the vorts the sweep swep tbh
|
||||
|
||||
if (background == "Biotique" or background == "Libéré" or background == "Collaborateur") then
|
||||
timer.Simple(5, function()
|
||||
if (background == "Libéré") then
|
||||
client:Give("ix_vshield")
|
||||
client:Give("ix_nightvision")
|
||||
client:Give("ix_vortbeam")
|
||||
client:Give("ix_vortheal")
|
||||
client:Give("ix_vortslam")
|
||||
client:Give("ix_vshield")
|
||||
if character:GetSkillLevel("vort") >= 50 then
|
||||
client:Give("ix_vortpyro")
|
||||
client:Give("ix_vortadvancedbeam")
|
||||
end
|
||||
elseif (background == "Collaborator") then
|
||||
client:Give("ix_vshield")
|
||||
client:Give("ix_nightvision")
|
||||
client:Give("ix_vortbeam")
|
||||
client:Give("ix_vortheal")
|
||||
end
|
||||
end)
|
||||
|
||||
if background == "Collaborateur" then
|
||||
character:CreateIDCard(100)
|
||||
inventory:Add("vortigaunt_trousers_brown", 1)
|
||||
timer.Simple(3, function()
|
||||
if IsValid(character) then
|
||||
local genericdata = character:GetGenericdata()
|
||||
|
||||
if (genericdata) then
|
||||
genericdata.socialCredits = (genericdata.socialCredits or 0) + 60
|
||||
character:SetGenericdata(genericdata)
|
||||
character:Save()
|
||||
end
|
||||
end
|
||||
end)
|
||||
character:SetData("equipBgClothes", true)
|
||||
end
|
||||
|
||||
if (background == "Biotique") then
|
||||
local uniqueID = tostring(vortPlugin:GenerateCollarID(character.id))
|
||||
|
||||
inventory:Add("vortigaunt_slave_hooks", 1)
|
||||
inventory:Add("vortigaunt_slave_shackles", 1)
|
||||
inventory:Add("vortigaunt_slave_collar", 1, {
|
||||
collarID = uniqueID,
|
||||
sterilizedCredits = 0
|
||||
})
|
||||
|
||||
character:SetData("equipBgClothes", true)
|
||||
|
||||
timer.Simple(5, function()
|
||||
if client then
|
||||
if client:HasWeapon("ix_nightvision") then
|
||||
client:StripWeapon("ix_nightvision")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortbeam") then
|
||||
client:StripWeapon("ix_vortbeam")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortheal") then
|
||||
client:StripWeapon("ix_vortheal")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vshield") then
|
||||
client:StripWeapon("ix_vshield")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortslam") then
|
||||
client:StripWeapon("ix_vortslam")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortpyro") then
|
||||
client:StripWeapon("ix_vortpyro")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortadvancedbeam") then
|
||||
client:StripWeapon("ix_vortadvancedbeam")
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
else -- freed
|
||||
timer.Simple(5, function()
|
||||
client:Give("ix_vshield")
|
||||
client:Give("ix_nightvision")
|
||||
client:Give("ix_vortbeam")
|
||||
client:Give("ix_vortheal")
|
||||
client:Give("ix_vshield")
|
||||
client:Give("ix_vortslam")
|
||||
if character:GetSkillLevel("vort") >= 50 then
|
||||
client:Give("ix_vortpyro")
|
||||
client:Give("ix_vortadvancedbeam")
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function FACTION:OnSpawn(client)
|
||||
client:SetLocalVar("vortalVision", false)
|
||||
|
||||
timer.Simple(0.1, function()
|
||||
client:SetRunSpeed(ix.config.Get("runSpeed") * 1.25)
|
||||
client:SetJumpPower(ix.config.Get("jumpPower") * 1.25)
|
||||
end)
|
||||
end
|
||||
|
||||
FACTION_VORT = FACTION.index
|
||||
Reference in New Issue
Block a user