Hey, I'm looking into making a med kit that heals the player and all players in a 150 unit range. I'm not sure where to start in making this swep, if someone could point me in the right direction or another person who has done this before that would be great.
Thanks.
[url]https://wiki.garrysmod.com/page/ents/FindInSphere[/url]
Set the health of every player that is in this table.
When I print the ents.FindInSphere I get table: 0x3e3abda8 in console. Just a bunch of different ones
[CODE]
for k, v in pairs(self.FindInSphere(self:GetPos , Vector(50,50,50))) do
if v:IsPlayer() and v:Alive() and v:IsValid() then
if v:Health() < v:GetMaxHealth() then
v:SetHealth(v:Health() + 1)
end
end
end
[/CODE]
take this with a gran of sault
I get "attempt to call field 'FindInSphere' <a nil value>", can you give me a hand? Not sure what is wrong.
EDITED: Don't worry fixed it.
Sorry, you need to Log In to post a reply to this thread.