local sampev = require 'lib.samp.events'
local act = true
local send_anim_in_chat = false
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand("nop", function()
act = not act
sampAddChatMessage('Анимация разговора ' .. (act and 'отключена' or 'включена'), -1)
end)
sampRegisterChatCommand("act", function()
send_anim_in_chat = not send_anim_in_chat
sampAddChatMessage('Отображение названий анимаций в чате ' .. (send_anim_in_chat and 'включено' or 'отключено'), -1)
end)
wait(-1)
end
function sampev.onApplyPlayerAnimation(playerid, animlib, animid, delta, loop, lockx, locky, freeze, time)
if act and animlib == 'PED' and animid == 'IDLE_chat' then
return false
end
if send_anim_in_chat and playerid == select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)) then
sampAddChatMessage('Попытка поставить анимацию, animlib = ' ..animlib.. ', animid = ' ..animid, -1)
return false
end
end