| Version 1 (modified by , 11 years ago) ( diff ) | 
|---|
Hooks are a way to add additional behaviour to the scripts. They are basically custom scripts that are called upon specific events. For example one could define a hook which is called on player connects and then send a message in the in-game chat to greet the new player.
All hooks have to executable files in SDTD_BASE/<name of hook>/<any name>.sh.
Currently the following hooks are defined:
- playerConnect
- Called after a player has connected
 - Passed parameters:
- Instance name
 - Player ID
 - Entity ID
 - Nickname
 - Steam ID
 
 
 - playerDisconnect
- Called after player has disconnected
 - Passed parameters:
- Instance name
 - Player ID
 - Entity ID
 - Nickname
 - Steam ID
 
 
 - serverPreStart
- Called before an instance is started
 - Passed parameters:
- Instance name
 
 
 - serverPostStart
- Called after an instance was started
 - Passed parameters:
- Instance name
 
 
 - serverPreStop
- Called before an instance is stopped
 - Passed parameters:
- Instance name
 
 
 - serverPostStop
- Called after an instance was stopped
 - Passed parameters:
- Instance name
 
 
 
Attachments (3)
- backup.sh (54 bytes ) - added by 11 years ago.
 - greet.sh (82 bytes ) - added by 10 years ago.
 - 
        greet_sayplayer.sh
 (95 bytes
) - added by  10 years ago.
        
Greeting script using sayplayer
 
Download all attachments as: .zip
  Note:
 See   TracWiki
 for help on using the wiki.
    ![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)