Facebook
From Small Armadillo, 2 Years ago, written in Plain Text.
This paste is a reply to Auto Find V2 from IbraJ - view diff
Embed
Download Paste or View Raw
Hits: 232
  1. {$CLEO .cs}
  2. 0000:
  3.  
  4. 31@ = 0
  5. alloc 14@ 260
  6. alloc 15@ 260
  7. alloc 16@ 260
  8. alloc 17@ 260
  9.  
  10. :SAMP
  11. wait 0
  12. if
  13.   SAMP.Available()
  14. jf @SAMP
  15. if
  16.   0AAB:   file_exists "CLEO\ini\find.ini"
  17. jf @notfound
  18. chatmsg "Auto Find V2 created by Ibrahim Jmel!" 0x3C92FF
  19. 0AF0: 1@ = get_int_from_ini_file "cleo\ini\find.ini" section "FIND" key "ID"
  20. 0AF0: 19@ = get_int_from_ini_file "cleo\ini\find.ini" section "FIND" key "DELAY"
  21. 0AF4: 14@ = read_string_from_ini_file "cleo\ini\find.ini" section "STRINGS" key "SETFIND"
  22. 0AF4: 15@ = read_string_from_ini_file "cleo\ini\find.ini" section "STRINGS" key "DELAY"
  23. 0AF4: 16@ = read_string_from_ini_file "cleo\ini\find.ini" section "STRINGS" key "ACTIVATION"
  24. 0AF4: 17@ = read_string_from_ini_file "cleo\ini\find.ini" section "STRINGS" key "DEACTIVATION"
  25.  
  26. :Commands
  27. wait 0
  28. if
  29.   Player.Defined(0)
  30. jf @Commands
  31. 0B34: samp register_client_command 14@ to_label @setfind
  32. 0B34: samp register_client_command 15@ to_label @delay
  33. 0B34: samp register_client_command 16@ to_label @Activation
  34. 0B34: samp register_client_command 17@ to_label @Deactivation
  35.  
  36. :Body
  37. wait 0
  38. if and
  39.   31@ == 1
  40.   0B61:  samp is_local_player_spawned
  41. jf @Body
  42. say "/find %d" 1@
  43. wait 19@
  44. jump @Body
  45.  
  46. //-----------------------------// Registered commands //----------------------------------------//
  47.  
  48. :setfind
  49. wait 0
  50. 0B35: samp 0@ = get_last_command_params
  51. if
  52.   0AD4: 0@ = scan_string 0@ format "%d" 1@ //IF and SET
  53. jf @false_1
  54. if
  55.   0B23:  samp is_player_connected 1@
  56. jf @false_2
  57. 3@ = SAMP.GetPlayerNickname(1@)
  58. 4@ = SAMP.GetPlayerPing(1@)
  59. 5@ = SAMP.GetPlayerScore(1@)
  60. chatmsg "Auto Find has been adjusted on %s | ID: %d | Level: %d | Ping: %d" -1 3@ 1@ 5@ 4@
  61. 0AF1: write_int 1@ to_ini_file "cleo\ini\find.ini" section "FIND" key "ID"
  62. SAMP.CmdRet()
  63.  
  64. :delay
  65. wait 0
  66. 0B35: samp 7@ = get_last_command_params
  67. if
  68.   0AD4: $NOT_USED = scan_string 7@ format "%d" 19@ //IF and SET
  69. jf @false_3
  70. chatmsg "Auto Find delay has been adjusted to: %d ms" -1 19@
  71. 0AF1: write_int 19@ to_ini_file "cleo\ini\find.ini" section "FIND" key "DELAY"
  72. SAMP.CmdRet()
  73.  
  74. :Activation
  75. wait 0
  76. 31@ = 1
  77. chatmsg "Auto Find V2 is {5eff00}Enabled!" -1
  78. SAMP.CmdRet()
  79.  
  80. :Deactivation
  81. wait 0
  82. 31@ = 0
  83. chatmsg "Auto find V2 is {ff0000}Disabled!" -1
  84. SAMP.CmdRet()
  85.  
  86.  
  87.  
  88. //------------------------------------// Error messsages //------------------------------------------//
  89.  
  90.  
  91. :notfound
  92. wait 0
  93. if
  94.   8AAB: not  file_exists "CLEO\ini\find.ini"
  95. jf @SAMP
  96. 0ACD: "~r~Find.ini is missing therefore modification will not initiate." 4000
  97. 0A93: end_custom_thread
  98.  
  99. :false_1
  100. wait 0
  101. chatmsg "{ff0000}Incorrect Usage:{FFFFFF} /find [id]" -1
  102. SAMP.CmdRet()
  103.  
  104. :false_2
  105. wait 0
  106. chatmsg "{ff0000}Error:{FFFFFF} Player is not connected!" -1
  107. SAMP.CmdRet()
  108.  
  109. :false_3
  110. wait 0
  111. chatmsg "{ff0000}Incorrect Usage:{FFFFFF} /delay [ms] (Example: 1000 ms = 1 second)" -1
  112. SAMP.CmdRet()
  113.  
  114.  

Replies to Re: Auto Find V2 rss

Title Name Language When
Re: Re: Auto Find V2 Melodic Bee text 2 Years ago.