General > Developers Corner

Stop MOTD from Opening for x Seconds?

(1/2) > >>

Zarken:
Is there a way to stop the MOTD from opening on "PlayerInitialSpawn" for x amount of seconds?

I'm looking to code my own spawn menu, and dont want the motd to open till after my menu has closed.

Thanks!

JamminR:
You could use timer.simple, but that probably isn't best method for waiting. It would be better if you use a method to detect when the close button is pressed. Sorry I can't do the research to link how right now, I'm not at my normal computer setup this week.

Zarken:
Hey, I only have a timer on the custom spawn menu anyhow, so a timer would be perfect. I just cannot find where to put it :S

Zarken:
Has anyone got any idea?

Timmy:

* Wait until ULX loads completely. Add a hook to the "ULXLoaded" event.
* Store the original PlayerInitialSpawn.showMotd hook function. Use hook.GetTable.
* Remove the PlayerInitialSpawn.showMotd hook.
* Call the original function when you want the user to see the MOTD. JamminR mentioned how you could approach this.

--- Quote from: Zarken on August 18, 2018, 02:13:38 PM ---I just cannot find where to put it :S
--- End quote ---
You want to modify a server-side hook so this would go in a Lua file that runs on the server.

Navigation

[0] Message Index

[#] Next page

Go to full version