как скипнуть DIALOG_STYLE_MSGBOX ?

Foxy01

Известный
Автор темы
283
125
Я в полной отчаяности
как при появлении DIALOG_STYLE_MSGBOX(1 кнопочного диалога)
он скипался(нажимал на 1или2 кнопку)
 
Решение
У
  • Удалённый пользователь 123482

Lua:
local sampev = require 'lib.samp.events'

function sampev.onShowDialog(id, style, title, button1, button2, text)
    if style == 0 then sampCloseCurrentDialogWithButton(1) end
end
Лучше всего сделать немного по другому, чтобы диалог не мелькал на экране:

Lua:
local sampEvents = require('lib.samp.events')

function sampEvents.onShowDialog(id, style, title, button1, button2, text)
    if style == 0 then
        sampSendDialogResponse(id, 1, 0, '')
        return false
    end
end

chapo

tg/inst: @moujeek
Всефорумный модератор
9,234
12,656
Я в полной отчаяности
как при появлении DIALOG_STYLE_MSGBOX(1 кнопочного диалога)
он скипался(нажимал на 1или2 кнопку)
Lua:
local sampev = require 'lib.samp.events'

function sampev.onShowDialog(id, style, title, button1, button2, text)
    if style == 0 then sampCloseCurrentDialogWithButton(1) end
end
 
  • Нравится
Реакции: Foxy01
У

Удалённый пользователь 123482

Гость
Lua:
local sampev = require 'lib.samp.events'

function sampev.onShowDialog(id, style, title, button1, button2, text)
    if style == 0 then sampCloseCurrentDialogWithButton(1) end
end
Лучше всего сделать немного по другому, чтобы диалог не мелькал на экране:

Lua:
local sampEvents = require('lib.samp.events')

function sampEvents.onShowDialog(id, style, title, button1, button2, text)
    if style == 0 then
        sampSendDialogResponse(id, 1, 0, '')
        return false
    end
end