Gamemode.RoundEndWithResult

From GMod Wiki

(Redirected from RoundEndWithResult)
Jump to: navigation, search
Event Hook
Hook NameRoundEndResult
SyntaxGM:RoundEndResult( String Player result, String resulttext )
DescriptionCauses the round to end and determines what text to display.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.RoundEndWithResult]Gamemode.RoundEndWithResult [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionEnds the round and granting victory to a team
Used onNewerServer.png
Code
 
GM.RoundEndWithResult(1, team.GetName(1) .. " wins!")
 
OutputText will appear to the players saying winner, team '1' will be registered as the winning team.


DescriptionEnds the round and granting victory to a player
Used onNewerServer.png
Code
 
GM.RoundEndWithResult(ply, ply:GetName() .. " wins!")
 
OutputText will appear to the players saying winner, player 'ply' will be registered as the winner.


Additional Notes/Internal Handling Process

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox