Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile("shared.lua")
- include('shared.lua')
- /*-----------------------------------------------
- *** Copyright (c) 2012-2015 by DrVrej, All rights reserved. ***
- No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
- without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
- -----------------------------------------------*/
- ENT.Model = "" -- Leave empty if using more than one model
- ENT.StartHealth = GetConVarNumber("vj_ukrm_s_h")
- ENT.MoveType = MOVETYPE_STEP
- ENT.HullType = HULL_HUMAN
- ENT.HullSizeNormal = false -- set to false to cancel out the self:SetHullSizeNormal()
- ---------------------------------------------------------------------------------------------------------------------------------------------
- ENT.VJ_NPC_Class = {"CLASS_UNITED_STATES_FRIENDLY"}
- ENT.BloodColor = "Red" -- The blood type, this will determine what it should use (decal, particle, etc.)
- ENT.PlayerFriendly = true -- Makes the SNPC friendly to the player and HL2 Resistance
- ENT.HasMeleeAttack = true -- Should the SNPC have a melee attack?
- ENT.MeleeAttackDamage = GetConVarNumber("vj_bnd_s_d")
- ENT.FootStepTimeRun = 0.4 -- Next foot step sound when it is running
- ENT.FootStepTimeWalk = 0.5 -- Next foot step sound when it is walking
- ENT.HasGrenadeAttack = true -- Should the SNPC have a grenade attack?
- ENT.SquadName = "american" -- Squad name, console error will happen if two groups that are enemy and try to squad!
- -- ====== Flinching Code ====== --
- ENT.Flinches = 0 -- 0 = No Flinch | 1 = Flinches at any damage | 2 = Flinches only from certain damages
- ENT.FlinchingChance = 12 -- chance of it flinching from 1 to x | 1 will make it always flinch
- ENT.FlinchingSchedules = {SCHED_FLINCH_PHYSICS} -- If self.FlinchUseACT is false the it uses this | Common: SCHED_BIG_FLINCH, SCHED_SMALL_FLINCH, SCHED_FLINCH_PHYSICS
- -- ====== Sound File Paths ====== --
- -- Leave blank if you don't want any sounds to play
- ENT.SoundTbl_FootStep = {"step/step_1.wav","step/step_2.wav","step/step_3.wav","step/step_4.wav"}
- ENT.SoundTbl_Idle = {"ukr_soldier/idle_1.wav","ukr_soldier/idle_2.wav","ukr_soldier/idle_3.wav","ukr_soldier/idle_4.wav","ukr_soldier/idle_5.wav","ukr_soldier/idle_6.wav","ukr_soldier/idle_7.wav","ukr_soldier/idle_8.wav","ukr_soldier/idle_9.wav","ukr_soldier/idle_10.wav","ukr_soldier/idle_11.wav","ukr_soldier/idle_12.wav","ukr_soldier/idle_13.wav","ukr_soldier/idle_14.wav","ukr_soldier/idle_15.wav","idle.wav"}
- ENT.SoundTbl_Alert = {"ukr_soldier/attack_1.wav","ukr_soldier/attack_2.wav","ukr_soldier/attack_3.wav","ukr_soldier/attack_4.wav","ukr_soldier/attack_5.wav","ukr_soldier/alert1.wav","ukr_soldier/alert2.wav"}
- ENT.SoundTbl_Suppressing = {"ukr_soldier/tolls_1.wav","ukr_soldier/tolls_2.wav","ukr_soldier/tolls_3.wav","ukr_soldier/tolls_4.wav"}
- ENT.SoundTbl_Pain = {"ukr_soldier/pain1.wav","ukr_soldier/pain2.wav","ukr_soldier/pain3.wav","ukr_soldier/pain4.wav","ukr_soldier/pain5.wav","ukr_soldier/pain6.wav","ukr_soldier/pain7.wav","ukr_soldier/pain8.wav"}
- ENT.SoundTbl_Death = {"ukr_soldier/death_1.wav","ukr_soldier/death_2.wav","ukr_soldier/death_3.wav","ukr_soldier/death_4.wav","ukr_soldier/death_5.wav","ukr_soldier/death_6.wav","ukr_soldier/death_7.wav"}
- ENT.IdleSoundLevel = 85
- ---------------------------------------------------------------------------------------------------------------------------------------------
- function ENT:CustomInitialize()
- local randomstartskin = math.random(1,3)
- if randomstartskin == 1 then self:SetModel( Model("models/npc/Ukr_SoldierHeavy.mdl") ) else
- if randomstartskin == 2 then self:SetModel( Model("models/npc/Ukr_Soldierstandard.mdl") ) end
- if randomstartskin == 3 then self:SetModel( Model("models/npc/Ukr_SoldierLight.mdl") ) end
- end
- local randomstartbg_chest = math.random(1,2)
- if randomstartbg_chest == 1 then self:SetBodygroup( 1,1 ) else
- if randomstartbg_chest == 2 then self:SetBodygroup( 1,2 ) end
- end
- local randomstartbg_chest = math.random(2,2)
- if randomstartbg_chest == 1 then self:SetBodygroup( 2,0 ) else
- if randomstartbg_chest == 2 then self:SetBodygroup( 2,1 ) end
- end
- local randomstartbg_chest = math.random(3,2)
- if randomstartbg_chest == 1 then self:SetBodygroup( 3,1 ) else
- if randomstartbg_chest == 2 then self:SetBodygroup( 3,2 ) end
- end
- local randomstartbg_chest = math.random(4,1)
- if randomstartbg_chest == 1 then self:SetBodygroup( 4,2 ) end
- end
- local randomstartbg_chest = math.random(5,2)
- if randomstartbg_chest == 1 then self:SetBodygroup( 5,1 ) else
- if randomstartbg_chest == 2 then self:SetBodygroup( 5,2 ) end
- end
- local randomstartbg_chest = math.random(6,2)
- if randomstartbg_chest == 1 then self:SetBodygroup( 6,1 ) else
- if randomstartbg_chest == 2 then self:SetBodygroup( 6,2 ) end
- end
- local randomstartbg_chest = math.random(7,2)
- if randomstartbg_chest == 1 then self:SetBodygroup( 7,1 ) else
- if randomstartbg_chest == 2 then self:SetBodygroup( 7,2 ) end
- end
- local randomstartbg_chest = math.random(8,2)
- if randomstartbg_chest == 1 then self:SetBodygroup( 8,1 ) else
- if randomstartbg_chest == 2 then self:SetBodygroup( 8,2 ) end
- end
- local randomstartbg_chest = math.random(9,2)
- if randomstartbg_chest == 1 then self:SetBodygroup( 9,1 ) else
- if randomstartbg_chest == 2 then self:SetBodygroup( 9,2 ) end
- end
- local randomstartbg_chest = math.random(10,2)
- if randomstartbg_chest == 1 then self:SetBodygroup( 10,1 ) else
- if randomstartbg_chest == 2 then self:SetBodygroup( 10,2 ) end
- end
- local randomstartbg_chest = math.random(11,2)
- if randomstartbg_chest == 1 then self:SetBodygroup( 11,1 ) else
- if randomstartbg_chest == 2 then self:SetBodygroup( 11,2 ) end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement