![]() |
|
Anti-caps filter - Printable Version +- Las Venturas Playground (https://forum.sa-mp.nl) +-- Forum: Main Talk (https://forum.sa-mp.nl/forum-3.html) +--- Forum: Development (https://forum.sa-mp.nl/forum-16.html) +--- Thread: Anti-caps filter (/thread-33361.html) |
Anti-caps filter - Huracan - 09-01-2016 hey so I think we need an anti-caps feature, it'd work like this: if 5 (this can be changed) or more letters in the player's message have caps enabled, the whole message would be displayed as lowercase However, if it was "LOL" or "OMFG" or "ROFL" it'd show as caps, as long as the rest of the sentence didn't have random caps in there Lemme know what you think please
RE: Anti-caps filter - cake - 09-01-2016 That's something we really want to implement, we even have a ticket for it already: https://github.com/LVPlayground/playground/issues/121 The more we can replace with scripts, the better. RE: Anti-caps filter - Huracan - 09-01-2016 Sorry for my lame reply, I meant to say: thank you cake, for the quick reply. I am happy to see that development is considering this, and I will gratefully await your work! RE: Anti-caps filter - Russell - 09-01-2016 You're absolutely right, this is an issue that could probably be solved within 15 minutes, together with removal of the "nocaps" setting. It does take some time to figure out a good heuristic for filtering capitals. One-word messages such as "LMAO" are fine. Two-word sentences such as "OMG ROFL" are fine. Three-word sentences such as "WTFFFFFFF CAKE OMGGGG" are not fine. Sentences such as "I write PHP, JS and COBOL" are fine, other use of caps likely isn't. If we were to implement this in JavaScript, we could have a JSON file with whitelisted capital-only words and recapitalise sentences with a certain lower/uppercase ratio entirely. That'd be effective, maintainable, testable and performant. It does require moving main chat to JavaScript. RE: Anti-caps filter - Yassine - 09-06-2016 Hello Guys !!! i suggest to use that code i will do a PR later in Github Quote:public OnPlayerText(playerid, text[]) Sadly The Founder of This Feature Not Here
|