Guest User

cod original

a guest
Nov 5th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.89 KB | None | 0 0
  1. {$CLEO}
  2. {$INCLUDE SF}
  3. 0000:
  4.  
  5. repeat
  6. wait 0
  7. until SAMP.Available()
  8.  
  9. 0b34: "find" @find
  10. 0b34: "under" @undercover
  11. 0b34: "chit" @chit
  12. 0b34: "o1" @order1
  13. 0b34: "ghit" @gethit
  14. 0b34: "trr" @restart
  15. 0b34: "turn" @phone
  16. 0b34: "cancelhit" @cancelhit
  17. 0b34: "debug" @debug
  18. 0b34: "myctc" @mycontract
  19. 0b34: "kp" @killcp
  20. 0BFC: set_global_var "TARGETMODE" = 0
  21.  
  22.  
  23. if 0aab: file_exists "CLEO\targetfind3r.ini"
  24. then
  25. 0AF0: 29@ = get_int_from_ini_file "cleo\targetfind3r.ini" section "target" key "delete"
  26. 0AF0: 25@ = get_int_from_ini_file "cleo\targetfind3r.ini" section "target" key "mode"
  27. if 29@ < 0
  28. then
  29. 0B00: delete_file "CLEO\targetfind3r.ini"
  30. 0AF1: write_int 25@ to_ini_file "cleo\targetfind3r.ini" section "target" key "mode"
  31. 0AF1: write_int 1 to_ini_file "cleo\targetfind3r.ini" section "target" key "delete"
  32. 29@ = 1
  33. end
  34. end
  35.  
  36.  
  37.  
  38.  
  39. if or
  40. 29@ == 1
  41. 8AAB: file_exists "CLEO\targetfind3r.ini"
  42. then
  43. 0AF5: write_string "1.4.1" to_ini_file "cleo\targetfind3r.ini" section "target" key "ver"
  44.  
  45. if not 29@ == 1
  46. then
  47. 0AF1: write_int 1 to_ini_file "cleo\targetfind3r.ini" section "target" key "mode"
  48. end
  49.  
  50. 0AF1: write_int 100 to_ini_file "cleo\targetfind3r.ini" section "distance" key "rank1"
  51. 0AF1: write_int 100 to_ini_file "cleo\targetfind3r.ini" section "distance" key "rank2"
  52. 0AF1: write_int 150 to_ini_file "cleo\targetfind3r.ini" section "distance" key "rank3"
  53. 0AF1: write_int 160 to_ini_file "cleo\targetfind3r.ini" section "distance" key "rank4"
  54. 0AF1: write_int 180 to_ini_file "cleo\targetfind3r.ini" section "distance" key "rank5"
  55. alloc 29@ 256
  56. 0AF4: 29@ = read_string_from_ini_file "CLEO\targetfind3r.ini" section "target" key "ver"
  57. else
  58. alloc 29@ 256
  59. 0AF4: 29@ = read_string_from_ini_file "CLEO\targetfind3r.ini" section "target" key "ver"
  60. end
  61.  
  62. 0C11: memset destination 29@ value 0 size 256
  63.  
  64.  
  65.  
  66. const
  67. __RED = 0xCE1924
  68. __DRD = 0x660200
  69. __GRN = 0x48EB12
  70. __YLW = 0xFFC726
  71. __BLU = 0x33B9FB
  72. __WHT = 0xFAFAFA
  73. end
  74.  
  75. chatmsg "{%x}[{%x}K{%x}] {%x}TargetFind{%x}3{%x}r {%x}v%s {%x}loaded, use {%x}[/target] {%x}for help." -1 __DRD __RED __DRD {K} __RED {TARGET} __GRN __RED {Find3r} __YLW 29@ {ver} __RED __YLW __RED
  76. 0c6a: -1 = create_custom_thread_at_label @menu_find3r
  77.  
  78. 5@ = 4
  79. 13@ = 1
  80. 15@ = -1
  81. 0BE3: raknet setup_incoming_rpc_hook @target_chat
  82. 6@ = 0
  83.  
  84. while true
  85. wait 0
  86.  
  87. if 0C5F: is_global_var "TARGETMODE" defined
  88. then
  89. 0BFD: 24@ = get_global_var "TARGETMODE"
  90. end
  91. 03F0: enable_text_draw 1
  92.  
  93. if 6@ == 1 //Contract
  94. then
  95.  
  96. if 0ab1: call @cp_exist 0
  97. then
  98. 0ab1: call @setPos 1 15@
  99. end
  100.  
  101. 0ab1: call @setDistanceTD 3 15@ 14@ 24@
  102.  
  103. if and
  104. 2@ = SAMP.GetActorHandleByPlayerID(15@)
  105. 02D8: actor $PLAYER_ACTOR current_weapon == 34
  106. then
  107.  
  108. if or
  109. 16@ == 1
  110. key_press 2
  111. then
  112. 0665: get_char_model 2@ store_to 11@
  113. 0C48: samp textdraw 500 create "Sniper" pos 535.0 180.0
  114. 0C49: samp textdraw 500 set_box true color 0x00000000 size 100.0 100.0
  115. 0C4C: samp textdraw 500 set_style 5
  116. 0C4F: samp textdraw 500 set_model 11@ rotation 0.0 0.0 0.0 zoom 1.1 veh_color 0 0
  117. 0C48: samp textdraw 600 create "TargetFind3r" pos 585.0 275.0
  118. 0C4E: samp textdraw 600 set_outline 1 color 0xFF000000
  119. 0C4A: samp textdraw 600 set_align 2
  120. 0C4B: samp textdraw 600 set_proportional true
  121. 0C4D: samp textdraw 600 set_shadow 1 color 0xFF000000
  122.  
  123. if not SAMP.ChatInputOpened()
  124. then
  125. 1@ = 0
  126. end
  127. 16@ = 0
  128. end
  129.  
  130. if key_down 2 //FindTarget
  131. then
  132.  
  133. if 0ab1: call @target 1 2@
  134. then
  135. 0C49: samp textdraw 600 set_box true color 0xff00ff00 size 100.0 100.0
  136. else
  137. 0C49: samp textdraw 600 set_box true color 0xffff0000 size 100.0 100.0
  138. end
  139.  
  140. 0ab1: call @target_status 1 2@
  141. 0ab1: call @setSize 0
  142. else
  143. if not 1@ == 1 //If chat func not running
  144. then
  145. 0C5E: samp textdraw 500 delete
  146. 0C5E: samp textdraw 600 delete
  147. 0C5E: samp textdraw 700 delete
  148. else //Chat reminder
  149. 0C50: samp textdraw 600 set_string "Press LClick"
  150. 0ab1: call @target_status 1 2@
  151. 0C49: samp textdraw 600 set_box true color 0xffffff00 size 100.0 100.0
  152. end
  153. end
  154. else
  155. if and
  156. 0C5D: samp textdraw 500 is_exists
  157. 0C5D: samp textdraw 600 is_exists
  158. 0C5D: samp textdraw 700 is_exists
  159. then
  160. 0C5E: samp textdraw 500 delete
  161. 0C5E: samp textdraw 600 delete
  162. 0C5E: samp textdraw 700 delete
  163. else
  164. 16@ = 1
  165. end
  166. end
  167.  
  168. if and //ChatOpen
  169. not SAMP.ChatInputOpened()
  170. key_down 82
  171. key_down 2
  172. not 1@ == 1
  173. then
  174. 1@ = 1
  175. 16@ = 1
  176. 0B79: samp set_chat_input_enabled 1
  177. end
  178.  
  179. if and
  180. 24@ == 1
  181. 3@ == 1
  182. then
  183. if 8C5D: samp textdraw 155 is_exists
  184. then
  185. 0C48: samp textdraw 155 create "~y~PHONE OFF" pos 354.5 405.0
  186. 0C4E: samp textdraw 155 set_outline 1 color 0xFF000000
  187. 0C4A: samp textdraw 155 set_align 3
  188. 0C4C: samp textdraw 155 set_style 1
  189. 0C52: samp textdraw 155 set_letter_size 0.33 1.2 color 0xFFffffff
  190. 0C4B: samp textdraw 155 set_proportional true
  191. end
  192. end
  193.  
  194. end
  195.  
  196.  
  197. if 1@ == 1
  198. then
  199. if and
  200. not SAMP.ChatInputOpened()
  201. key_down 2
  202. then
  203. 0C50: samp textdraw 600 set_string "TargetFind3r"
  204. 1@ = 0
  205. else
  206. 0ab1: call @sniper_csh 0
  207. end
  208. end
  209.  
  210.  
  211. if 4@ == 1
  212. then
  213.  
  214. gosub @deletePhone
  215.  
  216. if and
  217. not 6@ == 1
  218. 5@ > -1
  219. then
  220. 0ab1: call @timer 1 32@ | 7@
  221.  
  222. alloc 8@ 50
  223. format 8@ "%02d : %02d" 5@ 7@
  224.  
  225. if 8c5d: samp textdraw 158 is_exists
  226. then
  227. 0C48: samp textdraw 158 create 8@ pos 342.3 405.0
  228. 0C4E: samp textdraw 158 set_outline 1 color 0xFF000000
  229. 0C4A: samp textdraw 158 set_align 3
  230. 0C4C: samp textdraw 158 set_style 1
  231. 0C52: samp textdraw 158 set_letter_size 0.33 1.2 color 0xFFffffff
  232. 0C4B: samp textdraw 158 set_proportional true
  233. end
  234.  
  235. 0C50: samp textdraw 158 set_string 8@
  236. free 8@
  237.  
  238. if 32@ >= 60000
  239. then
  240. 5@ -= 1
  241. 32@ = 0
  242. end
  243.  
  244. else
  245. 5@ = 4
  246. 4@ = 0
  247. if 0C5D: samp textdraw 158 is_exists
  248. then
  249. 0C5E: samp textdraw 158 delete
  250. end
  251. end
  252. end
  253.  
  254. END
  255.  
  256. :debug
  257. SAMP.IsCommandTyped(15@)
  258. 0C1A: 15@ = atoi 15@
  259. 0af0: 24@ = get_int_from_ini_file "cleo\targetfind3r.ini" section "target" key "mode"
  260. 0BFC: set_global_var "TARGETMODE" = 24@
  261. 6@ = 1
  262. SAMP.CmdRet()
  263.  
  264. :killcp
  265. say "/killcp"
  266. SAMP.CmdRet()
  267.  
  268. :mycontract
  269. say "/mycontract"
  270. SAMP.CmdRet()
  271.  
  272. :phone
  273. SAMP.IsCommandTyped(9@)
  274. 0C28: strlwr in 9@ out 9@
  275. if 0c14: 9@ "off"
  276. then
  277. 3@ = 1
  278. else
  279. if or
  280. 0c14: 9@ "on"
  281. 0c14: 9@ "off calls"
  282. then
  283. 3@ = 0
  284. gosub @deletePhone
  285. end
  286. end
  287. say "/turn %s" 9@
  288. SAMP.CmdRet()
  289.  
  290. :undercover
  291. say "/undercover"
  292. SAMP.CmdRet()
  293.  
  294. :chit
  295. if 6@ == 1
  296. then
  297. gosub @setVars
  298. end
  299. say "/cancelhit"
  300. SAMP.CmdRet()
  301.  
  302. :cancelhit
  303. if 6@ == 1
  304. then
  305. gosub @setVars
  306. end
  307. say "/cancelhit"
  308. SAMP.CmdRet()
  309.  
  310. :checkcontract
  311. SAMP.IsCommandTyped(0@)
  312. say "/checkcontract %s" 0@
  313. SAMP.CmdRet()
  314.  
  315. :gethit
  316. say "/gethit"
  317. SAMP.CmdRet()
  318.  
  319. :order1
  320. say "/order 1"
  321. SAMP.CmdRet()
  322.  
  323.  
  324. :find
  325. SAMP.IsCommandTyped(0@)
  326. 0ab1: call @find_target 1 0@ | 15@
  327. say "/find %s" 0@
  328. if SAMP.IsPlayerConnected(15@)
  329. then
  330. say "/id %d" 15@
  331. end
  332. SAMP.CmdRet()
  333.  
  334. :deletePhone
  335. if 0C5D: samp textdraw 155 is_exists
  336. then
  337. 0C5E: samp textdraw 155 delete
  338. end
  339. return
  340.  
  341. :setVars
  342. 4@ = 1
  343. 6@ = 0
  344. 32@ = 0
  345. 0C5E: samp textdraw 500 delete
  346. 0C5E: samp textdraw 600 delete
  347. 0C5E: samp textdraw 700 delete
  348. return
  349.  
  350.  
  351. :target_chat
  352. 0BE5: raknet 31@ = get_hook_param PARAM_PACKETID
  353. if 31@ == RPC_ScrClientMessage
  354. then
  355. 0C11: memset destination 29@ value 0 size 256
  356.  
  357. 0BE5: raknet 31@ = get_hook_param PARAM_BITSTREAM
  358. 0BE7: raknet 30@ = bit_stream_read 31@ type BS_TYPE_INT //color
  359. 0BE7: raknet 30@ = bit_stream_read 31@ type BS_TYPE_INT //lenght
  360. 0BE8: raknet bit_stream 31@ read_array 29@ size 30@ //string
  361. 0C0D: struct 29@ offset 30@ size 1 = 0
  362.  
  363. if 0C29: -1 = stristr string1 29@ string2 "You have a new contract"
  364. then
  365. 6@ = 1
  366. 14@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
  367. say "/id %d" 14@
  368. 17@ = 1
  369. 0af0: 10@ = get_int_from_ini_file "cleo\targetfind3r.ini" section "target" key "mode"
  370. 0BFC: set_global_var "TARGETMODE" = 10@
  371. if 10@ == 1
  372. then
  373. 041A: 10@ = actor $PLAYER_ACTOR weapon 34 ammo
  374. chatmsg "You have a new contract (/myctc). >Sniper ammo {eb541e}(%d)" -256 10@
  375. 0BE0: raknet hook_ret false
  376. end
  377. end
  378.  
  379. if 0C29: -1 = stristr string1 29@ string2 "| Faction:"
  380. then
  381. if 17@ == 1
  382. then
  383. 0AA5: call 0x8220AD num_params 3 pop 3 14@v "%*[^|]|%*[^|]|%*[^:]: %*[^(] (rank %d)|%*[^|]| %*s: %*d" 29@
  384. 17@ = 0
  385. 0BE0: raknet hook_ret false
  386. end
  387. end
  388.  
  389. if or
  390. 0C29: -1 = stristr string1 29@ string2 "has succesfully completed the contract"
  391. 0C29: -1 = stristr string1 29@ string2 "failed to complete the contract"
  392. then
  393. if 6@ == 1
  394. then
  395. alloc 28@ 50
  396. alloc 26@ 50
  397. 0C11: memset destination 26@ value 0 size 50
  398. 0AA5: call 0x8220AD num_params 3 pop 3 28@ "%s" 29@
  399. 27@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
  400. 27@ = SAMP.GetPlayerNickname(27@)
  401. 25@ = SAMP.GetPlayerNickname(15@)
  402. if or
  403. 0C29: -1 = stristr string1 29@ string2 25@
  404. 0C29: -1 = stristr string1 28@ string2 27@
  405. then
  406. gosub @setVars
  407. end
  408. free 28@
  409. free 26@
  410. end
  411. end
  412.  
  413. if and
  414. 0C29: -1 = stristr string1 29@ string2 "minute dupa ce ai anulat/terminat"
  415. 0C29: -1 = stristr string1 29@ string2 "folosi /gethit"
  416. then
  417. if 4@ == 1
  418. then
  419. if 5@ == 0
  420. then
  421. chatmsg "Trebuie sa astepti 00:%02d secunde dupa ce ai anulat/terminat un contract pentru a folosi /gethit." -3215188 7@
  422. else
  423. chatmsg "Trebuie sa astepti %02d:%02d minute dupa ce ai anulat/terminat un contract pentru a folosi /gethit." -3215188 5@ 7@
  424. end
  425. 0BE0: raknet hook_ret false
  426. end
  427. else
  428. if and
  429. 0C29: -1 = stristr string1 29@ string2 "after canceling/completing"
  430. 0C29: -1 = stristr string1 29@ string2 "before you can use /gethit."
  431. then
  432. if 4@ == 1
  433. then
  434. if 5@ == 0
  435. then
  436. chatmsg "You need to wait 00:%02d seconds after canceling/completing a contract before you can use /gethit." -3215188 7@
  437. else
  438. chatmsg "You need to wait %02d:%02d minutes after canceling/completing a contract before you can use /gethit." -3215188 5@ 7@
  439. end
  440. 0BE0: raknet hook_ret false
  441. end
  442. end
  443. end
  444. if and
  445. 0C29: -1 = stristr string1 29@ string2 "30-90 minute in"
  446. 0C29: -1 = stristr string1 29@ string2 "pentru DM!"
  447. then
  448. if and
  449. 6@ == 1
  450. 02D8: actor $PLAYER_ACTOR current_weapon == 34
  451. then
  452. 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 34
  453. end
  454. else
  455. if and
  456. 0C29: -1 = stristr string1 29@ string2 "can spend 30-90 minutes"
  457. 0C29: -1 = stristr string1 29@ string2 "in jail for DM!"
  458. then
  459. if and
  460. 6@ == 1
  461. 02D8: actor $PLAYER_ACTOR current_weapon == 34
  462. then
  463. 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 34
  464. end
  465. end
  466. end
  467.  
  468. end
  469. 0BE0: raknet hook_ret true
  470.  
  471. :find_target
  472. 0C2F: 27@ = strtol 0@ radix 10 store_end_to 28@
  473. 0C17: 26@ = strlen 28@
  474. if 26@ >= 1
  475. then
  476. for 31@ = 0 to 1000
  477. 30@ = SAMP.GetPlayerNickname(31@)
  478. if and
  479. SAMP.IsPlayerConnected(31@)
  480. 0C29: -1 = stristr string1 30@ string2 28@
  481. then
  482. 29@ = 1
  483. ret 1 31@
  484. break
  485. else
  486. 29@ = 2
  487. end
  488. end
  489. end
  490.  
  491. if and
  492. 29@ == 0
  493. SAMP.IsPlayerConnected(27@)
  494. then
  495. ret 1 27@
  496. end
  497.  
  498. if 29@ == 2
  499. then
  500. ret 1 -1
  501. end
  502.  
  503. ret 1 -1
  504.  
  505. :target_status
  506. alloc 27@ 128
  507. 0C11: memset destination 27@ value 0 size 128
  508. if 044B: actor 0@ on_foot
  509. then
  510. format 27@ "Status: ~y~ON FOOT"
  511. if 8C5D: samp textdraw 700 is_exists
  512. then
  513. 0ab1: call @txd_700 1 27@
  514. else
  515. 0C50: samp textdraw 700 set_string 27@
  516. end
  517. else
  518. if 0965: actor 0@ swimming
  519. then
  520. format 27@ "Status: ~y~SWIMMING"
  521.  
  522. if 8C5D: samp textdraw 700 is_exists
  523. then
  524. 0ab1: call @txd_700 1 27@
  525. else
  526. 0C50: samp textdraw 700 set_string 27@
  527. end
  528. else
  529. if Actor.Driving(0@)
  530. then
  531.  
  532. alloc 25@ 50
  533. 31@ = Actor.CurrentCar(0@)
  534. 046C: 30@ = car 31@ driver
  535. 01EA: 29@ = car 31@ max_passengers
  536. 0441: 26@ = car 31@ model
  537. 0ADB: 25@ = car_model 26@ name
  538. 0ADE: 25@ = text_by_GXT_entry 25@
  539. if 003B: 30@ == 0@
  540. then
  541. //chatmsg "Driver" -1
  542. format 27@ "Status: ~y~DRIVER~n~~w~Car: ~y~%s" 25@
  543. if 8C5D: samp textdraw 700 is_exists
  544. then
  545. 0ab1: call @txd_700 1 27@
  546. else
  547. 0C50: samp textdraw 700 set_string 27@
  548. end
  549. else
  550. for 28@ = 0 to 29@
  551. 0432: 24@ = get_actor_handle_from_car 31@ passenger_seat 28@
  552. if 003b: 24@ == 0@
  553. then
  554. 28@ += 1
  555. format 27@ "Status: ~y~PASSENGER~n~~w~Seat: ~y~%d~n~~w~Car: ~y~%s" 28@ 25@
  556. break
  557. end
  558. 24@ = 0
  559. end
  560. if 8C5D: samp textdraw 700 is_exists
  561. then
  562. 0ab1: call @txd_700 1 27@
  563. else
  564. 0C50: samp textdraw 700 set_string 27@
  565. end
  566. //chatmsg "Passenger" -1
  567. end
  568. free 25@
  569. else
  570. 23@ = Actor.Health(0@)
  571.  
  572. if 23@ <= 0
  573. then
  574. format 27@ "Status: ~r~DEAD"
  575. if 8C5D: samp textdraw 700 is_exists
  576. then
  577. 0ab1: call @txd_700 1 27@
  578. else
  579. 0C50: samp textdraw 700 set_string 27@
  580. end
  581. end
  582.  
  583. end
  584. end
  585. end
  586.  
  587. free 27@
  588. ret 0
  589.  
  590. :txd_700
  591. 0C48: samp textdraw 700 create 0@ pos 635.0 300.0
  592. 0C4E: samp textdraw 700 set_outline 1 color 0xFF000000
  593. 0C4A: samp textdraw 700 set_align 3
  594. 0C4B: samp textdraw 700 set_proportional true
  595. ret 0
  596.  
  597. :target
  598. Actor.StorePos(0@, 31@, 30@, 29@)
  599. Actor.StorePos($PLAYER_ACTOR, 28@, 27@, 26@)
  600. if and
  601. 02CB: actor 0@ bounding_sphere_visible
  602. 06BD: no_obstacles_between 31@ 30@ 29@ and 28@ 27@ 26@ solid 1 car 0 actor 0 object 0 particle 0
  603. then
  604. 0A96: 15@ = actor 0@ struct
  605.  
  606. 0AC7: 16@ = var 16@ offset
  607. 0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 26 16@ // 16@ 17@ 18@ x y z
  608. 0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
  609. 0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 19@ 20@ // 22
  610.  
  611. 0AC7: 16@ = var 16@ offset
  612. 0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 34 16@ // 16@ 17@ 18@ x y z
  613. 0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
  614. 0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 16@ 17@ // 32
  615.  
  616. 0509: 21@ = distance_between_XY 16@ 17@ 19@ 20@ //21@ - WIGHT
  617.  
  618. 0AC7: 16@ = var 16@ offset
  619. 0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 54 16@ // 16@ 17@ 18@ x y z
  620. 0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
  621. 0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 19@ 20@ // 22
  622.  
  623. 0AC7: 16@ = var 16@ offset
  624. 0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 6 16@ // 16@ 17@ 18@ x y z
  625. 0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
  626. 0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 16@ 17@ // 32
  627.  
  628. 0509: 22@ = distance_between_XY 16@ 17@ 19@ 20@ //22@ - HEIGHT
  629.  
  630. 0AC7: 16@ = var 16@ offset
  631. 0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 3 16@ // 16@ 17@ 18@ x y z
  632. 0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
  633. 0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 16@ 17@ // 32
  634. {16@ 17@ 21@ 22@}
  635. 0B5E: get_cursor_pos 5@ 4@
  636.  
  637. 16@ -= 320.0
  638. 17@ -= 224.0
  639. 0097: make 16@ absolute_float
  640. 0097: make 17@ absolute_float
  641. 21@ /= 2.0
  642. 22@ /= 2.0
  643.  
  644.  
  645. if and
  646. 8035: 16@ <= 21@
  647. 8035: 17@ <= 22@
  648. then
  649. ret_t
  650. else
  651. ret_f
  652. end
  653. else
  654. ret_f
  655. end
  656. ret 0
  657.  
  658. :timer
  659. var
  660. 31@ : integer
  661. 0@ : integer
  662. end
  663.  
  664. 31@ = 60000
  665. 31@ -= 0@
  666.  
  667. 31@ /= 1000
  668.  
  669. ret 1 31@
  670.  
  671. :setDistanceTD {0@ - pHandle | 1@ - mRank | 2@ - mode}
  672. var
  673. 20@ : integer
  674. end
  675.  
  676. alloc 31@ 128
  677. for 17@ = 2050 to 2090 //search /find textdraw
  678. if 0C5D: samp textdraw 17@ is_exists
  679. then
  680. 0C11: memset destination 31@ value 0 size 128
  681. 0C5A: samp textdraw 17@ get_string_to 31@
  682. if 0C29: -1 = stristr string1 31@ string2 "~w~Target: ~r~"
  683. then
  684. 15@ = 1 //true
  685. break
  686. end
  687. end
  688. end
  689.  
  690. if 15@ == 1
  691. then
  692. alloc 30@ 50 //nickname
  693. alloc 27@ 50 //location
  694. alloc 19@ 128 //string for changed textdraw
  695. 0AA5: call 0x8220AD num_params 5 pop 5 params 27@ 29@v 30@ "~w~Target: ~r~%[^~]~w~(%d)~n~Distance: ~%*[^~]~%*dm ~w~(%[^)])" 31@
  696. if 18@ = SAMP.GetActorHandleByPlayerID(0@)
  697. then
  698. Actor.StorePos(18@, 26@, 25@, 24@)
  699. else
  700. if 0ab1: call @cp_exist 0
  701. then
  702. 0ab1: call @getPos 0 26@ 25@ 24@
  703. else
  704. 0ab1: call @getIniPos 0 26@ 25@ 24@
  705. end
  706. end
  707. Actor.StorePos($PLAYER_ACTOR, 23@, 22@, 21@)
  708. 050A: 28@ = distance_between_XYZ 26@ 25@ 24@ and_XYZ 23@ 22@ 21@
  709. 0092: 28@ = float 28@ to_integer
  710.  
  711. if and
  712. 02D8: actor $PLAYER_ACTOR current_weapon == 34
  713. 2@ == 1 //mode
  714. then
  715. format 10@s "rank%d" 1@
  716. 0AF0: 20@ = get_int_from_ini_file "cleo\targetfind3r.ini" section "distance" key 10@s
  717.  
  718. if and
  719. 28@ < 20@
  720. 1@ == 1
  721. then
  722. format 19@ "~w~Target: ~r~%s~w~(%d)~n~Distance: ~p~%dm ~w~(%s)" 30@ 29@ 28@ 27@
  723. 16@ = 1
  724. end
  725.  
  726. if and
  727. 28@ < 20@
  728. 1@ == 2
  729. then
  730. format 19@ "~w~Target: ~r~%s~w~(%d)~n~Distance: ~p~%dm ~w~(%s)" 30@ 29@ 28@ 27@
  731. 16@ = 1
  732. end
  733.  
  734. if and
  735. 28@ < 20@
  736. 1@ == 3
  737. then
  738. format 19@ "~w~Target: ~r~%s~w~(%d)~n~Distance: ~p~%dm ~w~(%s)" 30@ 29@ 28@ 27@
  739. 16@ = 1
  740. end
  741.  
  742. if and
  743. 28@ < 20@
  744. 1@ == 4
  745. then
  746. format 19@ "~w~Target: ~r~%s~w~(%d)~n~Distance: ~p~%dm ~w~(%s)" 30@ 29@ 28@ 27@
  747. 16@ = 1
  748. end
  749.  
  750. if and
  751. 28@ < 20@
  752. 1@ == 5
  753. then
  754. format 19@ "~w~Target: ~r~%s~w~(%d)~n~Distance: ~p~%dm ~w~(%s)" 30@ 29@ 28@ 27@
  755. 16@ = 1
  756. end
  757.  
  758. end
  759.  
  760. if 16@ == 0
  761. then
  762. format 19@ "~w~Target: ~r~%s~w~(%d)~n~Distance: ~r~%dm ~w~(%s)" 30@ 29@ 28@ 27@
  763. end
  764.  
  765. 0C50: samp textdraw 17@ set_string 19@
  766.  
  767.  
  768. free 30@
  769. free 27@
  770. free 19@
  771. end
  772. free 31@
  773.  
  774.  
  775. ret 0
  776.  
  777. :sniper_csh
  778. 0@ = 12
  779. 0@ += 12006488
  780. 0A8C: write_memory 0@ size 2 value 128 virtual_protect 0
  781. ret 0
  782.  
  783. :setPos
  784. if 1@ = SAMP.GetActorHandleByPlayerID(0@)
  785. then
  786. Actor.StorePos(1@, 4@, 5@, 6@)
  787. 0BB2: samp 3@ = get_misc_info_ptr
  788. 3@ += 12
  789. 0A8C: write_memory 3@ size 4 value 4@ virtual_protect 0
  790. 3@ += 4
  791. 0A8C: write_memory 3@ size 4 value 5@ virtual_protect 0
  792. 3@ += 4
  793. 0A8C: write_memory 3@ size 4 value 6@ virtual_protect 0
  794. end
  795. ret 0
  796.  
  797. :getIniPos
  798. 0AF2: 31@ = get_float_from_ini_file "cleo\targetfind3r.ini" section "cp" key "x"
  799. 0AF2: 30@ = get_float_from_ini_file "cleo\targetfind3r.ini" section "cp" key "y"
  800. 0AF2: 29@ = get_float_from_ini_file "cleo\targetfind3r.ini" section "cp" key "z"
  801. ret 3 31@ 30@ 29@
  802.  
  803. :getPos
  804. 0BB2: samp 3@ = get_misc_info_ptr
  805. 3@ += 12
  806. 0A8D: 31@ = read_memory 3@ size 4 virtual_protect 0
  807. 3@ += 4
  808. 0A8D: 30@ = read_memory 3@ size 4 virtual_protect 0
  809. 3@ += 4
  810. 0A8D: 29@ = read_memory 3@ size 4 virtual_protect 0
  811. 0AF3: write_float 31@ to_ini_file "cleo\targetfind3r.ini" section "cp" key "x"
  812. 0AF3: write_float 30@ to_ini_file "cleo\targetfind3r.ini" section "cp" key "y"
  813. 0AF3: write_float 29@ to_ini_file "cleo\targetfind3r.ini" section "cp" key "z"
  814. ret 3 31@ 30@ 29@
  815.  
  816.  
  817. :setSize
  818. 0BB2: samp 3@ = get_misc_info_ptr
  819. 3@ += 24
  820. 0A8C: write_memory 3@ size 4 value 1.0 virtual_protect 0
  821. 3@ += 4
  822. 0A8C: write_memory 3@ size 4 value 1.0 virtual_protect 0
  823. 3@ += 4
  824. 0A8C: write_memory 3@ size 4 value 1.0 virtual_protect 0
  825. ret 0
  826.  
  827. :cp_exist
  828. 0BB2: samp 3@ = get_misc_info_ptr
  829. 3@ += 36
  830. 0A8D: 4@ = read_memory 3@ size 4 virtual_protect 0
  831. if 4@ == true
  832. then
  833. ret_t
  834. else
  835. ret_f
  836. end
  837. ret 0
  838.  
  839. :menu_find3r
  840. 0000:
  841. 15@ = 1
  842.  
  843. while true
  844. wait 0
  845.  
  846. if 15@ == 1
  847. then
  848. 0b34: "target" @show_menu
  849. 3@ = 1
  850. alloc 0@ 128
  851. alloc 4@ 50
  852. alloc 5@ 128
  853. alloc 6@ 128
  854. alloc 13@ 50
  855. 15@ = 0
  856. end
  857.  
  858. if SAMP.DialogRespond(1255, 1@, 2@, 0)
  859. then
  860. if 12@ == 1
  861. then
  862. 0ab1: call @menu_list 1 10@
  863. end
  864.  
  865. if 1@ == 1
  866. then
  867.  
  868. 2@ += 1
  869. if 2@ == 1
  870. then
  871. 0AC6: 11@ = label @target_help offset
  872. SAMP.ShowDialog(1300, "Help", 11@, "Back", "", 0)
  873. end
  874.  
  875. if 2@ == 2
  876. then
  877. 0B12: 10@ = 10@ XOR 1
  878. 0ab1: call @menu_list 1 10@
  879. 0AF1: write_int 10@ to_ini_file "cleo\targetfind3r.ini" section "target" key "mode"
  880. 0BFC: set_global_var "TARGETMODE" = 10@
  881. 0B49: samp set_current_dialog_list_item 1
  882. end
  883.  
  884. if 2@ == 3
  885. then
  886. 0ab1: call @menu_list 1 10@
  887. 0B49: samp set_current_dialog_list_item 2
  888. end
  889.  
  890. if 2@ == 4
  891. then
  892. if not 3@ == 2
  893. then
  894. 14@ = 1
  895. else
  896. SAMP.CloseDialog(0)
  897. end
  898. end
  899. else
  900. SAMP.CloseDialog(0)
  901. end
  902. end
  903.  
  904. if SAMP.DialogRespond(1300, 12@, 0, 0)
  905. then
  906. if 12@ == 1
  907. then
  908. 0ab1: call @menu_list 1 10@
  909. end
  910. end
  911.  
  912. if or
  913. 14@ == 1
  914. 3@ == 1
  915. then
  916. if 0B61: samp is_local_player_spawned
  917. then
  918. if SAMP.IsDialogActive(1255)
  919. then
  920. SAMP.CloseDialog(0)
  921. end
  922.  
  923. 0C11: memset destination 4@ value 0 size 50
  924. 0C11: memset destination 5@ value 0 size 128
  925. 0C11: memset destination 6@ value 0 size 128
  926.  
  927. 0AF4: 4@ = read_string_from_ini_file "cleo\targetfind3r.ini" section "target" key "ver"
  928.  
  929.  
  930. format 5@ "CLEO/find3r.ini"
  931. format 6@ "https:%c/github.com/JaggerJam69/TargetFind3r/raw/master/find3r.ini" 47
  932.  
  933. 0C65: 7@ = download_url 6@ to_file 5@
  934. 0ab1: call @check_download 1 7@ | 8@
  935. 0C7D: release_download 7@
  936.  
  937. if 8@ <> 0
  938. then
  939. chatmsg "{%x}[{%x}TargetFind{%x}3{%x}r{%x}] {%x}Version check failed: {%x}%p" -1 __YLW __RED __GRN __RED __YLW __WHT __BLU 8@
  940. else
  941. 0C11: memset destination 13@ value 0 size 50
  942. 0AF4: 13@ = read_string_from_ini_file "CLEO\find3r.ini" section "Target" key "ver"
  943.  
  944. if 8c14: 4@ 13@
  945. then
  946. 0C11: memset destination 6@ value 0 size 128
  947. format 6@ "{%x}O versiune noua este disponibila >TargetFind3r ver. {%x}%s%c{%x}Doresti sa o instalezi?" __WHT __RED 13@ 0xA __BLU
  948. SAMP.ShowDialog(1228, "{f1b71b}!!! {aaec3f}Update ready {f1b71b}!!!", 6@, "Da", "Nu", 0)
  949. else
  950.  
  951. if 14@ == 1
  952. then
  953. chatmsg "{%x}[{%x}TargetFind{%x}3{%x}r{%x}] {%x}Detii cea mai recenta versiune: {%x}v%s" -1 __YLW __RED __GRN __RED __YLW __WHT __BLU 4@
  954. end
  955.  
  956. end
  957. end
  958. 14@ = 0
  959. 3@ = 0
  960. 0B00: delete_file "CLEO\find3r.ini"
  961. end
  962. end
  963.  
  964. if SAMP.DialogRespond(1228, 1@, 0, 0)
  965. then
  966. if 1@ == 1
  967. then
  968. 0C11: memset destination 5@ value 0 size 128
  969. 0C11: memset destination 6@ value 0 size 128
  970.  
  971. format 5@ "CLEO/TargetFind3r.cs"
  972. format 6@ "https:%c/github.com/JaggerJam69/TargetFind3r/raw/master/TargetFind3r.cs" 47
  973.  
  974. 0C65: 7@ = download_url 6@ to_file 5@
  975. 0ab1: call @check_download 1 7@ | 8@
  976. 0C7D: release_download 7@
  977.  
  978. format 5@ "CLEO/target_log.txt"
  979. format 6@ "https:%c/github.com/JaggerJam69/TargetFind3r/raw/master/target_log.txt" 47
  980.  
  981. 0C65: 7@ = download_url 6@ to_file 5@
  982. 0ab1: call @check_download 1 7@ | 9@
  983. 0C7D: release_download 7@
  984.  
  985. if 8@ <> 0
  986. then
  987. chatmsg "{%x}[{%x}TargetFind{%x}3{%x}r{%x}] {%x}Download failed: {%x}%p" -1 __YLW __RED __GRN __RED __YLW __WHT __BLU 8@
  988. else
  989. if 9@ <> 0
  990. then
  991. chatmsg "{%x}[{%x}TargetFind{%x}3{%x}r{%x}] {%x}Changelog download failed: {%x}%p" -1 __YLW __RED __GRN __RED __YLW __WHT __BLU 9@
  992. else
  993. 0ab1: call @changelog 0
  994. end
  995. chatmsg "{%x}[{%x}TargetFind{%x}3{%x}r{%x}] {%x}Noua versiune a fost instalata cu succes! Este necesar un restart." -1 __YLW __RED __GRN __RED __YLW __WHT
  996.  
  997. 0AF5: write_string 13@ to_ini_file "cleo\targetfind3r.ini" section "target" key "ver"
  998. 3@ = 2
  999. end
  1000. end
  1001. end
  1002.  
  1003. END
  1004.  
  1005. :check_download
  1006. 1@ = -1
  1007. while 1@ == -1
  1008. wait 0
  1009. 0C66: 1@ = get_download 0@ state
  1010. end
  1011. ret 1 1@
  1012.  
  1013. :changelog
  1014. if 0A9A: 0@ = openfile "CLEO\target_log.txt" mode "rt"
  1015. then
  1016. alloc 1@ 129
  1017. 0C11: memset destination 1@ value 0 size 129
  1018.  
  1019. 0A9C: 2@ = file 0@ size
  1020.  
  1021. 2@ += 1
  1022.  
  1023. alloc 4@ 2@
  1024. 0C11: memset destination 4@ value 0 size 2@
  1025.  
  1026. repeat
  1027. 0AD7: read_string_from_file 0@ to 1@ size 128
  1028. 0C17: 3@ = strlen 1@
  1029.  
  1030. if 3@ > 0
  1031. then
  1032. 0C15: strcat destination 4@ source 1@
  1033. end
  1034.  
  1035. 0C11: memset destination 1@ value 0 size 129
  1036. until 0AD6: end_of_file 0@ reached
  1037.  
  1038. SAMP.ShowDialog(1229, "{660200}›› {CE1924}Changelog TargetFind3r", 4@, "OK", "", 0)
  1039.  
  1040.  
  1041. free 4@
  1042. free 1@
  1043. 0A9B: closefile 0@
  1044. 0B00: delete_file "CLEO\target_log.txt"
  1045. end
  1046. 0AB2: ret 0
  1047.  
  1048. :show_menu
  1049. 0AF0: 10@ = get_int_from_ini_file "cleo\targetfind3r.ini" section "target" key "mode"
  1050. 0ab1: call @menu_list 1 10@
  1051. SAMP.CmdRet()
  1052.  
  1053. :menu_list
  1054. alloc 31@ 128
  1055. alloc 30@ 50
  1056. 0C11: memset destination 31@ value 0 size 128
  1057. 0C11: memset destination 30@ value 0 size 50
  1058. if 0@ == 0
  1059. then
  1060. format 31@ "›Help%c›Set mode: %s%c{660200}----------------------%c{FFC726}›Check for updates!" 0xA "{660200}Only skin" 0xA 0xA
  1061. else
  1062. format 31@ "›Help%c›Set mode: %s%c{660200}----------------------%c{FFC726}›Check for updates!" 0xA "{48EB12}All info" 0xA 0xA
  1063. end
  1064. 0AF4: 30@ = read_string_from_ini_file "cleo\targetfind3r.ini" section "target" key "ver"
  1065. alloc 29@ 128
  1066. format 29@ "{%x}TargetFind{%x}3{%x}r {%x}by Kristyann {%x}| {%x}ver. %s" __RED __GRN __RED __WHT __YLW __DRD 30@
  1067. SAMP.ShowDialog(1255, 29@, 31@, "Select", "Close", 2)
  1068. free 29@
  1069. free 31@
  1070. free 30@
  1071. ret 0
  1072.  
  1073.  
  1074.  
  1075. :target_help
  1076. hex
  1077. "{660200}›› {CE1924}Activare" 0A
  1078. 20 20 20"{FAFAFA}Majoritatea functiilor se activeaza odata ce detii un contract si daca ai {FFC726}[/find] {FAFAFA}pe victima." 0A
  1079. 20 "{33B9FB}*Alte comenzii speciale nu sunt!" 0A 0A
  1080.  
  1081. "{660200}›› {CE1924}Taste rapide/Comenzi:" 0A
  1082. 20 20 20 "{FFC726}Scope ON + R {48EB12}- {FAFAFA}deschide chat-ul atat timp cat ai scope ON;" 0A
  1083. 20 20 20 "{33B9FB}[/myctc] {48EB12}- {33B9FB}[/mycontract];" 0A
  1084. 20 20 20 "{33B9FB}[/chit] {48EB12}- {33B9FB}[/cancelhit];" 0A
  1085. 20 20 20 "{33B9FB}[/ghit] {48EB12}- {33B9FB}[/gethit];" 0A 0A
  1086. 20 20 20 "{33B9FB}[/under] {48EB12}- {33B9FB}[/undercover];" 0A
  1087. 20 20 20 "{33B9FB}[/o1] {48EB12}- {33B9FB}[/order 1];" 0A
  1088. 20 20 20 "{33B9FB}[/kp] {48EB12}- {33B9FB}[/killcp];" 0A
  1089.  
  1090. "{FFC726}• {CE1924}Checkpoint-ul si distanta pana la victima" 0A
  1091. 20 20 20 "{33B9FB}- {FAFAFA}Odata ce se pune scope-ul checkpoint-ul se micsoreaza" 0A
  1092. 20 20 20 "{33B9FB}- {FAFAFA}Se afiseaza distanta exacta direct in textdraw-ul de la [/find]" 0A
  1093. 20 20 20 "{33B9FB}- {FAFAFA}Checkpoint-ul se misca impreuna cu jucatorul fara lag, atat timp cat va aflati langa el" 0A 0A
  1094.  
  1095. "{FFC726}• {CE1924}Contract-Timer" 0A
  1096. 20 20 20 "{FAFAFA}Afiseaza delay-ul pentru {FFC726}[/gethit]{FAFAFA}, dupa ce ai completat / luat fail / dat [/cancelhit] la contract" 00
  1097. end
  1098.  
  1099. goto @menu_find3r
  1100.  
  1101. /*
  1102. const
  1103. __RED = 0xCE1924
  1104. __DRD = 0x660200
  1105. __GRN = 0x48EB12
  1106. __YLW = 0xFFC726
  1107. __BLU = 0x33B9FB
  1108. __WHT = 0xFAFAFA
  1109. end */
  1110.  
  1111. :restart
  1112. 0A92: create_custom_thread "TargetFind3r.cs"
  1113. 0A93: end_custom_thread
  1114. SAMP.CmdRet()
  1115.  
Add Comment
Please, Sign In to add comment