не запускается скрипт

accord-

Потрачен
Автор темы
437
79
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Помогите в чем ошибка
script_author('See_Rose')
require 'lib.moonloader'
local imgui = require 'imgui'
local encoding = require "encoding"
local memory = require 'memory'
local ffi = require 'ffi'
local imguiad = require 'lib.imgui_addons'
local samp = require 'lib.samp.events'
local rkeys = require 'lib.rkeys'
local inicfg = require 'inicfg'
local GK = require 'game.keys'
local vkeys = require 'vkeys'
local dlstatus = require('moonloader').download_status
local Matrix3X3 = require "matrix3x3"
local Vector3D = require "vector3d"
local fa = require 'fAwesome5'
encoding.default = 'CP1251'
u8 = encoding.UTF8


function main ()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end

sampRegisterChatCommand(amenu, cmd_amenu)

_, id = sampGetPlayerIdByCharHandle(PLAYER_PED)
nick = sampGetPlayerNickName(id)

imgui.Process = false



while true do
wait(0)

if main_window_state.v == false then
imgui.Process = false
end

if isKeyJustPressed(VK_F3) then
sampAddChatMessage('Вы нажали клавишу {FFFFFF}F3.' .. main_color_text .. 'Ваш ник {FFFFFF}' .. nick .. ', ' .. main_color_text .. 'Ваш ID:{FFFFFF}' .. id, main_color)
end

if isKeyDown(VK_MENU) and isKeyJustPressed(VK_9) then
sampAddChatMessage('Зажим комбо клавиш', main_color)
wait(500)
sampAddChatMessage('Прошло пол секунды', main_color)
end
--Бесконечно пока активен самп

end
end

function cmd_amenu(arg)
main_window_state.v = not main_window_state.v
imgui.Process = main_window_state.v
end

function imgui.OnDrawFrame()
imgui.Begin('Start imgui', main_window_state)
imgui.Text('Some text')
imgui.End()
end

[16:01:26.886095] (system) Session started.
[16:01:26.889093] (debug) Module handle: 5BCB0000

MoonLoader v.026.5-beta loaded.
Developers: FYP, hnnssy, EvgeN 1137

Copyright (c) 2016, BlastHack Team
https://www.blast.hk/moonloader/

[16:01:26.889093] (info) Working directory: C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader
[16:01:26.889093] (debug) FP Control: 0009001F
[16:01:26.889093] (debug) Game: GTA SA 1.0.0.0 US
[16:01:26.889093] (system) Installing pre-game hooks...
[16:01:26.898076] (system) Hooks installed.
[16:01:28.316472] (debug) Initializing opcode handler table
[16:01:28.316472] (debug) package.path = C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\lib\?.lua;C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\lib\?\init.lua;C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\?.lua;C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\?\init.lua;.\?.lua;C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\lib\?.luac;C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\lib\?\init.luac;C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\?.luac;C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\?\init.luac;.\?.luac
[16:01:28.316472] (debug) package.cpath = C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\lib\?.dll;
[16:01:28.325458] (system) Loading script 'C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\AdmTools.lua'...
[16:01:28.326457] (debug) New script: 01D044A4
[16:01:28.392352] (system) AdmTools.lua: Loaded successfully.
[16:01:28.397343] (system) Loading script 'C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\AutoReboot.lua'...
[16:01:28.397343] (debug) New script: 1055E4DC
[16:01:28.401337] (system) ML-AutoReboot: Loaded successfully.
[16:01:28.401337] (system) Loading script 'C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\camhack.lua'...
[16:01:28.401337] (debug) New script: 1055E664
[16:01:28.427292] (system) CamHack: Loaded successfully.
[16:01:28.427292] (system) Loading script 'C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\imgui_notf.lua'...
[16:01:28.427292] (debug) New script: 1055E7EC
[16:01:28.448260] (system) imgui_notf.lua: Loaded successfully.
[16:01:28.448260] (system) Loading script 'C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\Moon ClearAnim.lua'...
[16:01:28.449262] (debug) New script: 1055EB7C
[16:01:28.485865] (system) Moon ClearAnim.lua: Loaded successfully.
[16:01:28.486862] (system) Loading script 'C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\moon imgui demo.lua'...
[16:01:28.486862] (debug) New script: 1057BC7C
[16:01:28.508827] (system) Moon ImGui Example: Loaded successfully.
[16:01:28.508827] (system) Loading script 'C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\reload_all.lua'...
[16:01:28.508827] (debug) New script: 1055F30C
[16:01:28.512822] (system) ML-ReloadAll: Loaded successfully.
[16:01:28.512822] (system) Loading script 'C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\RKeys example.lua'...
[16:01:28.512822] (debug) New script: 1055F494
[16:01:28.523803] (system) RKeys example.lua: Loaded successfully.
[16:01:28.523803] (system) Loading script 'C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\SF Integration.lua'...
[16:01:28.523803] (debug) New script: 1055F61C
[16:01:28.533787] (system) SF Integration: Loaded successfully.
[16:01:37.098520] (system) Installing post-load hooks...
[16:01:37.099518] (system) Hooks installed.
[16:02:07.406938] (error) AdmTools.lua: C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\AdmTools.lua:28: attempt to call global 'sampGetPlayerNickName' (a nil value)
stack traceback:
C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\AdmTools.lua: in function <C:\Games\1337SAMP_CLASSICAL_EDITION\moonloader\AdmTools.lua:21>
[16:02:07.406938] (error) AdmTools.lua: Script died due to an error. (01D044A4)
[16:02:07.463856] (error) imgui_notf.lua: cannot resume non-suspended coroutine
stack traceback:
[C]: in function 'SetMouseCursor'
...mes\1337SAMP_CLASSICAL_EDITION\moonloader\imgui_notf.lua:103: in function <...mes\1337SAMP_CLASSICAL_EDITION\moonloader\imgui_notf.lua:99>
[16:02:07.464857] (error) imgui_notf.lua: Script died due to an error. (1055E7EC)