-
Notifications
You must be signed in to change notification settings - Fork 9
How to create new classes
Nicholas-Fuchs edited this page May 9, 2020
·
2 revisions
- Go to 'zombieplague/gamemode/classes' folder
- Go to 'zombies' folder if you want to create a zombie class and 'humans' if you want to create a human class
- Create a new .lua file (Example: bomber.lua)
- Override ZPClass with a ZPClass Object and change as your will
ZPClass.Name = "ZombieBomberClassName"
ZPClass.Description = "ZombieBomberClassDescription"
ZPClass.MaxHealth = 500
ZPClass.PModel = "models/player/zombie_classic.mdl"
ZPClass.Speed = 240
ZPClass.RunSpeed = 260
ZPClass.CrouchSpeed = 0.4
ZPClass.Gravity = 0.7
ZPClass.Breath = 50
function ZPClass:WeaponGive(ply)
ply:Give(ZOMBIE_KNIFE)
end
ZPClass.Ability = ClassManager:CreateClassAbility(true, function(ply)
local Weap = ply:GetWeapon("weapon_frag")
if IsValid(Weap) then
ply:GiveAmmo(1, Weap:GetPrimaryAmmoType(), true)
else
ply:GiveZombieAllowedWeapon("weapon_frag")
end
end)
ZPClass.Ability.Drain = 120
ZPClass.Ability.MaxAbilityPower = 120
if(ZPClass:ShouldBeEnabled()) then
ClassManager:AddZPClass("BomberZombie", ZPClass, TEAM_ZOMBIES)
end