ExampleModule.tscript 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. function ExampleModule::onCreate(%this)
  2. {
  3. }
  4. function ExampleModule::onDestroy(%this)
  5. {
  6. }
  7. //This is called when the server is initially set up by the game application
  8. function ExampleModule::initServer(%this)
  9. {
  10. %this.queueExec("./scripts/shared/ExampleGameMode");
  11. }
  12. //This is called when the server is created for an actual game/map to be played
  13. function ExampleModule::onCreateGameServer(%this)
  14. {
  15. }
  16. //This is called when the server is shut down due to the game/map being exited
  17. function ExampleModule::onDestroyGameServer(%this)
  18. {
  19. }
  20. //This is called when the client is initially set up by the game application
  21. function ExampleModule::initClient(%this)
  22. {
  23. %this.queueExec("./scripts/client/inputCommands");
  24. //client scripts
  25. exec("./scripts/client/defaultkeybinds");
  26. %this.queueExec("./scripts/shared/ExampleGameMode");
  27. }
  28. //This is called when a client connects to a server
  29. function ExampleModule::onCreateClientConnection(%this)
  30. {
  31. ExampleMovemap.push();
  32. }
  33. //This is called when a client disconnects from a server
  34. function ExampleModule::onDestroyClientConnection(%this)
  35. {
  36. }