Cherry/3D2D-Textscreens

Allowing the console to use the "SS_TextScreen" command

FlorianLeChat opened this issue · 4 comments

Hi Cherry,

I am working on a small script that allows to save the textscreens every minute using the console.

At first, I had two issues:

  • The first one because of this check that was making a issue for me. But I finally "fix" this problem with the "TextscreensCanAdmin" hook. The save couldn't be made at his point.
  • The next problem is here and it creates an issue impossible to fix even if the save is working.

These errors are due to the console being considered invalid and as a non-player, some functions such as PLAYER:ChatPrint() cannot work.

For the moment, I can't do otherwise than have this error every save, but it would be cool to make sure that executing the command through the console without error.

Thank you and have a good day!

Hey, thanks for the detailed info!

This use-case is interesting. What's the need for saving all textscreens constantly? The feature was originally created so things like server rules, etc. could be persisted to world spawn - if the server is public and allows players to create textscreens, these are all going to end up being saved permanently to the map.

But anyway, I'm currently out of the country, but will take a look at this when I get back next week.

It should be as easy as detecting if ply is NULL, and then changing the permission detection at the top, and then the ChatPrint() call to a print() call. Would you like to submit a PR for this?

I need to save the textscreens at regular intervals because my administrators regularly use the textscreens during events, most of the time they just forget to save them... I make their work easier!

I would like to do the PR but I really have no idea how to do this in the best way possible, so I think I'm waiting for your changes.

This should now be implemented. Give it a try and let me know @FlorianLeChat!

Everything is working perfectly well following the latest changes, thank you very much!