Make some kinda toggle variable that toggles every 0.01 second and when its on it will use findByClass and that RPG and when its off it will use the findByModel
Hi there!
I hope you guys can help me.
I want to do the following with only one E2. I need to find flying RPGs to one Array and a special prop to a different array. But if I do the following...:
[highlight="e2"]
findByClass("rpg_missile")
RPGs = findToArray()
findByModel("Modelpath")
Props = findToArray()
[/highlight]
...both array will contain both, RPG and the props, won't they?
I hope you understand what I want to do and of course I thank you in advance.
Last edited by MephistoFFF; 07-03-2009 at 07:52 AM.
:v:om nom nom nom
Make some kinda toggle variable that toggles every 0.01 second and when its on it will use findByClass and that RPG and when its off it will use the findByModel
Get out. Seriously, do it.
That doesn't work. Both arrays still find both, rpgs and props.
Now, I think I got it, but the code looks terrible:
[highlight="e2"]
findIncludeClass("rpg_missile")
findIncludeModel("models/hunter/misc/sphere075x075.mdl")
findExcludeClass("gmod_wire_spawner")
findInSphere(entity()os(),100000000)
All = findToArray()
All_Count = All:count()
if($All_Count){
All_Index=0
Prop = array()
RPG = array()
}
if(All_Index<All_Count){
All_Index += 1
if(All:entity(All_Index):model()==
"models/hunter/misc/sphere075x075.mdl"&
All:entity(All_Index)wner()==owner()){
Prop:setEntity(Prop:count()+1,All:entity(All_Index ))
RPG = RPG
}
if(All:entity(All_Index):type()=="rpg_missile"){
RPG:setEntity(RPG:count()+1,All:entity(All_Index))
Prop = Prop
}
}
[/highlight]
Last edited by MephistoFFF; 07-03-2009 at 08:06 AM.
:v:om nom nom nom
Wow O.o that is some pretty bad lookin code there XD
My sig was 201 pixels long so moderators snipped it
Oh teh noes!
Bookmarks