Garry's Mod Wiki

Revision Difference

achievements.GetName#565838

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