Advertisement
Yoda

Objects tests in GTA:SA

Sep 16th, 2011
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. {$CLEO .cs}
  2.  
  3. 0000: NOP
  4. 0001: wait 5 ms
  5.  
  6. :Loop
  7. 0001: wait 0 ms
  8. 0050: gosub @ScriptsCheck
  9. 0002: jump @Loop
  10.  
  11. :ScriptsCheck
  12.  
  13. // ---------- version 1. doesn't work. game crashes. ----------
  14.  
  15. // 0006: 23@ = 2754 // (SLOT_MACHINE)
  16. // 0006: 25@ = 2640 // (VIDPOK)
  17. // 0006: 26@ = 1978 // (ROULETTE)
  18. // 0006: 27@ = 2188 // (BLACKJ)
  19. // 0006: 28@ = 2754 // (OTB_SCRIPT)
  20. // 0006: 29@ = 2964 // (POOL_SCRIPT)
  21. // 00D6: if and
  22. // 0472: not actor $PLAYER_ACTOR near_object_in_rectangle 23@ radius 5.0 5.0 flag 0 on_foot
  23. // 0472: not actor $PLAYER_ACTOR near_object_in_rectangle 25@ radius 5.0 5.0 flag 0 on_foot
  24. // 0472: not actor $PLAYER_ACTOR near_object_in_rectangle 26@ radius 5.0 5.0 flag 0 on_foot
  25. // 0472: not actor $PLAYER_ACTOR near_object_in_rectangle 27@ radius 5.0 5.0 flag 0 on_foot
  26. // 0472: not actor $PLAYER_ACTOR near_object_in_rectangle 28@ radius 5.0 5.0 flag 0 on_foot
  27. // 0472: not actor $PLAYER_ACTOR near_object_in_rectangle 29@ radius 5.0 5.0 flag 0 on_foot
  28. // 0AA1: return_if_false
  29.  
  30. // ---------- version 2. doesn't work. game crashes. ----------
  31.  
  32. // 04C4: store_coords_to 23@ 25@ 27@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
  33. // 0866: get_object_in_sphere 23@ 25@ 27@ radius 5.0 handle_as 31@
  34. // 0984: 30@ = object 31@ model
  35. // 0006: 23@ = 2754 // (SLOT_MACHINE)
  36. // 0006: 25@ = 2640 // (VIDPOK)
  37. // 0006: 26@ = 1978 // (ROULETTE)
  38. // 0006: 27@ = 2188 // (BLACKJ)
  39. // 0006: 28@ = 2754 // (OTB_SCRIPT)
  40. // 0006: 29@ = 2964 // (POOL_SCRIPT)
  41. // 00D6: if and
  42. // 803B: not 23@ == 30@ // and reverse 30@ == 23@
  43. // 803B: not 25@ == 30@ // and reverse 30@ == 25@
  44. // 803B: not 26@ == 30@ // and reverse 30@ == 26@
  45. // 803B: not 27@ == 30@ // and reverse 30@ == 27@
  46. // 803B: not 28@ == 30@ // and reverse 30@ == 28@
  47. // 803B: not 29@ == 30@ // and reverse 30@ == 29@
  48. // 0AA1: return_if_false
  49.  
  50. // ---------- version 3. doesn't work. game crashes. ----------
  51.  
  52. // 04C4: store_coords_to 23@ 25@ 27@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
  53. // 0866: get_object_in_sphere 23@ 25@ 27@ radius 5.0 handle_as 30@
  54. // 0984: 31@ = object 30@ model
  55. // 0085: 23@ = 31@ // (int)
  56. // 0085: 25@ = 31@ // (int)
  57. // 0085: 27@ = 31@ // (int)
  58. // 0085: 28@ = 31@ // (int)
  59. // 0085: 29@ = 31@ // (int)
  60. // 00D6: if and
  61. // 8039: not 23@ == 2754 // (SLOT_MACHINE)
  62. // 8039: not 25@ == 2640 // (VIDPOK)
  63. // 8039: not 27@ == 1978 // (ROULETTE)
  64. // 8039: not 28@ == 2188 // (BLACKJ)
  65. // 8039: not 29@ == 2754 // (OTB_SCRIPT)
  66. // 8039: not 31@ == 2964 // (POOL_SCRIPT)
  67. // 0AA1: return_if_false
  68.  
  69. // ---------- version 4. doesn't work. game crashes. ----------
  70.  
  71. // 04C4: store_coords_to 23@ 25@ 27@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
  72. // 0866: get_object_in_sphere 23@ 25@ 27@ radius 5.0 handle_as 31@
  73. // 00D6: if and
  74. // 89CC: not object 31@ model_is 2754 // (SLOT_MACHINE)
  75. // 89CC: not object 31@ model_is 2640 // (VIDPOK)
  76. // 89CC: not object 31@ model_is 1978 // (ROULETTE)
  77. // 89CC: not object 31@ model_is 2188 // (BLACKJ)
  78. // 89CC: not object 31@ model_is 2754 // (OTB_SCRIPT)
  79. // 89CC: not object 31@ model_is 2964 // (POOL_SCRIPT)
  80. // 0AA1: return_if_false
  81.  
  82. 0050: gosub @WeaponIconMain
  83. 0051: return
  84.  
  85. :WeaponIconMain
  86. // some code... works fine without "object tests" in :ScriptsCheck
  87. 0051: return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement