Raised This Month: $ Target: $400
 0% 

Detect brokeable things


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 02-26-2007 , 14:11   Re: Detect brokeable things
Reply With Quote #2

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 }
__________________


Last edited by mysticssjgoku4; 02-26-2007 at 14:15.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
 



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 00:37.


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