Skip to content

Commit 9af2c5f

Browse files
authored
Update SetTimeAndWeather.lua
1 parent 50e0356 commit 9af2c5f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

example/SetTimeAndWeather/SetTimeAndWeather.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function cmdSetTime(param)
2121

2222
local textbuff = string.format(cp1251"[{FF9900}SetTime{990000}] {FF9900}Новое время {990000}- {FF9900}%02d:00{990000}!", hour)
2323
-- print(textbuff)
24-
dl.AddMessageToChat(8, ffi.new("char[" .. string.len( textbuff ) .. "]", textbuff), nullptr, 0x990000, 0)
24+
dl.AddMessageToChat(8, ffi.new("char[" .. string.len( textbuff ) + 1 .. "]", textbuff), nullptr, 0x990000, 0)
2525
else
2626
dl.AddMessageToChat(8, cp1251"[{FF9900}SetTime{990000}] {FF9900}/set_time {606060}[0 - 23]", nullptr, 0x990000, 0)
2727
end
@@ -38,7 +38,7 @@ function cmdSetWeather(param)
3838

3939
local textbuff = string.format(cp1251"[{FF9900}SetWeather{990000}] {FF9900}Новая погода {990000}- {FF9900}%d{990000}!", weather)
4040
-- print(textbuff)
41-
dl.AddMessageToChat(8, ffi.new("char[" .. string.len( textbuff ) .. "]", textbuff), nullptr, 0x990000, 0)
41+
dl.AddMessageToChat(8, ffi.new("char[" .. string.len( textbuff ) + 1 .. "]", textbuff), nullptr, 0x990000, 0)
4242
else
4343
dl.AddMessageToChat(8, cp1251"[{FF9900}SetWeather{990000}] {FF9900}/set_weather {606060}[0 - 45]", nullptr, 0x990000, 0)
4444
end
@@ -59,4 +59,4 @@ function main()
5959
dl.RegisterClientCommand("set_weather", cmdSetWeather, true)
6060

6161
wait(-1)
62-
end
62+
end

0 commit comments

Comments
 (0)