require "lib.moonloader"
require "lib.sampfuncs"
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand('r', cmd_rchat)
while true do
wait(0)
end
end
function cmd_rchat(text)
local text = tostring(text)
if text ~= nil and text:len() > 0 then
lua_thread.create(function()
sampSendChat("/do Рация на плече")
wait(500)
sampSendChat("/me нажав кнопку, передал сообщение по рации")
wait(500)
sampSendChat('/r '..text)
end)
else
sampAddChatMessage('Используйте: /r [текст]', 0xCECECE)
end
end