- Версия SA-MP
-
- 0.3.7-R2
В общем,остальные функции работают,но onServerMessage не работает,мб не правильно всталенно,подскажите как правильно будет
Надо чтоб оно было едино,единый скрипт,но почему то onServerMessage не функционирует
Надо чтоб оно было едино,единый скрипт,но почему то onServerMessage не функционирует
lua:
local sampev = require 'lib.samp.events'
local table_anim_name = {'BED_Out_R', 'BED_Out_L'}
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage('Yes', 0xFF0000)
wait(-1)
end
function sampev.onApplyPlayerAnimation(id, animLib, animName, frameDelta, loop, lockX, lockY, freeze, time)
if id == select(2, sampGetPlayerIdByCharHandle(1)) then
for k, v in ipairs(table_anim_name) do
if animName == v then
return false
end
end
end
end
function sampev.onServerMessage(color, text)
if text:find('Добро пожаловать') or text:find('Игрок') then return false end
end