icho Posted August 29, 2023 Share Posted August 29, 2023 i need just to send random message in chat but my code isn't working, there are no errors or warnings in log local messages = {'message1', 'message2'} local function sendMsgInChat() local randIndex = math.random(1, #messages) local randMsg = messages[randIndex] sendServerCommand('chat', '[SERVER]: '..randMsg) end Events.EveryHours.Add(sendMsgInChat) Link to comment Share on other sites More sharing options...
icho Posted August 30, 2023 Author Share Posted August 30, 2023 i solved this problem, but i have another, if i use cyrillic messages are broken, i tried utf8, utf8-bom, utf16le, utf16be and windows1251 Link to comment Share on other sites More sharing options...
Izeick Posted September 3, 2023 Share Posted September 3, 2023 On 8/30/2023 at 5:20 AM, icho said: i solved this problem, but i have another, if i use cyrillic messages are broken, i tried utf8, utf8-bom, utf16le, utf16be and windows1251 Try to use media/lua/shared/Translate/RU/IG_UI_RU.txt file to encode cyrillic localization. Create 31 line with cyrillic symbols and then use them for lua. F.e, IGUI_F = "Ф", Link to comment Share on other sites More sharing options...
icho Posted September 4, 2023 Author Share Posted September 4, 2023 15 hours ago, Izeick said: Try to use media/lua/shared/Translate/RU/IG_UI_RU.txt file to encode cyrillic localization. Create 31 line with cyrillic symbols and then use them for lua. F.e, IGUI_F = "Ф", thanks, but i already solved the problem Izeick and Mаrk 1 1 Link to comment Share on other sites More sharing options...
excon Posted September 9, 2023 Share Posted September 9, 2023 please add how you solved that issue for other people Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now