Garry's Mod Wiki

Revision Difference

achievements.GetGoal#565837

<function name="GetGoal" parent="achievements" type="libraryfunc"> <description>Retrieves progress goal of given achievement.</description> <realm>Client and Menu</realm> <args> <arg name="achievementID" type="number">The ID of achievement to retrieve goal of. Note: IDs start from 0, not 1.</arg> </args> <rets> <ret name="" type="number">Progress goal of an achievement</ret>⤶ <ret name="" type="number">Progress goal of an achievement.</ret>⤶ </rets> </function> <example> <description>Will print achievement progress and goals for all of your achievements into console</description>⤶ <description>Will print achievement progress and goals for all of your achievements into console.</description>⤶ <code> for i = 0, achievements.Count() - 1 do print( achievements.GetCount( i ) .. " / " .. achievements.GetGoal( i ) ) end </code> <output>Prints achievement progress and goals for all of your achievements into console.</output> </example>