Garry's Mod Wiki

Garry's Mod Wiki

Description

Called when a player earns an achievement.

Members

number achievement
The achievement ID.
number player
The UserID of the player.

Examples

Example

This is a basic template with the purpose of including all arguments / table variables to make it easily known which values can be accessed.

gameevent.Listen( "achievement_earned" ) hook.Add( "achievement_earned", "achievement_earned_example", function( data ) local achievement = data.achievement -- The achievement ID local player = data.player -- Same as Player:UserID() -- Called when a player earns an achievement. end )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...