Raised This Month: $ Target: $400
 0% 

[Solved]Removing all spawned Entitys[can be closed]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Stephen
Senior Member
Join Date: Aug 2004
Old 03-24-2006 , 06:55   [Solved]Removing all spawned Entitys[can be closed]
Reply With Quote #1

Hi.
Ok a new Question again.

I created several Entitys and i made an command to remove them, BUT always the last created entity gets removed the other ones cannot be removed.

How can it be done that i can removed them all entity by entity or all at once ?

Code:
public remove(id) {     if ( avatar[id] !=0 )     {     remove_entity(avatar[id]);     avatar[id] = 0     }     return PLUGIN_HANDLED }

That im using to remove the entity
__________________
www.corona-bytes.net (ECX = ESF Addon)
Stephen is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 03-24-2006 , 06:59  
Reply With Quote #2

when you make the entities give them a specific classname that you can find later.

ex:
Code:
entity_set_string(NewEnt, EV_SZ_classname, "lud_missile")
The do something like this. to get rid of them



Code:
	new iCurrent
	while ((iCurrent = find_ent_by_class(-1, "lud_missile")) != 0){
		remove_entity(iCurrent)
	}
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Stephen
Senior Member
Join Date: Aug 2004
Old 03-24-2006 , 07:11  
Reply With Quote #3

heh Thx it works fantastico ^^.

I have an other question now^^

HOW can i make it so that the Entity that i spawned look in the direction where i looked at when spawning it ?
cause every Model i spawn look into 1 direction no matter where i look at.
__________________
www.corona-bytes.net (ECX = ESF Addon)
Stephen is offline
akysiev
Junior Member
Join Date: Mar 2006
Location: Earth
Old 03-24-2006 , 07:15  
Reply With Quote #4

entity_set_vector( ent, EV_VEC_angles, angles );
akysiev is offline
Stephen
Senior Member
Join Date: Aug 2004
Old 03-24-2006 , 07:28  
Reply With Quote #5

Hmm can you show me an working snippet of that ?
__________________
www.corona-bytes.net (ECX = ESF Addon)
Stephen is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-24-2006 , 07:29  
Reply With Quote #6

http://www.amxmodx.org/funcwiki.php?go=func&id=333

Check the bottom, it may help you.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Stephen
Senior Member
Join Date: Aug 2004
Old 03-24-2006 , 07:42  
Reply With Quote #7

hmm i got it now to lock at other directions but HOW can i make it so it looks at the dircetion i am looking ?

each spawned entitymodel should look at different durections when i spawn them.
Code:
new Float:Vector[3];     entity_get_vector( avatar[id], EV_VEC_v_angle, Float:Vector )     Vector[0]=Float:255     Vector[1]=Float:100     Vector[2]=Float:0

this is what i have now.
__________________
www.corona-bytes.net (ECX = ESF Addon)
Stephen is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 03-24-2006 , 09:10  
Reply With Quote #8

Quote:
HOW can i make it so it looks at the dircetion i am looking ?
Get your angles and set it to your entity.
VEN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode