Gamemode.OnRoundEnd
From GMod Wiki
Revision as of 23:44, 9 December 2009 by Unrealomega (Talk | contribs)
Event Hook | |
Hook Name | OnRoundEnd |
Syntax | GM:OnRoundEnd( Number round_number ) |
Description | Called at the end of a round |
Returns | Nil |
Lua State | |
BBCode | [b][url=wiki.garrysmod.com/?title=Gamemode.OnRoundEnd]Gamemode.OnRoundEnd [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Puts a message in chat saying who won. Note: Assumes that you used a team based round end (see RoundEndWithResult). |
---|---|
Used on | |
Code | function printWinner(round) local txt = team.GetName(GetGlobalInt("RoundResult")) .. " won round " .. tostring(round) for i, ply in pairs(player.GetAll()) do ply:ChatPrint(txt) end end hook.Add("OnRoundEnd", printWinner) |
Output | See the code... |
Additional Notes
- Called by RoundEnd