Samp Dialog Box Help

Userinspace

Новичок
Автор темы
12
3
Версия MoonLoader
.026-beta
Hey there thanks for helping last time. I'm stuck again, hope I'll get help from here again.

unknown.png


How do I make a script that will choose the first car and select (De)spawn button.
 

awserver

Участник
55
23
Not working for me Here is my code:

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


function ev.onShowDialog(id, style, title, btn1, btn2, text)
    if id == yourId then
        if title:find('Vehicle storage')
            sampSendDialogResponse(yourId, 1, 1, nil)
        end
    end
end
you need to change yourId to the id of dialog, you can receive it by putting this in onShowDialog
sampAddChatMessage(id, -1)
 

qdIbp

Автор темы
Проверенный
1,435
1,175
Lua:
local ev = require 'lib.samp.events'


function ev.onShowDialog(id, style, title, btn1, btn2, text)
sampAddChatMessage(id, -1) -- you receiving the id of dialog
    if id == yourId then  -- change yourId on the id u received
        if title:find('Vehicle storage')
            sampSendDialogResponse(yourId, 1, 1, nil) -- and this one too
        end
    end
end
why ni so?
Lua:
local ev = require 'lib.samp.events'

function ev.onShowDialog(id, style, title, btn1, btn2, text)
    sampAddChatMessage(id, -1) -- you receiving the id of dialog
    if title:find('Vehicle storage') and id == yourId then-- change yourId on the id u received
        sampSendDialogResponse(yourId, 1, 1, nil) -- and this one too
    end
end
 

Похожие темы

  1. Ответы
    2
    Просмотры
    2K
  2. Ответы
    20
    Просмотры
    9K