Jump to content

Хелп


Recommended Posts

Функции типа string.lower, string.sub, string.upper не работают с русским языком

Как исправить?

Пример:

function protection(msg)
cancelEvent()
local msg1 = removeHex(msg,6)
local msg2 = string.lower(msg1)
local firstLetter = string.sub(msg2, 1, 1)
local tail = string.sub(msg2, 2)
local msg3 = string.upper(firstLetter) .. tail
local msg4 = rgbHex(getPlayerNametagColor(source))..getPlayerName(source)..'#FFFFFF: '..msg3

outputChatBox(msg4,getRootElement(), 255, 255, 255, true)


end
addEventHandler('onPlayerChat',root,protection)

https://imgur.com/a/snOARnP

Оба сообщения написаны капсом

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...