
17.09.2024, 14:18
|
|
Участник форума
Регистрация: 31.12.2023
Сообщений: 292
С нами:
1248410
Репутация:
48
|
|
Сообщение от skszikri
how to make keybind with lua?
as example
local sampev = require 'samp.events'
function waitUntilSampAvailable()
while not isSampAvailable() do
wait(0)
end
end
function main()
waitUntilSampAvailable()
end
function sampev.onServerMessage(colour, msg)
lua_thread.create(function()
if string.find(msg, "halo") then
sampSendChat("/pm a")
end
end)
end
raksamp show some error
please help me
Lua:
Код:
require
(
"addon"
)
local
sampev
=
require
(
"samp.events"
)
function
sampev
.
onServerMessage
(
colour
,
msg
)
newTask
(
function
(
)
-- analogue lua_thread
if
string
.
find
(
msg
,
"halo"
)
then
sendInput
(
"/pm a"
)
-- analogue sampSendChat
end
end
)
end
|
|
|