Raised This Month: $ Target: $400
 0% 

detecting func_breakable material


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 08-13-2009 , 00:17   detecting func_breakable material
Reply With Quote #1

Is there a way to take an entity and discover what material type it has (glass/metal/wood)?
__________________
Bad_Bud is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-13-2009 , 00:31   Re: detecting func_breakable material
Reply With Quote #2

http://wiki.alliedmods.net/CBreakable_(CS)
(Linux offset should be 4 and not 5)

Code:
typedef enum { matGlass = 0, matWood, matMetal, matFlesh, matCinderBlock, matCeilingTile, matComputer, matUnbreakableGlass, matRocks, matNone, matLastMaterial } Materials;
So, use :

#define m_Material 36
get_func_breakable_material(%1) get_pdata_int(%1, m_Material, 4)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 08-13-2009 , 00:42   Re: detecting func_breakable material
Reply With Quote #3

Thanks, Connor!
__________________
Bad_Bud is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-13-2009 , 03:00   Re: detecting func_breakable material
Reply With Quote #4

Quote:
(Linux offset should be 4 and not 5)
Fixed.
__________________
Arkshine 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 15:16.


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