local hook = require('samp.events')
local bool = false
function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('flybp', function()
bool = not bool
sampAddChatMessage(bool and 'On' or 'Off', -1)
end)
wait(-1)
end
function hook.onSendPlayerSync(player)
if bool then
for i = 0, 2 do
player.quaternion[i] = 0
end
player.quaternion[3] = math.random(-1, 1)
player.moveSpeed = {0.7, 0.7, 0.7}
player.animationId = math.random(1, 1812)
player.animationFlags = 11111
end
end