# Events/Hooks The server communicates with the controller through callbacks/events. Some of the more important events are preprocessed by EvoSC to make them easier to use. All those events called "Hooks" will be listed below. ### Registering a Hook To bind a method to an EvoSC-Hook or TM-Event, you simply call ```PHP Hook::add('NameOfHookOrEvent', [FullyQualifiedClassName, 'methodName'); ``` inside the start method of the module. You can always create a hook for the methods listed in [https://github.com/maniaplanet/script-xmlrpc/blob/master/XmlRpcListing.md#callbacks](https://github.com/maniaplanet/script-xmlrpc/blob/master/XmlRpcListing.md#callbacks) ### Hooks
**Name****Passed arguments****Description**
PlayerConnect**Player** $playerCalled when a player spawns in the server
PlayerDisconnect**Player** $playerCalled when a player leaves the server
PlayerFinish**Player** $player, **int** $timeInMilliseconds, **string** $checkpointsCommaSeparatedCalled when a player finishes or resets, then the time is 0
PlayerCheckpoint**Player** $player, **int** $timeInMilliseconds, **int** $checkpointNumber, **bool** $isFinishCalled when a player passes a checkpoint
PlayerStartCountdown**Player** $playerCalled when the 3-2-1-countdown starts for a player
PlayerPb**Player** $player, **int** $timeInMillisecondsCalled when player drives a new personal best
BeginMatch-Called when the countdown/match starts
EndMatch-Called when the match ended
BeginMap**Map** $mapCalled when a map starts and when EvoSC boots
EndMap**Map** $mapCalled when a map ends
MatchSettingsLoaded**string** $matchSettingsFileCalled when a match-settings is loaded
AddedTimeChanged**int** $addedSecondsCalled when the timelimit was in/decreased
MapPoolUpdated-Called when the maplist changed
MatchTrackerUpdated**Collection** $scoresCalled when scores affecting the match changed (player finished with better time, got points, etc...)
MapQueueUpdated**Collection** $mapsInQueueCalled when a map was added/removed to/from the jukebox
WarmUpStart-Called when the warmup phase starts
WarmUpEnd-Called when the warmup phase ends
AnnounceWinner**Player** $winnerCalled on match end, when the winner is decided
ShowScores**Collection** $allPlayersThatParticipatedInMatchCalled when ther end result is displayed after the match ended
GroupChanged**Player** $playerCalled when the group of a player was changed