 |
|
Senior Member
Join Date: Mar 2006
Location: Turku Finland
|

02-26-2007
, 15:02
Re: Detect brokeable things
|
#3
|
Quote:
Originally Posted by mysticssjgoku4
How do you want to detect them, and why?
----
The code below finds the breakable entity around a player, and returns the Entity ID of the first find.
Code:
stock find_breakable_thing(id)
{
new ent, Float:origin[3],Float:radius = 64.0, classname[64]
entity_get_vector(id,EV_VEC_origin,origin)
while((ent = find_ent_in_sphere(ent,origin,radius)) != 0)
{
entity_get_string(ent,EV_SZ_classname,classname,63)
if(equali(classname,"func_breakable"))
{
//Code here
return ent;
}
}
return 0
}
|
because i want blow them up when round starts in (freezetime) because if user got stripped out of weapons they can't broke them..
__________________
..Im not smart and im not stupid..
|
|
|
|