HOME FORUMS MEMBERS RECENT POSTS LOG IN  
× Авторизация
Имя пользователя:
Пароль:
Нет аккаунта? Регистрация
Баннер 1   Баннер 2
НОВЫЕ ТОРГОВАЯ НОВОСТИ ЧАТ
loading...
Скрыть
Вернуться   ANTICHAT > ПРОГРАММИРОВАНИЕ > С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby
   
 
 
Опции темы Поиск в этой теме Опции просмотра

  #10  
Старый 28.09.2022, 02:04
TuHku BuHKu
Участник форума
Регистрация: 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)
 


Быстрый переход




ANTICHAT ™ © 2001- Antichat Kft.