Garry's Mod

Garry's Mod

The Rolling Giant [NPC / NEXTBOT]
FireGamer1999 2024 年 5 月 12 日 下午 1:59
Bug Reports
I found this bug where when i load up any map and try to look for Julien in the next bot section he is not there, and when i search for his model in the spawn list it shows up as an error and i can't spawn it in. I don't know what is causing the problem since i have deleted and re downloaded this add on many times, but it is always the same result. And i don't think it is a conflicting addon causing the problem so can someone help me with this? I want to play with this addon in the Valley View Mall map when that comes out in hopefully a few weeks.
< >
正在显示第 1 - 15 条,共 21 条留言
ArcticTwister287 2024 年 5 月 12 日 下午 6:46 
did you check the nextbot section on npc's if you did and its not there. i sadly suggest uninstalling all of your addons and only install the rolling giant nextbot. if it still doesnt show up. may our lord and savior help you
A Guy 2024 年 5 月 14 日 下午 1:36 
i also have a bug it says the Next bot is creating script errors
headcrap  [开发者] 2024 年 5 月 15 日 上午 1:26 
引用自 TheVoid.
i also have a bug it says the Next bot is creating script errors
okay when do you get the message? what does the giant do that causes the error? if you are reporting a bug then tell details so I can fix it as I get no errors with this npc whatsoever
Erra 2024 年 5 月 17 日 下午 4:41 
NextBot [50][rolling_giant] Error: lua/entities/rolling_giant.lua:297: bad argument #1 to 'EmitSound' (string expected, got nil)
I get this error when he runs into an NPC, he'll stop moving and can't hurt anything
headcrap  [开发者] 2024 年 5 月 18 日 上午 1:44 
okay i fixed it i need to just update the addon
Satu Ra 2024 年 5 月 18 日 上午 8:48 
Love this, thank you for the hard work, headcrap.

Just wanted to mention a problem I've noticed... whenever Julien kills me he also dies and needs to be respawned. Initially he would play a Dalek death sound from the Dalek NPC packs, however I disabled these and he still dies on contact with the player but instead plays a 'squish' sound. It's also getting stuck on pillars, low doors etc and not resuming the chase, even if I'm stood right next to it. I'm assuming it's conflicting with other addons, but I can't determine which ones.
headcrap  [开发者] 2024 年 5 月 18 日 下午 2:25 
引用自 Satu Ra
Love this, thank you for the hard work, headcrap.

Just wanted to mention a problem I've noticed... whenever Julien kills me he also dies and needs to be respawned. Initially he would play a Dalek death sound from the Dalek NPC packs, however I disabled these and he still dies on contact with the player but instead plays a 'squish' sound. It's also getting stuck on pillars, low doors etc and not resuming the chase, even if I'm stood right next to it. I'm assuming it's conflicting with other addons, but I can't determine which ones.

yes, the issues you're experiencing are most likely caused by other addons, you can try disabling everything and see if anything has changed
THE PIZZA MAN 2024 年 5 月 26 日 上午 1:19 
when he tries to break a door he breaks it then it creates script errors and he stops moving entirely (also the giant ignores disable ai)
THE PIZZA MAN 2024 年 6 月 2 日 上午 2:35 
NextBot [105][rolling_giant] Error: lua/entities/rolling_giant.lua:377: bad argument #1 to 'TakeDamage' (number expected, got nil) (x3)
Bill Clinton 2024 年 6 月 2 日 下午 7:14 
whenever he touches any npc (even regular citizens/combines) he just stops moving
Bill Clinton 2024 年 6 月 7 日 下午 6:08 
says

NextBot [183][rolling_giant] Error: lua/entities/rolling_giant.lua:292: bad argument #1 to 'TakeDamage' (number expected, got nil)
Bill Clinton 2024 年 6 月 7 日 下午 6:15 
as well as

NextBot [141][rolling_giant] Error: lua/entities/rolling_giant.lua:297: bad argument #1 to 'EmitSound' (string expected, got nil)
Sonic.Exe 2024 年 6 月 8 日 上午 10:38 
the giant ignores the disable ai
Bill Clinton 2024 年 6 月 23 日 下午 12:04 
Shoutouts to my friend itsDanCon who managed to fix it (you should implement it)

AddCSLuaFile() resource.AddFile("materials/entities/rolling_giant.png") resource.AddFile("materials/myaddon/killicons/killicon.png") ENT.Type = "nextbot" ENT.Base = "base_nextbot" ENT.Spawnable = true ENT.PhysgunDisabled = true ENT.PrintName = "rolling giant" ENT.Damage = 5000 CreateConVar("giant_speed", 270, {FCVAR_ARCHIVE, FCVAR_NOTIFY, FCVAR_REPLICATED}, "Set the speed of the NPC") CreateConVar("giant_force", "5000", FCVAR_ARCHIVE, "Adjustable force applied to physics objects by NPC") function ENT:Initialize() self:SetModel("models/custom_models/julien_reverchon_giant.mdl") self.LoseTargetDist = 1e9 self.SearchRadius = 1e9 self:SetHealth(1e9) self:SetCollisionBounds(Vector(-13, -13, 0), Vector(13, 13, 60)) self.LookaheadDistance = 5 local players = player.GetAll() if #players > 0 then local randomPlayer = players[math.random(1, #players)] self:SetEnemy(randomPlayer) end sound.Add({ name = "rolling", channel = CHAN_STATIC, volume = 0.5, level = 80, pitch = 100, sound = "rolling.wav" }) sound.Add({ name = "death", channel = CHAN_STATIC, volume = 1.0, level = 80, pitch = 100, sound = "death.wav" }) sound.Add({ name = "heartbeat", channel = CHAN_STATIC, volume = 0.5, level = 80, pitch = 100, sound = "heartbeat.wav" }) self.rollingSound = CreateSound(self, "rolling.wav") -- Create the sound object self.rollingSound:SetSoundLevel(80) -- Set the sound level self.rollingSound:PlayEx(0.5, 100) -- Play the sound with volume 0.5 and pitch 100 self.heartbeatSound = CreateSound(self, "heartbeat.wav") -- Create the heartbeat sound object self.heartbeatSound:SetSoundLevel(80) -- Set the sound level self.heartbeatSound:PlayEx(0.5, 100) -- Play the sound with volume 0.5 and pitch 100 end if CLIENT then language.Add( "rolling_giant", "rolling giant" ) end if CLIENT then killicon.Add("rolling_giant", "myaddon/killicons/killicon.png", Color(255, 255, 255)) end function ENT:OnKilled() print("real") for _, ply in pairs(player.GetAll()) do ply:ChatPrint("He is restless and rolling about.") end end function ENT:RemoveVehiclesInProximity(radius) local vehicles = ents.FindInSphere(self:GetPos(), radius) for _, ent in pairs(vehicles) do if IsValid(ent) and ent:IsVehicle() then ent:Remove() end end end function ENT:Think() if SERVER then -- Only run this code on the server local vehicles = ents.FindInSphere(self:GetPos(), self.LookaheadDistance) for _, ent in pairs(vehicles) do if ent:IsVehicle() and IsValid(ent:GetDriver()) then ent:Remove() end end end end function ENT:OnRemove() self.rollingSound:Stop() -- Stop the sound when the entity is removed self.heartbeatSound:Stop() -- Stop the sound when the entity is removed end function ENT:OnInjured(dmg) dmg:SetDamage(0) end function ENT:SetEnemy() local nearestPlayer = nil local nearestDistance = math.huge for _, ply in pairs(player.GetAll()) do if IsValid(ply) and ply:Alive() then local distance = self:GetPos():DistToSqr(ply:GetPos()) if distance < nearestDistance then nearestDistance = distance nearestPlayer = ply end end end if IsValid(nearestPlayer) then self.Enemy = nearestPlayer else self.Enemy = nil end end function ENT:GetEnemy() return self.Enemy end function ENT:HaveEnemy() if self:GetEnemy() and IsValid(self:GetEnemy()) then if self:GetRangeTo(self:GetEnemy():GetPos()) > self.LoseTargetDist then return self:FindEnemy() elseif self:GetEnemy():IsPlayer() and not self:GetEnemy():Alive() then return self:FindEnemy() end return true else return self:FindEnemy() end end function ENT:FindEnemy() local shortdist = math.huge local shortdistply = nil if not self:GetEnemy() then for k, ply in pairs(player.GetAll()) do local dist = self:GetRangeTo(ply:GetPos()) if IsValid(ply) and ply:Alive() then if dist < shortdist then shortdist = dist end if dist < shortdist then shortdist = dist elseif dist == shortdist then shortdistply = ply end end end if IsValid(shortdistply) then self:SetEnemy(shortdistply) return true end end self:SetEnemy(nil) return false end function ENT:RunBehaviour() while true do -- Always chase the enemy if there is one if (self:HaveEnemy()) then self.loco:FaceTowards(self:GetEnemy():GetPos()) self:StartActivity(ACT_RUN) self:LookupSequence("walk") self:ResetSequence("walk") self.loco:SetDesiredSpeed(GetConVar("giant_speed"):GetFloat()) self.loco:SetAcceleration(900) self:ChaseEnemy() self.loco:SetAcceleration(400) self:StartActivity(ACT_IDLE) end coroutine.yield() end end function ENT:ChaseEnemy(options) local options = options or {} local path = Path("Follow") path:SetMinLookAheadDistance(options.lookahead or 300) path:SetGoalTolerance(options.tolerance or 20) path:Compute(self, self:GetEnemy():GetPos()) if not path:IsValid() then return "failed" end while path:IsValid() and self:HaveEnemy() do if self:GetRangeTo(self:GetEnemy():GetPos()) < 100 and self:GetEnemy():Health() > 0 then local dmgInfo = DamageInfo() dmgInfo:SetAttacker(self) dmgInfo:SetInflictor(self) dmgInfo:SetDamage(1e8) dmgInfo:SetDamagePosition(self:GetPos()) self:GetEnemy():TakeDamageInfo(dmgInfo) EmitSound("death.wav", self:GetPos(), 1, 100) -- Emit sound at the bot's position if self.rollingSound:IsPlaying() then self.rollingSound:Stop() -- Stop the rolling sound end -- Define an array of possible messages local messages = { "He is restless and rolling about.", "Chat this is giant!", "This view is pretty old!", "Julien reaction, this reaction is giant!", "Mr. giant, roll me a giant." } -- Choose a random message from the array local randomIndex = math.random(#messages) local randomMessage = messages[randomIndex] -- Print the randomly chosen message to the console print(randomMessage) else if not self.rollingSound:IsPlaying() then self.rollingSound:PlayEx(0.5, 100) -- Start the rolling sound end end if path:GetAge() > 0.1 then path:Compute(self, self:GetEnemy():GetPos()) end path:Update(self) local door = ents.FindInSphere(self:GetPos(), 65) if door then for i = 1, #door do local v = door
if not v:IsPlayer() and v ~= self and IsValid(v) then
if self:GetDoor( v ) == "door" then
if v.Hitsleft == nil then
v.Hitsleft = 1
end

if v ~= NULL and v.Hitsleft > 0 then
if self:GetRangeTo(v) < 75 then
if v ~= NULL and v.Hitsleft ~= nil then
if v.Hitsleft > 0 then
v.Hitsleft = v.Hitsleft - 1
end
end
end
end

if v != NULL and v.Hitsleft < 1 then
v:Remove()

local door = ents.Create("prop_physics")
door:SetModel(v:GetModel())
door:SetPos(v:GetPos())
door:SetAngles(v:GetAngles())
door:Spawn()
door:EmitSound("Canals.d1_canals_01a_wood_panel_impact_hard1")

local phys = door:GetPhysicsObject()
if phys ~= nil and phys ~= NULL and phys:IsValid() then
phys:ApplyForceCenter(self:GetForward():GetNormalized() * 20000 + Vector(0, 0, 2))
end

door:SetSkin(v:GetSkin())
door:SetColor(v:GetColor())
door:SetMaterial(v:GetMaterial())
end
end
end
end
end

local ent = ents.FindInSphere( self:GetPos(), 50)
for k, v in pairs(ent) do
if v:IsNPC() or (v:IsPlayer() and v:Alive() and not self.IgnorePlayer) then
if not (v:IsValid() and v:Health() > 0) then
return
end

if self:GetRangeTo(v) < 65 and self:Visible(v) then
if v:IsPlayer() and self:Visible(v) then
v:TakeDamage(self.Damage, self)
-- v:EmitSound(self.Hit)
end

if v:IsNPC() then
-- self:EmitSound(self.Hit)
v:TakeDamage(self.Damage, self)
end
end
end

--[[
if self:GetEnemy() ~= nil then
if self:GetEnemy():GetPos():Distance(self:GetPos()) < 60 or self:AttackProp() then
else
if self:GetEnemy():GetPos():Distance(self:GetPos()) < 60 or self:AttackBreakable() then
end
end
end
]]-- i'm leaving this here commented but what the hell - danii
end

coroutine.yield()
end

return "ok"
end

function ENT:GetDoor(ent)
local doors = {}
doors[1] = "models/props_c17/door01_left.mdl"
doors[2] = "models/props_c17/door02_double.mdl"
doors[3] = "models/props_c17/door03_left.mdl"
doors[4] = "models/props_doors/door01_dynamic.mdl"
doors[5] = "models/props_doors/door03_slotted_left.mdl"
doors[6] = "models/props_interiors/elevatorshaft_door01a.mdl"
doors[7] = "models/props_interiors/elevatorshaft_door01b.mdl"
doors[8] = "models/props_silo/silo_door01_static.mdl"
doors[9] = "models/props_wasteland/prison_celldoor001b.mdl"
doors[10] = "models/props_wasteland/prison_celldoor001a.mdl"
doors[11] = "models/props_radiostation/radio_metaldoor01.mdl"
doors[12] = "models/props_radiostation/radio_metaldoor01a.mdl"
doors[13] = "models/props_radiostation/radio_metaldoor01b.mdl"
doors[14] = "models/props_radiostation/radio_metaldoor01c.mdl"

for k, v in pairs(doors) do
if ent:GetModel() == v and string.find(ent:GetClass(), "door") then
return "door"
end
end
end


function ENT:AttackProp()
local entstoattack = ents.FindInSphere(self:GetPos(), 55)
for _, v in pairs(entstoattack) do
if (v:GetClass() == "prop_physics") then
if not v:IsValid() then
return
end

local phys = v:GetPhysicsObject()
if phys ~= nil and phys ~= NULL and phys:IsValid() then
local force = GetConVar("giant_force"):GetInt()
phys:ApplyForceCenter(self:GetForward():GetNormalized() * force + Vector(0, 0, 2))
v:TakeDamage(0)
end

return true
end
end

return false
end

function ENT:AttackBreakable()
local entstoattack = ents.FindInSphere(self:GetPos(), 55)
for _, v in pairs(entstoattack) do
if (v:GetClass() == "func_breakable") then
if not v:IsValid() then
return
end

v:TakeDamage(self.Damage, self)
return true
end
end

return false
end

list.Set("NPC", "rolling_giant", {
Name = "rolling giant",
Class = "rolling_giant",
Category = "Nextbot",
AdminOnly = true
})
最后由 Bill Clinton 编辑于; 2024 年 6 月 23 日 下午 12:11
引用自 Bill Clinton
Shoutouts to my friend itsDanCon who managed to fix it (you should implement it)

AddCSLuaFile() resource.AddFile("materials/entities/rolling_giant.png") resource.AddFile("materials/myaddon/killicons/killicon.png") ENT.Type = "nextbot" ENT.Base = "base_nextbot" ENT.Spawnable = true ENT.PhysgunDisabled = true ENT.PrintName = "rolling giant" ENT.Damage = 5000 CreateConVar("giant_speed", 270, {FCVAR_ARCHIVE, FCVAR_NOTIFY, FCVAR_REPLICATED}, "Set the speed of the NPC") CreateConVar("giant_force", "5000", FCVAR_ARCHIVE, "Adjustable force applied to physics objects by NPC") function ENT:Initialize() self:SetModel("models/custom_models/julien_reverchon_giant.mdl") self.LoseTargetDist = 1e9 self.SearchRadius = 1e9 self:SetHealth(1e9) self:SetCollisionBounds(Vector(-13, -13, 0), Vector(13, 13, 60)) self.LookaheadDistance = 5 local players = player.GetAll() if #players > 0 then local randomPlayer = players[math.random(1, #players)] self:SetEnemy(randomPlayer) end sound.Add({ name = "rolling", channel = CHAN_STATIC, volume = 0.5, level = 80, pitch = 100, sound = "rolling.wav" }) sound.Add({ name = "death", channel = CHAN_STATIC, volume = 1.0, level = 80, pitch = 100, sound = "death.wav" }) sound.Add({ name = "heartbeat", channel = CHAN_STATIC, volume = 0.5, level = 80, pitch = 100, sound = "heartbeat.wav" }) self.rollingSound = CreateSound(self, "rolling.wav") -- Create the sound object self.rollingSound:SetSoundLevel(80) -- Set the sound level self.rollingSound:PlayEx(0.5, 100) -- Play the sound with volume 0.5 and pitch 100 self.heartbeatSound = CreateSound(self, "heartbeat.wav") -- Create the heartbeat sound object self.heartbeatSound:SetSoundLevel(80) -- Set the sound level self.heartbeatSound:PlayEx(0.5, 100) -- Play the sound with volume 0.5 and pitch 100 end if CLIENT then language.Add( "rolling_giant", "rolling giant" ) end if CLIENT then killicon.Add("rolling_giant", "myaddon/killicons/killicon.png", Color(255, 255, 255)) end function ENT:OnKilled() print("real") for _, ply in pairs(player.GetAll()) do ply:ChatPrint("He is restless and rolling about.") end end function ENT:RemoveVehiclesInProximity(radius) local vehicles = ents.FindInSphere(self:GetPos(), radius) for _, ent in pairs(vehicles) do if IsValid(ent) and ent:IsVehicle() then ent:Remove() end end end function ENT:Think() if SERVER then -- Only run this code on the server local vehicles = ents.FindInSphere(self:GetPos(), self.LookaheadDistance) for _, ent in pairs(vehicles) do if ent:IsVehicle() and IsValid(ent:GetDriver()) then ent:Remove() end end end end function ENT:OnRemove() self.rollingSound:Stop() -- Stop the sound when the entity is removed self.heartbeatSound:Stop() -- Stop the sound when the entity is removed end function ENT:OnInjured(dmg) dmg:SetDamage(0) end function ENT:SetEnemy() local nearestPlayer = nil local nearestDistance = math.huge for _, ply in pairs(player.GetAll()) do if IsValid(ply) and ply:Alive() then local distance = self:GetPos():DistToSqr(ply:GetPos()) if distance < nearestDistance then nearestDistance = distance nearestPlayer = ply end end end if IsValid(nearestPlayer) then self.Enemy = nearestPlayer else self.Enemy = nil end end function ENT:GetEnemy() return self.Enemy end function ENT:HaveEnemy() if self:GetEnemy() and IsValid(self:GetEnemy()) then if self:GetRangeTo(self:GetEnemy():GetPos()) > self.LoseTargetDist then return self:FindEnemy() elseif self:GetEnemy():IsPlayer() and not self:GetEnemy():Alive() then return self:FindEnemy() end return true else return self:FindEnemy() end end function ENT:FindEnemy() local shortdist = math.huge local shortdistply = nil if not self:GetEnemy() then for k, ply in pairs(player.GetAll()) do local dist = self:GetRangeTo(ply:GetPos()) if IsValid(ply) and ply:Alive() then if dist < shortdist then shortdist = dist end if dist < shortdist then shortdist = dist elseif dist == shortdist then shortdistply = ply end end end if IsValid(shortdistply) then self:SetEnemy(shortdistply) return true end end self:SetEnemy(nil) return false end function ENT:RunBehaviour() while true do -- Always chase the enemy if there is one if (self:HaveEnemy()) then self.loco:FaceTowards(self:GetEnemy():GetPos()) self:StartActivity(ACT_RUN) self:LookupSequence("walk") self:ResetSequence("walk") self.loco:SetDesiredSpeed(GetConVar("giant_speed"):GetFloat()) self.loco:SetAcceleration(900) self:ChaseEnemy() self.loco:SetAcceleration(400) self:StartActivity(ACT_IDLE) end coroutine.yield() end end function ENT:ChaseEnemy(options) local options = options or {} local path = Path("Follow") path:SetMinLookAheadDistance(options.lookahead or 300) path:SetGoalTolerance(options.tolerance or 20) path:Compute(self, self:GetEnemy():GetPos()) if not path:IsValid() then return "failed" end while path:IsValid() and self:HaveEnemy() do if self:GetRangeTo(self:GetEnemy():GetPos()) < 100 and self:GetEnemy():Health() > 0 then local dmgInfo = DamageInfo() dmgInfo:SetAttacker(self) dmgInfo:SetInflictor(self) dmgInfo:SetDamage(1e8) dmgInfo:SetDamagePosition(self:GetPos()) self:GetEnemy():TakeDamageInfo(dmgInfo) EmitSound("death.wav", self:GetPos(), 1, 100) -- Emit sound at the bot's position if self.rollingSound:IsPlaying() then self.rollingSound:Stop() -- Stop the rolling sound end -- Define an array of possible messages local messages = { "He is restless and rolling about.", "Chat this is giant!", "This view is pretty old!", "Julien reaction, this reaction is giant!", "Mr. giant, roll me a giant." } -- Choose a random message from the array local randomIndex = math.random(#messages) local randomMessage = messages[randomIndex] -- Print the randomly chosen message to the console print(randomMessage) else if not self.rollingSound:IsPlaying() then self.rollingSound:PlayEx(0.5, 100) -- Start the rolling sound end end if path:GetAge() > 0.1 then path:Compute(self, self:GetEnemy():GetPos()) end path:Update(self) local door = ents.FindInSphere(self:GetPos(), 65) if door then for i = 1, #door do local v = door
if not v:IsPlayer() and v ~= self and IsValid(v) then
if self:GetDoor( v ) == "door" then
if v.Hitsleft == nil then
v.Hitsleft = 1
end

if v ~= NULL and v.Hitsleft > 0 then
if self:GetRangeTo(v) < 75 then
if v ~= NULL and v.Hitsleft ~= nil then
if v.Hitsleft > 0 then
v.Hitsleft = v.Hitsleft - 1
end
end
end
end

if v != NULL and v.Hitsleft < 1 then
v:Remove()

local door = ents.Create("prop_physics")
door:SetModel(v:GetModel())
door:SetPos(v:GetPos())
door:SetAngles(v:GetAngles())
door:Spawn()
door:EmitSound("Canals.d1_canals_01a_wood_panel_impact_hard1")

local phys = door:GetPhysicsObject()
if phys ~= nil and phys ~= NULL and phys:IsValid() then
phys:ApplyForceCenter(self:GetForward():GetNormalized() * 20000 + Vector(0, 0, 2))
end

door:SetSkin(v:GetSkin())
door:SetColor(v:GetColor())
door:SetMaterial(v:GetMaterial())
end
end
end
end
end

local ent = ents.FindInSphere( self:GetPos(), 50)
for k, v in pairs(ent) do
if v:IsNPC() or (v:IsPlayer() and v:Alive() and not self.IgnorePlayer) then
if not (v:IsValid() and v:Health() > 0) then
return
end

if self:GetRangeTo(v) < 65 and self:Visible(v) then
if v:IsPlayer() and self:Visible(v) then
v:TakeDamage(self.Damage, self)
-- v:EmitSound(self.Hit)
end

if v:IsNPC() then
-- self:EmitSound(self.Hit)
v:TakeDamage(self.Damage, self)
end
end
end

--[[
if self:GetEnemy() ~= nil then
if self:GetEnemy():GetPos():Distance(self:GetPos()) < 60 or self:AttackProp() then
else
if self:GetEnemy():GetPos():Distance(self:GetPos()) < 60 or self:AttackBreakable() then
end
end
end
]]-- i'm leaving this here commented but what the hell - danii
end

coroutine.yield()
end

return "ok"
end

function ENT:GetDoor(ent)
local doors = {}
doors[1] = "models/props_c17/door01_left.mdl"
doors[2] = "models/props_c17/door02_double.mdl"
doors[3] = "models/props_c17/door03_left.mdl"
doors[4] = "models/props_doors/door01_dynamic.mdl"
doors[5] = "models/props_doors/door03_slotted_left.mdl"
doors[6] = "models/props_interiors/elevatorshaft_door01a.mdl"
doors[7] = "models/props_interiors/elevatorshaft_door01b.mdl"
doors[8] = "models/props_silo/silo_door01_static.mdl"
doors[9] = "models/props_wasteland/prison_celldoor001b.mdl"
doors[10] = "models/props_wasteland/prison_celldoor001a.mdl"
doors[11] = "models/props_radiostation/radio_metaldoor01.mdl"
doors[12] = "models/props_radiostation/radio_metaldoor01a.mdl"
doors[13] = "models/props_radiostation/radio_metaldoor01b.mdl"
doors[14] = "models/props_radiostation/radio_metaldoor01c.mdl"

for k, v in pairs(doors) do
if ent:GetModel() == v and string.find(ent:GetClass(), "door") then
return "door"
end
end
end


function ENT:AttackProp()
local entstoattack = ents.FindInSphere(self:GetPos(), 55)
for _, v in pairs(entstoattack) do
if (v:GetClass() == "prop_physics") then
if not v:IsValid() then
return
end

local phys = v:GetPhysicsObject()
if phys ~= nil and phys ~= NULL and phys:IsValid() then
local force = GetConVar("giant_force"):GetInt()
phys:ApplyForceCenter(self:GetForward():GetNormalized() * force + Vector(0, 0, 2))
v:TakeDamage(0)
end

return true
end
end

return false
end

function ENT:AttackBreakable()
local entstoattack = ents.FindInSphere(self:GetPos(), 55)
for _, v in pairs(entstoattack) do
if (v:GetClass() == "func_breakable") then
if not v:IsValid() then
return
end

v:TakeDamage(self.Damage, self)
return true
end
end

return false
end

list.Set("NPC", "rolling_giant", {
Name = "rolling giant",
Class = "rolling_giant",
Category = "Nextbot",
AdminOnly = true
}) [/quote]
bro done leaked the code
< >
正在显示第 1 - 15 条,共 21 条留言
每页显示数: 1530 50