Не работает .lua

12312312312321312312

Новичок
Автор темы
3
0
В консольке Сампфункса: (error) new.lua: D:\GTA wsasdas\moonloader\new.lua:11: '=' expected near '-'
[ML]
(error) new.lua: Script died due to an error. (0F85861C).
Кто что-то понимает в этом помогите. :/
 

Вложения

  • moonloader.log
    2.6 KB · Просмотры: 3
  • new.lua
    1.6 KB · Просмотры: 4

12312312312321312312

Новичок
Автор темы
3
0
Lua:
script_name("Pascal For ARZ")
script_author("Pascal")
script_description("Imgui First")

require "lib.moonloader"

local keys = require 'vkeys'
local imgui = require 'imgui'
local encoding = require  'encoding'
encoding.default - 'CP1251'
u8 = encoding.UTF8

local tag = "Zabiv Probiv"
local label = 0
local main_color = 0x5A90CE
local main_color_text = "5A90CE"
local white_color = "FFFFFF"

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

    sampRegisterChatCommand("imgui", cmd_imgui)

    _, id sampGetIdByCharHandle(PLAYER_PED)
    nick = sampGetPlayerNickname(id)

    while true do
        wait(0)

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

        if is KeyDown(VK_MENU) and isKeyJustPressed(VK_9) then
            sampAddChatMessege("Вы нажали зажали клавиши.", main_color)
            wait(500)
            sampAddChatMessege("Прошло пол секунды", main_color)
        end

    end
end

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

function imgui.OnDrawFrame()
    imgui.Begin(u8"Привет", main_window_state)
    imgui.InputText(u8"Вводить текст сюда", text_buffer)
    x, y , z = getCharCoordinates(PLAYER_PED)
    input.Text(u8("Позиция игрока: X:" .. math.floor(x) .. " | Y: " .. math.floor(y) .. " |    Z:" .. math.floor(z)))
    if imgui.Button('Press me') then
        sampAddChatMessege(u8:decode(text_buffer.v), -1)
    end
    ingui.End()
end
 
Последнее редактирование модератором:

BIG BOG

Известный
654
141
Vkeys есть, imgui, encoding, events
кто это писал??почему там знаки либо ни те, либо пропущены?
Lua:
script_name("Pascal For ARZ")
script_author("Pascal")
script_description("Imgui First")

require "lib.moonloader"

local keys = require 'vkeys'
local imgui = require 'imgui'
local encoding = require  'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local tag = "Zabiv Probiv"
local label = 0
local main_color = 0x5A90CE
local main_color_text = "5A90CE"
local white_color = "FFFFFF"

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

    sampRegisterChatCommand("imgui", cmd_imgui)

    _, id = sampGetIdByCharHandle(PLAYER_PED)
    nick = sampGetPlayerNickname(id)

    while true do
        wait(0)

        if isKeyJustPressed(VK_F3) then
            sampAddChatMessege("Вы нажали клавишу {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
            sampAddChatMessege("Вы нажали зажали клавиши.", main_color)
            wait(500)
            sampAddChatMessege("Прошло пол секунды", main_color)
        end

    end
end

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

function imgui.OnDrawFrame()
    imgui.Begin(u8"Привет", main_window_state)
    imgui.InputText(u8"Вводить текст сюда", text_buffer)
    x, y , z = getCharCoordinates(PLAYER_PED)
    input.Text(u8("Позиция игрока: X:" .. math.floor(x) .. " | Y: " .. math.floor(y) .. " |    Z:" .. math.floor(z)))
    if imgui.Button('Press me') then
        sampAddChatMessege(u8:decode(text_buffer.v), -1)
    end
    ingui.End()
end
я вроде исправил все ошибки но эта хрень не работает...
 
Последнее редактирование:
  • Нравится
Реакции: 12312312312321312312

#Northn

Police Helper «Reborn» — уже ШЕСТЬ лет!
Всефорумный модератор
2,633
2,482