{$CLEO}
const
FILE_SETTINGS = "CLEO\ini\login_data.ini"
DISCONNECT_QUIT = 0
DISCONNECT_TIMEOUT = 1
GAMESTATE_NONE = 0
GAMESTATE_WAIT_CONNECT = 1
GAMESTATE_AWAIT_JOIN = 2
GAMESTATE_CONNECTING = 3
GAMESTATE_CONNECTED = 4
GAMESTATE_RESTARTING = 5
GAMESTATE_DISCONNECTED = 6
LOGIN_PASS = 1@
LOGIN_NICK = 2@
LOGIN_PHONE = 3@
LOGIN_EMAIL = 4@
LOGIN_PASS2 = 5@
LOGIN_NICK_NOW = 6@
SERVER_NAME = 7@
SERVER_NAME_NOW = 8@
AMOUNT = 9@
AMOUNT_STRING = 10@v
DIALOG_PASS1 = 1
DIALOG_PHONE = 86
DIALOG_EMAIL = 87
DIALOG_PASS2 = 88
VK_LSHIFT = 0xA0
end
0000:
if
8AF7: get_samp_base_to 29@
then
0A93: end_custom_thread
end
repeat
wait 400
until 0AFA: is_samp_structures_available
wait 2500
while true
wait 0
{ if and
not SAMP.ChatInputOpened()
8B4C: -1
0AB0: VK_LSHIFT
0AB0: 48 // 0
then
0B28: samp disconnect_with_reason DISCONNECT_QUIT
wait 15
0B27: samp set_gamestate GAMESTATE_WAIT_CONNECT
end }
if or
SAMP.IsDialogActive(DIALOG_PHONE)
SAMP.IsDialogActive(DIALOG_PASS1)
SAMP.IsDialogActive(DIALOG_EMAIL)
SAMP.IsDialogActive(DIALOG_PASS2)
then
for AMOUNT = 0 to 25
wait 0
0AD3: string AMOUNT_STRING "ARP_DATA%d" AMOUNT
0AC8: SERVER_NAME = allocate_memory_size 512
0AC8: SERVER_NAME_NOW = allocate_memory_size 512
0AC8: LOGIN_NICK = allocate_memory_size 512
0AC8: LOGIN_PHONE = allocate_memory_size 512
0AC8: LOGIN_PASS = allocate_memory_size 512
0AC8: LOGIN_EMAIL = allocate_memory_size 512
0AC8: LOGIN_PASS2 = allocate_memory_size 512
if
0AF4: SERVER_NAME = read_string_from_ini_file FILE_SETTINGS section AMOUNT_STRING key "SERVER"
then
SERVER_NAME_NOW = SAMP.GetCurrentServerName()
if
0C14: strcmp string1 SERVER_NAME string2 SERVER_NAME_NOW
then
0AF4: LOGIN_NICK = read_string_from_ini_file FILE_SETTINGS section AMOUNT_STRING key "NICK"
LOGIN_NICK_NOW = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
LOGIN_NICK_NOW = SAMP.GetPlayerNickname(LOGIN_NICK_NOW)
if
0C14: strcmp string1 LOGIN_NICK string2 LOGIN_NICK_NOW
then
if
0B4C: samp is_dialog_active DIALOG_PHONE
then
if
0AF4: LOGIN_PHONE = read_string_from_ini_file FILE_SETTINGS section AMOUNT_STRING key "PHONE"
then
0B4B: samp set_current_dialog_editbox_text LOGIN_PHONE
wait 0
0B47: samp close_current_dialog_with_button 1
else
0AF8: samp add_message_to_chat "Был запрос на ввод телефона, но данные не введены в ini файл!" color 0xFF0000
end
end
if
0B4C: samp is_dialog_active DIALOG_PASS1
then
if
0AF4: LOGIN_PASS = read_string_from_ini_file FILE_SETTINGS section AMOUNT_STRING key "PASS1"
then
0B4B: samp set_current_dialog_editbox_text LOGIN_PASS
wait 0
0B47: samp close_current_dialog_with_button 1
else
0AF8: samp add_message_to_chat "Был запрос на ввод пароля, но данные не введены в ini файл!" color 0xFF0000
end
end
if
0B4C: samp is_dialog_active DIALOG_EMAIL
then
if
0AF4: LOGIN_EMAIL = read_string_from_ini_file FILE_SETTINGS section AMOUNT_STRING key "EMAIL"
then
0B4B: samp set_current_dialog_editbox_text LOGIN_EMAIL
wait 0
0B47: samp close_current_dialog_with_button 1
else
0AF8: samp add_message_to_chat "Был запрос на ввод email'а, но данные не введены в ini файл!" color 0xFF0000
end
end
if
0B4C: samp is_dialog_active DIALOG_PASS2
then
if
0AF4: LOGIN_PASS2 = read_string_from_ini_file FILE_SETTINGS section AMOUNT_STRING key "PASS2"
then
0B4B: samp set_current_dialog_editbox_text LOGIN_PASS2
wait 0
0B47: samp close_current_dialog_with_button 1
else
0AF8: samp add_message_to_chat "Был запрос на ввод доп. пароля, но данные не введены в ini файл!" color 0xFF0000
end
end
end
end // chk server name
end // read server name from ini
0AC9: LOGIN_PHONE
0AC9: SERVER_NAME
0AC9: SERVER_NAME_NOW
0AC9: LOGIN_NICK
0AC9: LOGIN_PASS2
0AC9: LOGIN_EMAIL
0AC9: LOGIN_PASS
end // for
end
end // while