Garry's Mod Wiki

Revision Difference

Entity:GetBodygroup#515731

<function name="GetBodygroup" parent="Entity" type="classfunc"> <description>Gets the exact value for specific bodygroup of given entity.</description> <realm>Shared</realm> <args> <arg name="id" type="number">The id of bodygroup to get value of. Starts from 0.</arg> </args> <rets> <ret name="" type="number">Current bodygroup. Starts from 0.</ret> </rets> </function> <example> <description>Gets the value of bodygroup 2 of entity player 1 is aiming at.</description> <code>print( Entity(1):GetEyeTrace().Entity:GetBodygroup(2) )</code> <output>"1" in console, if player 1 is aiming at airboat.</output> </example>