Garry's Mod Wiki

achievement_event

Description

Called when a player makes progress on an achievement.

Only called clientside for the player who made progress.

Parameters

string achievement_name
the name of the achievement.
number cur_val
amount of steps toward achievement
number max_val
total amount of steps in achievement

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_event" ) hook.Add( "achievement_event", "achievement_event_example", function( data ) local achievement_name = data.achievement_name // the name of the achievement. local cur_val = data.cur_val // amount of steps toward achievement local max_val = data.max_val // total amount of steps in achievement // Called when a player makes progress on an achievement. end )