Skip to content
Alf Müller edited this page May 6, 2018 · 3 revisions

There are some custom hooks to improve the performance of TTTC and make things possible.

Hooks:

TTTCClassesInit() [SERVER]

This hook is called if the server is ready to receive new custom classes. In an instance, custom classes are ONLY added to this hook (via/in AddCustomClass(CLASS_NAME, CLASS_TABLE) function)!


TTTCPreClassesInit() [SERVER]

This hook is called before TTT2_ClassesInit()!


TTTCPostClassesInit() [SERVER]

This hook is called after TTT2_ClassesInit()!


TTTCFinishedClassesSync(Player: ply, bool: first) [SHARED]

Player: ply +++ the player that synced the classes bool: first +++ This indicates whether it is the first initialization of the CLASSES list for the clients (maybe useful for better performance or initializing new data)

This hook will be called if the server finished the sync of classes and the client have the updated classes list now. Here you are able in the first instance to access the CLASSES table with all the new custom classes.


TTTCReceiveCustomClasses(PLAYER: ply) [SERVER]

PLAYER: ply ++ the player object

This hook will be called if the server has set the class for a client. Useful if you want to add special equipment or something else!