Version 3 (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.
If you think a hook for another event could be interesting please create a ticket or contact me.
Currently the following hooks are defined:
Hook name | Called on event | Passed parameters |
---|---|---|
playerConnect | After a player has connected |
|
playerDisconnect | After a player has disconnected | |
serverPreStart | Before an instance is started |
|
serverPostStart | After an instance was started | |
serverPreStop | Before an instance is stopped | |
serverPostStop | After an instance was stopped | |
backup | After a backup was created |
|
Attachments (3)
- backup.sh (54 bytes ) - added by 10 years ago.
- greet.sh (82 bytes ) - added by 9 years ago.
-
greet_sayplayer.sh
(95 bytes
) - added by 9 years ago.
Greeting script using sayplayer
Download all attachments as: .zip