Mtasa-blue: deprecate Text functions serverside

Created on 1 Mar 2020  路  6Comments  路  Source: multitheftauto/mtasa-blue

Is your feature request related to a problem? Please describe.
They are just useless, you can't set own font for example.

Describe the solution you'd like
deprecate all of them.

Describe alternatives you've considered
/

Additional context
i grepped 53GB of gamemodes, text displays was used in single gamemode just to do countdown for race and are used in default resources

enhancement

Most helpful comment

I don't know. I'm in favour of streamlining APIs but I only usually do it when it's easy to move to a better API.

I'm not in favour of this because:

  • due to bc we can't remove the functions
  • there's no real technical reason other than "we recommend using dx functions instead"
  • these will just be an annoying nag message and it's not easily fixable without reimplementing text displaying in your resource

I think this is better solved through documentation. We should just deprecate the functions in the wiki (no code changes) with a note saying _something_ like _this_:

We recommend using dxDrawText instead. To make the text show whilst downloading, use resource priorities.

All 6 comments

It is used in XyzzyRP, which is quite popular considering it was made in 2012 - Polish Real Life (120 players) and New Real Life (70 players) are using these functions. This gamemode is open source so it could be changed.

It is used in XyzzyRP

Deprecation doesn't equal removal/breaking scripts

https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions#Text_functions

How comes that they never crossed my eye.. probably because they are super weird functions. This isn't SA-MP, there is no need to handle text (or boards of text) server-sided, so I can only agree to this proposal.

@CrosRoad95 are you wanting a documentation change or to actually change something in the code?

I think he wants to change server code so that the server console warns about deprecation.

It was used by few servers to show something like "downloading resources, please wait.." but for now I see that most developers are creating one lightweight resource to show this message using client-side functions so yea - I think it should be deprecated but only at 1.6.

I don't know. I'm in favour of streamlining APIs but I only usually do it when it's easy to move to a better API.

I'm not in favour of this because:

  • due to bc we can't remove the functions
  • there's no real technical reason other than "we recommend using dx functions instead"
  • these will just be an annoying nag message and it's not easily fixable without reimplementing text displaying in your resource

I think this is better solved through documentation. We should just deprecate the functions in the wiki (no code changes) with a note saying _something_ like _this_:

We recommend using dxDrawText instead. To make the text show whilst downloading, use resource priorities.

Was this page helpful?
0 / 5 - 0 ratings