
28.09.2022, 02:04
|
|
Участник форума
Регистрация: 05.11.2020
Сообщений: 138
С нами:
2906359
Репутация:
28
|
|
Сообщение от 1ek
Lua:
Код:
local
sampev
=
require
(
"samp.events"
)
require
(
"Tasking"
)
require
(
"addon"
)
local
nickname
=
getNick
(
)
function
onLoad
(
)
print
(
"loaded"
)
print
(
nickname
)
end
function
onUpdate
(
)
Tasking
.
tick
(
)
end
function
sampev
.
onShowDialog
(
id
,
style
,
title
,
btn1
,
btn2
,
text
)
local
function
sendDialogResponse
(
button
,
list
,
input
)
local
bs
=
bitStream
.
new
(
)
bs
:
writeUInt16
(
id
)
bs
:
writeUInt8
(
button
)
bs
:
writeInt16
(
list
)
bs
:
writeUInt8
(
input
:
len
(
)
)
bs
:
writeString
(
input
)
bs
:
sendRPC
(
62
)
end
if
title
:
find
(
"1/4"
)
then
sendDialogResponse
(
1
,
-
1
,
"ТВОЙ ПАРОЛЬ"
)
return
end
if
title
:
find
(
"2/4"
)
then
sendDialogResponse
(
1
,
1
,
""
)
return
end
if
title
:
find
(
"3/4"
)
then
sendDialogResponse
(
1
,
1
,
""
)
return
end
if
title
:
find
(
"4/4"
)
then
sendDialogResponse
(
1
,
1
,
""
)
return
end
end
function
sampev
.
onShowTextDraw
(
id
,
data
)
if
data
.
position
.
x
==
233
then
sendClickTextdraw
(
id
)
end
end
не работает
Сообщение от 1ek
Lua:
Код:
local
sampev
=
require
(
"samp.events"
)
require
(
"Tasking"
)
require
(
"addon"
)
local
nickname
=
getNick
(
)
function
onLoad
(
)
print
(
"loaded"
)
print
(
nickname
)
end
function
onUpdate
(
)
Tasking
.
tick
(
)
end
function
sampev
.
onShowDialog
(
id
,
style
,
title
,
btn1
,
btn2
,
text
)
local
function
sendDialogResponse
(
button
,
list
,
input
)
local
bs
=
bitStream
.
new
(
)
bs
:
writeUInt16
(
id
)
bs
:
writeUInt8
(
button
)
bs
:
writeInt16
(
list
)
bs
:
writeUInt8
(
input
:
len
(
)
)
bs
:
writeString
(
input
)
bs
:
sendRPC
(
62
)
end
if
title
:
find
(
"1/4"
)
then
sendDialogResponse
(
1
,
-
1
,
"ТВОЙ ПАРОЛЬ"
)
return
end
if
title
:
find
(
"2/4"
)
then
sendDialogResponse
(
1
,
1
,
""
)
return
end
if
title
:
find
(
"3/4"
)
then
sendDialogResponse
(
1
,
1
,
""
)
return
end
if
title
:
find
(
"4/4"
)
then
sendDialogResponse
(
1
,
1
,
""
)
return
end
end
function
sampev
.
onShowTextDraw
(
id
,
data
)
if
data
.
position
.
x
==
233
then
sendClickTextdraw
(
id
)
end
end
выдает вот это - \scripts\libs\samp\events\core.lua:21: attempt to call global 'isSampLoaded' (a nil value)
Сообщение от 1ek
Lua:
Код:
local
sampev
=
require
(
"samp.events"
)
require
(
"Tasking"
)
require
(
"addon"
)
local
nickname
=
getNick
(
)
function
onLoad
(
)
print
(
"loaded"
)
print
(
nickname
)
end
function
onUpdate
(
)
Tasking
.
tick
(
)
end
function
sampev
.
onShowDialog
(
id
,
style
,
title
,
btn1
,
btn2
,
text
)
local
function
sendDialogResponse
(
button
,
list
,
input
)
local
bs
=
bitStream
.
new
(
)
bs
:
writeUInt16
(
id
)
bs
:
writeUInt8
(
button
)
bs
:
writeInt16
(
list
)
bs
:
writeUInt8
(
input
:
len
(
)
)
bs
:
writeString
(
input
)
bs
:
sendRPC
(
62
)
end
if
title
:
find
(
"1/4"
)
then
sendDialogResponse
(
1
,
-
1
,
"ТВОЙ ПАРОЛЬ"
)
return
end
if
title
:
find
(
"2/4"
)
then
sendDialogResponse
(
1
,
1
,
""
)
return
end
if
title
:
find
(
"3/4"
)
then
sendDialogResponse
(
1
,
1
,
""
)
return
end
if
title
:
find
(
"4/4"
)
then
sendDialogResponse
(
1
,
1
,
""
)
return
end
end
function
sampev
.
onShowTextDraw
(
id
,
data
)
if
data
.
position
.
x
==
233
then
sendClickTextdraw
(
id
)
end
end
не прошло и ночи, разобрался, все заработало, причиной была отсутствовала одна библиотека
но было бы не плохо сделать так чтобы при регистрации указывалась рефералка, если кто знает как дописать код, дайте знать, заранее благодарен
|
|
|
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|