Advertisement
michalmonday

shootingIndicator (samp 0.3.7)

Aug 6th, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.99 KB | None | 0 0
  1. {$CLEO .cs}
  2. 0000: NOP
  3. repeat
  4. wait 50
  5. until 0AFA: is_samp_structures_available
  6. 0AF8: samp add_message_to_chat "{F7F694}shootingIndicator mod. Use {FF4800}/sihelp {F7F694}to see commands"
  7. 0B34: samp register_client_command "si" to_label @sitog
  8. 0B34: samp register_client_command "sihelp" to_label @sihelp
  9. 0B34: samp register_client_command "sipos" to_label @sipos
  10. 0B34: samp register_client_command "sisize" to_label @sisize
  11.  
  12. 0AC8: 10@ = allocate_memory_size 260
  13. 0AC8: 9@ = allocate_memory_size 260
  14. 0AC8: 8@ = allocate_memory_size 260
  15. 0AC8: 7@ = allocate_memory_size 260
  16. 0AC8: 6@ = allocate_memory_size 260
  17. 0AC8: 5@ = allocate_memory_size 260
  18. 0AC8: 4@ = allocate_memory_size 260
  19. 0AC8: 3@ = allocate_memory_size 260
  20. 0390: load_txd_dictionary 'wpn'
  21. 038F: load_texture "upr" as 1 //ak
  22. 038F: load_texture "upl" as 2
  23. 038F: load_texture "up" as 3
  24. 038F: load_texture "triang" as 4
  25. 038F: load_texture "square" as 5
  26. 038F: load_texture "right" as 6
  27. 038F: load_texture "left" as 7
  28. 038F: load_texture "downr" as 8
  29. 038F: load_texture "downl" as 9
  30. 038F: load_texture "down" as 10
  31. 038F: load_texture "cross" as 11
  32. 038F: load_texture "cring" as 12
  33. 038F: load_texture "circle" as 13
  34. 038F: load_texture "chit" as 14
  35. 13@ = 0
  36. 33@ = 0
  37.  
  38. const
  39. FONT = 31@
  40. ARRAY = 11@
  41. /*
  42. int shooterColor
  43. int victimColor
  44. int weaponNum
  45. */
  46. CLR_SHOOT_BUFF = 12@
  47. CLR_VICT_BUFF = 21@
  48. WEP_BUFF = 17@
  49. POS_X = 14@
  50. POS_Y = 15@
  51. POS_Y_BUFF = 18@
  52. FONT_SIZE = 19@
  53. SWITCH = 27@
  54. STR_FONT_NAME = 20@
  55. TOG_ADJUST_MODE_SIZE = 22@
  56. TOG_ADJUST_MODE_POS = 23@
  57. DISPLAY_OFFSET_Y = 24@
  58.  
  59.  
  60. //free vars: 18@ 19@ 20@ 22@ 23@ 24@ 25@ 26@ 30@
  61. end
  62.  
  63. alloc ARRAY 128
  64. alloc STR_FONT_NAME 64
  65.  
  66. if 0AAB: file_exists "CLEO\shootingIndicatorSettings.ini"
  67. then
  68. 0AF0: POS_X = get_int_from_ini_file "CLEO\shootingIndicatorSettings.ini" section "Settings" key "x"
  69. 0AF0: POS_Y = get_int_from_ini_file "CLEO\shootingIndicatorSettings.ini" section "Settings" key "y"
  70. 0AF0: FONT_SIZE = get_int_from_ini_file "CLEO\shootingIndicatorSettings.ini" section "Settings" key "font_size"
  71. 0AF0: SWITCH = get_int_from_ini_file "CLEO\shootingIndicatorSettings.ini" section "Settings" key "switch"
  72. 0AF4: STR_FONT_NAME = read_string_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "font_name"
  73.  
  74. 0085: DISPLAY_OFFSET_Y = FONT_SIZE // (int
  75. 0012: DISPLAY_OFFSET_Y *= 4
  76. //0016: DISPLAY_OFFSET_Y /= 7
  77. end
  78.  
  79. 0B6D: render FONT = create STR_FONT_NAME height FONT_SIZE flags 5
  80.  
  81. :First
  82. wait 0
  83. //variables for colors: 11@ 12@ 21@ 22@ 23@ 24@ 25@ 26@
  84. //switcher 27@
  85. //free 31@
  86. // 28@ = spam indicator
  87. if SWITCH == 1
  88. jf @First
  89.  
  90. if TOG_ADJUST_MODE_SIZE == 1
  91. then
  92. if 0AB1: @Adjust_Font_Size 1 FONT_SIZE _ret FONT_SIZE
  93. then
  94. 0085: DISPLAY_OFFSET_Y = FONT_SIZE // (int
  95. 0012: DISPLAY_OFFSET_Y *= 4
  96. //0016: DISPLAY_OFFSET_Y /= 7
  97. 0AB1: @ReloadFont 4 FONT STR_FONT_NAME FONT_SIZE 5 _retFont FONT
  98. wait 100
  99. end
  100. end
  101.  
  102. if TOG_ADJUST_MODE_POS == 1
  103. then
  104. 0AB1: @Position 2 POS_X POS_Y _return POS_X POS_Y
  105. end
  106.  
  107.  
  108. if 0029: 13@ >= 1
  109. then
  110. 0085: POS_Y_BUFF = POS_Y // (int)
  111.  
  112. 0AB1: @IntArray_Read 2 ARRAY 1 _returned CLR_SHOOT_BUFF
  113. 0AB1: @IntArray_Read 2 ARRAY 2 _returned CLR_VICT_BUFF
  114. 0AB1: @IntArray_Read 2 ARRAY 3 _returned WEP_BUFF
  115. if 28@ == 1
  116. then
  117. 28@ = 0
  118. 0AB1: call_scm_func @DrawText 9 shooterName 3@ victimName 4@ POS_X POS_Y_BUFF weaponImage WEP_BUFF shooterColor 0xF21C00 victimColor 0xF21C00 FONT DISPLAY_OFFSET_Y
  119. else
  120. 0AB1: call_scm_func @DrawText 9 shooterName 3@ victimName 4@ POS_X POS_Y_BUFF weaponImage WEP_BUFF shooterColor CLR_SHOOT_BUFF victimColor CLR_VICT_BUFF FONT DISPLAY_OFFSET_Y
  121. end
  122. 005A: POS_Y_BUFF += DISPLAY_OFFSET_Y // (int)
  123. end
  124.  
  125.  
  126. if 0029: 13@ >= 2
  127. then
  128. 0AB1: @IntArray_Read 2 ARRAY 4 _returned CLR_SHOOT_BUFF
  129. 0AB1: @IntArray_Read 2 ARRAY 5 _returned CLR_VICT_BUFF
  130. 0AB1: @IntArray_Read 2 ARRAY 6 _returned WEP_BUFF
  131. if 28@ == 2
  132. then
  133. 28@ = 0
  134. 0AB1: call_scm_func @DrawText 9 shooterName 5@ victimName 6@ POS_X POS_Y_BUFF weaponImage WEP_BUFF shooterColor 0xF21C00 victimColor 0xF21C00 FONT DISPLAY_OFFSET_Y
  135. else
  136. 0AB1: call_scm_func @DrawText 9 shooterName 5@ victimName 6@ POS_X POS_Y_BUFF weaponImage WEP_BUFF shooterColor CLR_SHOOT_BUFF victimColor CLR_VICT_BUFF FONT DISPLAY_OFFSET_Y
  137. end
  138. 005A: POS_Y_BUFF += DISPLAY_OFFSET_Y // (int)
  139. end
  140.  
  141.  
  142. if 0029: 13@ >= 3
  143. then
  144. 0AB1: @IntArray_Read 2 ARRAY 7 _returned CLR_SHOOT_BUFF
  145. 0AB1: @IntArray_Read 2 ARRAY 8 _returned CLR_VICT_BUFF
  146. 0AB1: @IntArray_Read 2 ARRAY 9 _returned WEP_BUFF
  147. if 28@ == 3
  148. then
  149. 28@ = 0
  150. 0AB1: call_scm_func @DrawText 9 shooterName 7@ victimName 8@ POS_X POS_Y_BUFF weaponImage WEP_BUFF shooterColor 0xF21C00 victimColor 0xF21C00 FONT DISPLAY_OFFSET_Y
  151. else
  152. 0AB1: @IntArray_Read 2 ARRAY 7 _returned CLR_SHOOT_BUFF
  153. 0AB1: @IntArray_Read 2 ARRAY 8 _returned CLR_VICT_BUFF
  154. 0AB1: call_scm_func @DrawText 9 shooterName 7@ victimName 8@ POS_X POS_Y_BUFF weaponImage WEP_BUFF shooterColor CLR_SHOOT_BUFF victimColor CLR_VICT_BUFF FONT DISPLAY_OFFSET_Y
  155. end
  156. 005A: POS_Y_BUFF += DISPLAY_OFFSET_Y // (int)
  157. end
  158.  
  159.  
  160. if 0029: 13@ >= 4
  161. then
  162. 0AB1: @IntArray_Read 2 ARRAY 10 _returned CLR_SHOOT_BUFF
  163. 0AB1: @IntArray_Read 2 ARRAY 11 _returned CLR_VICT_BUFF
  164. 0AB1: @IntArray_Read 2 ARRAY 12 _returned WEP_BUFF
  165. if 28@ == 4
  166. then
  167. 28@ = 0
  168. 0AB1: call_scm_func @DrawText 9 shooterName 9@ victimName 10@ POS_X POS_Y_BUFF weaponImage WEP_BUFF shooterColor 0xF21C00 victimColor 0xF21C00 FONT DISPLAY_OFFSET_Y
  169. else
  170. 0AB1: call_scm_func @DrawText 9 shooterName 9@ victimName 10@ POS_X POS_Y_BUFF weaponImage WEP_BUFF shooterColor CLR_SHOOT_BUFF victimColor CLR_VICT_BUFF FONT DISPLAY_OFFSET_Y
  171. end
  172. 005A: POS_Y_BUFF += DISPLAY_OFFSET_Y // (int)
  173. end
  174.  
  175.  
  176. for 30@ = 0 to 1001
  177. if 30@ == 1001
  178. then
  179. 0AB1: call_scm_func @PlayerActor_to_var 1 Actor handle $PLAYER_ACTOR _var 1@
  180. 2@ = 0
  181. 0AB1: call_scm_func @WasPlayerHit 1 Actor handle 1@ _returned 2@ _weaponName 16@ // 1@ = 1 means that hit, 1@ == 0 means not hit
  182. if 2@ == 1
  183. then
  184. for 29@ = 0 to 1000
  185. if
  186. SAMP.IsPlayerConnected(29@)
  187. then
  188. if
  189. 0@ = SAMP.GetActorHandleByPlayerID(29@)
  190. then
  191. if
  192. 051A: actor 1@ damaged_by_actor 0@
  193. then
  194. jump @Second
  195. end
  196. end
  197. end
  198. end
  199. end
  200. else
  201. if
  202. SAMP.IsPlayerConnected(30@)
  203. then
  204. if
  205. 1@ = SAMP.GetActorHandleByPlayerID(30@)
  206. then
  207. 2@ = 0
  208. 0AB1: call_scm_func @WasPlayerHit 1 Actor handle 1@ _returned 2@ _weaponName 16@ // 1@ = 1 means that hit, 1@ == 0 means not hit
  209. if 2@ == 1
  210. then
  211. for 29@ = 0 to 1001
  212. if 29@ == 1001
  213. then
  214. 0AB1: call_scm_func @PlayerActor_to_var 1 Actor handle $PLAYER_ACTOR _var 0@
  215. if
  216. 051A: actor 1@ damaged_by_actor 0@
  217. then
  218. jump @Second
  219. end
  220. else
  221. if
  222. SAMP.IsPlayerConnected(29@)
  223. then
  224. if
  225. 0@ = SAMP.GetActorHandleByPlayerID(29@)
  226. then
  227. if
  228. 051A: actor 1@ damaged_by_actor 0@
  229. then
  230. jump @Second
  231. end
  232. end
  233. end
  234. end
  235. end
  236. end
  237. end
  238. end
  239. end
  240. end
  241. jump @First
  242.  
  243. :Second // 0@ = shooter 1@ = victim
  244. //variables for colors: 11@ 12@ 21@ 22@ 23@ 24@ 25@ 26@
  245. //switcher 27@
  246. //free 28@ 31@
  247.  
  248. wait 0
  249. 054E: clear_actor 1@ damage
  250. 0467: clear_actor 0@ last_weapon_damage
  251.  
  252. if and
  253. 056D: actor 0@ defined
  254. 056D: actor 1@ defined
  255. then
  256. if 001B: 15000 > 33@
  257. then
  258. 0AB1: call_scm_func @GetActorName 1 Actor handle 0@ _returnedString 2@
  259. if
  260. 0C29: 30@ = stristr string1 3@ string2 2@
  261. //0C14: strcmp string1 3@ string2 2@
  262. then
  263. 0AB1: call_scm_func @GetActorName 1 Actor handle 1@ _returnedString 2@
  264. if
  265. 0C29: 30@ = stristr string1 4@ string2 2@
  266. //0C14: strcmp string1 4@ string2 2@
  267. then
  268. 28@ = 1
  269. jump @First
  270. end
  271. end
  272.  
  273. 0AB1: call_scm_func @GetActorName 1 Actor handle 0@ _returnedString 2@
  274. if
  275. 0C29: 30@ = stristr string1 5@ string2 2@
  276. //0C14: strcmp string1 5@ string2 2@
  277. then
  278. 0AB1: call_scm_func @GetActorName 1 Actor handle 1@ _returnedString 2@
  279. if
  280. 0C29: 30@ = stristr string1 6@ string2 2@
  281. //0C14: strcmp string1 6@ string2 2@
  282. then
  283. 28@ = 2
  284. jump @First
  285. end
  286. end
  287.  
  288. 0AB1: call_scm_func @GetActorName 1 Actor handle 0@ _returnedString 2@
  289. if
  290. 0C29: 30@ = stristr string1 7@ string2 2@
  291. //0C14: strcmp string1 7@ string2 2@
  292. then
  293. 0AB1: call_scm_func @GetActorName 1 Actor handle 1@ _returnedString 2@
  294. if
  295. 0C29: 30@ = stristr string1 8@ string2 2@
  296. //0C14: strcmp string1 8@ string2 2@
  297. then
  298. 28@ = 3
  299. jump @First
  300. end
  301. end
  302.  
  303. 0AB1: call_scm_func @GetActorName 1 Actor handle 0@ _returnedString 2@
  304. if
  305. 0C29: 30@ = stristr string1 9@ string2 2@
  306. //0C14: strcmp string1 9@ string2 2@
  307. then
  308. 0AB1: call_scm_func @GetActorName 1 Actor handle 1@ _returnedString 2@
  309. if
  310. 0C29: 30@ = stristr string1 10@ string2 2@
  311. //0C14: strcmp string1 10@ string2 2@
  312. then
  313. 28@ = 4
  314. jump @First
  315. end
  316. end
  317. end
  318.  
  319. if 0029: 13@ >= 3
  320. then
  321. 0AB1: @IntArray_Read 2 ARRAY 7 _returned CLR_SHOOT_BUFF
  322. 0AB1: @IntArray_Write 3 ARRAY 10 val CLR_SHOOT_BUFF
  323. 0AB1: @IntArray_Read 2 ARRAY 8 _returned CLR_VICT_BUFF
  324. 0AB1: @IntArray_Write 3 ARRAY 11 CLR_VICT_BUFF
  325. 0AB1: @IntArray_Read 2 ARRAY 9 _returned WEP_BUFF
  326. 0AB1: @IntArray_Write 3 ARRAY 12 WEP_BUFF
  327.  
  328. 0C13: strcpy destination 9@ source 7@
  329. 0C13: strcpy destination 10@ source 8@
  330. end
  331.  
  332.  
  333. if 0029: 13@ >= 2
  334. then
  335. 0AB1: @IntArray_Read 2 ARRAY 4 _returned CLR_SHOOT_BUFF
  336. 0AB1: @IntArray_Write 3 ARRAY 7 val CLR_SHOOT_BUFF
  337. 0AB1: @IntArray_Read 2 ARRAY 5 _returned CLR_VICT_BUFF
  338. 0AB1: @IntArray_Write 3 ARRAY 8 CLR_VICT_BUFF
  339. 0AB1: @IntArray_Read 2 ARRAY 6 _returned WEP_BUFF
  340. 0AB1: @IntArray_Write 3 ARRAY 9 WEP_BUFF
  341.  
  342. 0C13: strcpy destination 7@ source 5@
  343. 0C13: strcpy destination 8@ source 6@
  344. end
  345.  
  346.  
  347. if 0029: 13@ >= 1
  348. then
  349. 0AB1: @IntArray_Read 2 ARRAY 1 _returned CLR_SHOOT_BUFF
  350. 0AB1: @IntArray_Write 3 ARRAY 4 val CLR_SHOOT_BUFF
  351. 0AB1: @IntArray_Read 2 ARRAY 2 _returned CLR_VICT_BUFF
  352. 0AB1: @IntArray_Write 3 ARRAY 5 CLR_VICT_BUFF
  353. 0AB1: @IntArray_Read 2 ARRAY 3 _returned WEP_BUFF
  354. 0AB1: @IntArray_Write 3 ARRAY 6 WEP_BUFF
  355.  
  356. 0C13: strcpy destination 5@ source 3@
  357. 0C13: strcpy destination 6@ source 4@
  358. end
  359.  
  360.  
  361. 0AB1: @IntArray_Write 3 ARRAY 3 16@
  362.  
  363.  
  364. 0AB1: call_scm_func @GetActorNameAndColor 1 Actor handle 0@ _returnedString 3@ _returnedColor CLR_SHOOT_BUFF
  365. 0AB1: @IntArray_Write 3 ARRAY 1 CLR_SHOOT_BUFF
  366. 0AB1: call_scm_func @GetActorNameAndColor 1 Actor handle 1@ _returnedString 4@ _returnedColor CLR_VICT_BUFF
  367. 0AB1: @IntArray_Write 3 ARRAY 2 CLR_VICT_BUFF
  368.  
  369. 13@ += 1
  370. 33@ = 0
  371. end
  372. jump @First
  373.  
  374.  
  375. :sitog
  376. 0B12: SWITCH = SWITCH XOR 1
  377. if SWITCH == 1
  378. then
  379. 0AD1: show_formatted_text_highpriority "shootingIndicator is ~G~enabled" time 800
  380. else
  381. 0AD1: show_formatted_text_highpriority "shootingIndicator is ~R~disabled" time 800
  382. end
  383. 0AF1: write_int SWITCH to_ini_file "CLEO\shootingIndicatorSettings.ini" section "Settings" key "switch"
  384. samp.CmdRet
  385.  
  386. :sihelp
  387. 0AF8: samp add_message_to_chat "{FF4800}shootingIndicator {F7F694}commands:"
  388. 0AF8: samp add_message_to_chat "{FFFFFF}/si {F7F694}(toggle whole mod)"
  389. 0AF8: samp add_message_to_chat "{FFFFFF}/sipos {F7F694}(adjust position)"
  390. 0AF8: samp add_message_to_chat "{FFFFFF}/sisize {F7F694}(set size)"
  391. samp.CmdRet()
  392.  
  393. :sisize
  394. 0B12: TOG_ADJUST_MODE_SIZE = TOG_ADJUST_MODE_SIZE XOR 1
  395. samp.CmdRet()
  396.  
  397. :sipos
  398. 0B12: TOG_ADJUST_MODE_POS = TOG_ADJUST_MODE_POS XOR 1
  399. samp.CmdRet()
  400.  
  401.  
  402. // FUNCTIONS
  403. //
  404. //
  405. //
  406. //
  407. //
  408. //
  409. //
  410. //
  411. //
  412. //
  413.  
  414. //0AB1: @IntArray_Write 3 array 0@ index 1@ val 2@ _retArray
  415. :IntArray_Write
  416. 0012: 1@ *= 4
  417. 005A: 1@ += 0@ // (int)
  418. 0A8C: write_memory 1@ size 4 value 2@ virtual_protect 1
  419. 0AB2: ret 0
  420.  
  421. //0AB1: @IntArray_Read array 0@ index 1@ _returned
  422. :IntArray_Read
  423. 0012: 1@ *= 4
  424. 005A: 1@ += 0@ // (int)
  425. 0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
  426. 0AB2: ret 1 2@
  427.  
  428. //0AB1: call_scm_func @GetActorNameAndColor 1 Actor handle 0@ _returnedString 3@ _returnedColor 11@
  429. :GetActorNameAndColor
  430. 0AC8: 4@ = allocate_memory_size 260
  431. 0AC8: 3@ = allocate_memory_size 260
  432. 0B2B: samp 1@ = get_player_id_by_actor_handle 0@
  433. 0B36: samp 2@ = get_player_nickname 1@
  434. 0C13: strcpy destination 3@ source 2@ // to prevent bug
  435. 0AD3: 4@ = format "(%d)" 1@
  436. 0C15: strcat destination 3@ source 4@
  437. 0B37: samp 5@ = get_player_color 1@
  438. 0AC9: free_allocated_memory 4@
  439. 0AB2: ret 2 3@ 5@
  440.  
  441. //0AB1: call_scm_func @GetActorName 1 Actor handle 1@ _returnedString 2@
  442. :GetActorName
  443. 0AC8: 4@ = allocate_memory_size 260
  444. 0AC8: 3@ = allocate_memory_size 260
  445. 0B2B: samp 1@ = get_player_id_by_actor_handle 0@
  446. 0B36: samp 2@ = get_player_nickname 1@
  447. 0C13: strcpy destination 3@ source 2@ // to prevent bug
  448. 0AD3: 4@ = format "(%d)" 1@
  449. 0C15: strcat destination 3@ source 4@
  450. 0AC9: free_allocated_memory 4@
  451. 0AB2: ret 1 3@
  452.  
  453. //0AB1: call_scm_func @DrawText 7 shooterName 0@ victimName 1@ posX 2@ posY 3@ weaponImage 4@ shooterColor 5@ victimColor 6@ font 7@ DISPLAY_OFFSET_Y 8@
  454. :DrawText
  455. 0085: 30@ = 8@ // (int)
  456. 0093: 30@ = integer 30@ to_float
  457. 30@ /= 2.5
  458. 8@ *= 2
  459.  
  460. 0B6B: render 31@ = 7@ get_length_of 0@
  461. 0062: 2@ -= 31@ // (int)
  462. 0B6F: render 7@ draw_text 0@ of pos 2@ 3@ color 5@
  463. 005A: 2@ += 31@ // (int)
  464. 005A: 2@ += 8@
  465. 8@ /= 2
  466. 0B6F: render 7@ draw_text 1@ of pos 2@ 3@ color 6@
  467. 0062: 2@ -= 8@
  468. 3@ += 9
  469. 0B5F: convert_window_screen_coords 2@ 3@ to_game_screen_coords 2@ 3@
  470. 03F0: enable_text_draw 1
  471. 03E3: set_texture_to_be_drawn_antialiased 4@
  472. if and
  473. 6@ == 0xF21C00
  474. 5@ == 0xF21C00
  475. then
  476. 038D: draw_texture 4@ position 2@ 3@ size 30@ 30@ RGBA 200 0 0 255
  477. else
  478. 038D: draw_texture 4@ position 2@ 3@ size 30@ 30@ RGBA 255 255 255 255
  479. end
  480. 0AB2: ret 0
  481.  
  482. /*
  483. //0AB1: @Draw 7 FONT FONT_SIZE STR_ DISPLAY_POS_X DISPLAY_POS_Y_BUFF CLR ALIGNMENT _ret DISPLAY_POS_Y_BUFF
  484. :Draw
  485. 0012: 1@ *= 10
  486. 0016: 1@ /= 7
  487. 005A: 4@ += 1@ // (int)
  488. if 6@ == 0 // left
  489. then
  490. 0B6F: render 0@ draw_text 2@ of pos 3@ 4@ color 5@
  491. else
  492. 0B6B: render 30@ = 0@ get_length_of 2@
  493. if 6@ == 1 //center
  494. then
  495. 0016: 6@ /= 2
  496. end
  497. 0085: 29@ = 3@
  498. 0062: 29@ -= 30@
  499. 0B6F: render 0@ draw_text 2@ of pos 29@ 4@ color 5@
  500. end
  501. 0AB2: ret 1 4@
  502. */
  503.  
  504. //0AB1: call_scm_func @WasPlayerHit 1 Actor handle $PLAYER_ACTOR _returned 1@ _weaponDrawNumber 3@ // 1@ = 1 means that hit, 1@ == 0 means not hit
  505. :WasPlayerHit
  506. 2@ = 0
  507. if
  508. 031D: actor 0@ hit_by_weapon 22 //Colt
  509. then
  510. 2@ = 1
  511. 3@ = 2
  512. else
  513. if
  514. 031D: actor 0@ hit_by_weapon 23 //Silenced
  515. then
  516. 2@ = 1
  517. 3@ = 11
  518. else
  519. if
  520. 031D: actor 0@ hit_by_weapon 24 //Deagle
  521. then
  522. 2@ = 1
  523. 3@ = 4
  524. else
  525. if
  526. 031D: actor 0@ hit_by_weapon 25 //Shotgun
  527. then
  528. 2@ = 1
  529. 3@ = 10
  530. else
  531. if
  532. 031D: actor 0@ hit_by_weapon 26 //Sawn
  533. then
  534. 2@ = 1
  535. 3@ = 9
  536. else
  537. if
  538. 031D: actor 0@ hit_by_weapon 27 //Combat shotgun
  539. then
  540. 2@ = 1
  541. 3@ = 3
  542. else
  543. if
  544. 031D: actor 0@ hit_by_weapon 28 //Uzi
  545. then
  546. 2@ = 1
  547. 3@ = 14
  548. else
  549. if
  550. 031D: actor 0@ hit_by_weapon 29 //Mp5
  551. then
  552. 2@ = 1
  553. 3@ = 7
  554. else
  555. if
  556. 031D: actor 0@ hit_by_weapon 30 //AK47
  557. then
  558. 2@ = 1
  559. 3@ = 1
  560. else
  561. if
  562. 031D: actor 0@ hit_by_weapon 31 //M4
  563. then
  564. 2@ = 1
  565. 3@ = 5
  566. else
  567. if
  568. 031D: actor 0@ hit_by_weapon 32 //Tec9
  569. then
  570. 2@ = 1
  571. 3@ = 13
  572. else
  573. if
  574. 031D: actor 0@ hit_by_weapon 33 //Rifle
  575. then
  576. 2@ = 1
  577. 3@ = 8
  578. else
  579. if
  580. 031D: actor 0@ hit_by_weapon 34 //Sniper
  581. then
  582. 2@ = 1
  583. 3@ = 12
  584. else
  585. if
  586. 031D: actor 0@ hit_by_weapon 38 //Minigun
  587. then
  588. 2@ = 1
  589. 3@ = 6
  590. end
  591. end
  592. end
  593. end
  594. end
  595. end
  596. end
  597. end
  598. end
  599. end
  600. end
  601. end
  602. end
  603. end
  604. 0AB2: ret 2 2@ 3@
  605.  
  606. //0AB1: call_scm_func @PlayerActor_to_var 1 Actor handle $PLAYER_ACTOR Var 1@
  607. :PlayerActor_to_var
  608. 00A0: store_actor 0@ position_to 1@ 2@ 3@
  609. 0AB2: ret 1 0@
  610.  
  611. /*
  612. if 0AB1: @ReadBoolBitFromArray 2 ARRAY_TOG BIT_INDEX_MODE_ADJUSTSIZE
  613. then
  614. if 0AB1: @Adjust_Font_Size 1 FONT_SIZE _ret FONT_SIZE
  615. then
  616. 0AB1: @ReloadFont 4 FONT STR_FONT_NAME FONT_SIZE FONT_FLAGS _retFont FONT
  617. wait 100
  618. end
  619. end
  620. */
  621. :Adjust_Font_Size
  622. 31@ = false
  623. if key_down 104
  624. then
  625. 0@ += 1
  626. 31@ = true
  627. 0485: return_true
  628. else
  629. if key_down 98
  630. then
  631. 0@ -= 1
  632. 31@ = true
  633. end
  634. end
  635. if 001B: 1 > 0@
  636. then
  637. 0@ = 1
  638. else
  639. if 0019: 0@ > 63
  640. then
  641. 0@ = 63
  642. end
  643. end
  644. 0AD1: show_formatted_text_highpriority "Use numpad 8 and 2 to increase/decrease font size + use /sisize again to exit editing" time 100 0xF7F694
  645. if 31@ == true
  646. then
  647. 0AF1: write_int 0@ to_ini_file "CLEO\shootingIndicatorSettings.ini" section "Settings" key "font_size"
  648. 0485: return_true
  649. else
  650. 059A: return_false
  651. end
  652. 0AB2: ret 1 0@
  653.  
  654. /*
  655. if 0AB1: @ReadBoolBitFromArray 2 ARRAY_TOG BIT_INDEX_MODE_ADJUSTPOS
  656. then 0AB1: @Position_stats 2 DISPLAY_POS_X DISPLAY_POS_Y _return DISPLAY_POS_X DISPLAY_POS_Y
  657. end
  658. */
  659. :Position
  660. 0B5D: samp toggle_cursor 1
  661. if key_down 1
  662. then
  663. 0B5E: get_cursor_pos 0@ 1@
  664. //0B5F: convert_window_screen_coords 8@ 9@ to_game_screen_coords 10@ 11@
  665. 0AF1: write_int 0@ to_ini_file "CLEO\shootingIndicatorSettings.ini" section "Settings" key "x"
  666. 0AF1: write_int 1@ to_ini_file "CLEO\shootingIndicatorSettings.ini" section "Settings" key "y"
  667. end
  668. //03E3: set_texture_to_be_drawn_antialiased 6
  669. //03F0: enable_text_draw 1
  670. //038D: draw_texture 6 position 0@ 1@ size 129.142960 45.333576 RGBA 150 150 150 150
  671. 0AD1: show_formatted_text_highpriority "Click anywhere + use /sipos again to exit editing" time 100 0xF7F694
  672. 0AB2: ret 2 0@ 1@
  673.  
  674.  
  675. //0AB1: @ReloadFont 4 FONT STR_FONT_NAME FONT_SIZE FONT_FLAGS _retFont FONT
  676. :ReloadFont
  677. 0B6E: render release 0@
  678. 0B6D: render 0@ = create 1@ height 2@ flags 3@
  679. 0AB2: ret 1 0@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement