onServerMessage

arriva234

Новичок
Автор темы
22
0
Приветствую.
Не работают на раксампе вот эти штуки:

aaaa:
require("addon")
local sampev = require("samp.events")


sampSendChat:
function sampev.onServerMessage(color,text)
if text:match('Вы выбрали местом спавна — по умолчанию.') then
sampSendChat('/apanel')
end
end

sampSendChat:
function sampev.onServerMessage(color,text)
if text:find("Вы успешно авторизовались как Администратор") then
sampSendChat("/az")
end
end

Заранее спасибо.
 
  • Грустно
Реакции: qdIbp

qdIbp

Автор темы
Проверенный
1,450
1,191
Проверь кодировку, чтобы стояла windows - 1251
и изучи данный гайд
Lua:
require("addon")
local sampev = require("samp.events")

function sampev.onServerMessage(clr,text)
    if text:match('Вы выбрали местом спавна %— по умолчанию%.') then
        sampSendChat('/apanel')
    end
    if text:match("Вы успешно авторизовались как Администратор") then
        sampSendChat("/az")
    end
end
 
Последнее редактирование:

qdIbp

Автор темы
Проверенный
1,450
1,191
raksamplite:
local sampev = require("samp.events")
require("addon")

function sampev.onServerMessage(color, text)
if text:find('Вы выбрали местом спавна') then
sendInput('/apanel')
end
if text:find('Вы успешно авторизовались') then
sendInput('/az')
end
end
А для тебя этот гайд