AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   detecting func_breakable material (https://forums.alliedmods.net/showthread.php?t=100295)

Bad_Bud 08-13-2009 00:17

detecting func_breakable material
 
Is there a way to take an entity and discover what material type it has (glass/metal/wood)?

ConnorMcLeod 08-13-2009 00:31

Re: detecting func_breakable material
 
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)

Bad_Bud 08-13-2009 00:42

Re: detecting func_breakable material
 
Thanks, Connor!

Arkshine 08-13-2009 03:00

Re: detecting func_breakable material
 
Quote:

(Linux offset should be 4 and not 5)
Fixed.


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

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