Gamemode.OnAchievementAchieved

From GMod Wiki

Revision as of 23:58, 5 January 2010 by Blackops7799 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameOnAchievementAchieved
SyntaxGM:OnAchievementAchieved( Player player, Integer AchievementID )
DescriptionCalled when a player earns an achievement.
ReturnsNil
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.OnAchievementAchieved]Gamemode.OnAchievementAchieved [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionHow it's defined in the base gamemode
Used onNewerClient.png
Code
 
function GM:OnAchievementAchieved( ply, achid )
 
	chat.AddText( ply, Color( 230, 230, 230 ), " earned the achievement ", Color( 255, 200, 0 ), achievements.GetName( achid ) );
 
end
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox