Garry's Mod Wiki

Revision Difference

achievements.IsAchieved#513980

<function name="IsAchieved" parent="achievements" type="libraryfunc">⤶ <description>Used in GMod 12 in the achievements menu to show the user if they have unlocked certain achievements.</description>⤶ <realm>Client and Menu</realm>⤶ <args>⤶ <arg name="AchievementID" type="number">Internal Achievement ID number</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="boolean">Returns true if the given achievementID is achieved.</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>Prints true if you got the achievement.</description>⤶ <code>print("Did you get achievement number 7?, " .. achievements.IsAchieved(7))</code>⤶ <output>boolean true (assuming you have unlocked achievement 7)</output>⤶ ⤶ </example>