mtasa-blue
mtasa-blue copied to clipboard
Add set/getChatboxCharacterLimit and increase max chat message length to 255
This PR resolves #2090 by adding set/getChatboxCharacterLimit functions to the client-side only.
It also increases the max chat message length to 255 (not including player name or "(TEAM)" tags), over the previous maximum (and default) of 96. The default value will still stay at 96.
setChatboxCharacterLimit
bool setChatboxCharacterLimit(int charLimit)
Passing -1 will reset the character limit back to 96. If you pass anything other than an integer, or outside the range of 0-255 (excluding -1), it will return false.
getChatboxCharacterLimit
int getChatboxCharacterLimit()
Pretty self-explanatory.
When a player disconnects from a server, their character limit is set back to the default (96).
On hold, waiting for my review / merge of #2170
Will need to address conflicts in this PR after that.