SolvedTarget props? Is it possible? Here's the code

Posts 1–5 of 5 · Page 1 of 1
Target props? Is it possible? Here's the code
From: aimsnap.lua
Code:
		for k, v in pairs(ents.GetAll()) do
			if v:IsNPC() then
				table.insert(targets, v)
			end
I was playing around with lenny's scripts to learn something about lua and I wanted to target props, instead of npcs.

I tried to replace:

Code:
for k, v in pairs(ents.GetAll()) do
with
Code:
for k, v in pairs(props) do
And removed:
Code:
if v:IsNPC() then
But sadly it doesn't work so easly, does anyone of you know what can I do to make it work?

Big thank you to anyone reading
Code:
for k,v in pairs( ents.FindByClass( "prop_*" ) ) do
    ...
end
Quote Originally Posted by eth0s View Post
Code:
for k,v in pairs( ents.FindByClass( "prop_*" ) ) do
    ...
end
How would one effectively do this for prophunt, I know you need to aim at the obbcenter of PH_PROP but is there a better way?
Quote Originally Posted by eth0s View Post
Code:
for k,v in pairs( ents.FindByClass( "prop_*" ) ) do
    ...
end
Hey! It doesn't seems to work, but I think the problem is not your code, maybe I need to change something else to make props selectable..
Thanks anyway kind stranger °3°
1 week has passed and no further replies have been made by the OP. Assuming solved.

/Closed.
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us