{$CLEO}
0000:
0662: "by legend2360"
0662: "BlastHack - cheating is art"
while not SAMP.Available()
wait 400
end
30@ = Render.CreateFont("Helvetica", 12, 12)
31@ = Render.FontDrawHeight(30@)
alloc 29@ 96
28@ = Render.CreateFont("Trebuchet MS", 9, 12)
const
// array
vSpeed = 0
vFuel = 1
vDamage = 2
vDoorS = 3
vSpeedL = 4
vFuelS = 5
vEngineS = 6
vLightS = 7
end
while true
wait 50
if Actor.Driving($PLAYER_ACTOR)
then
0@ = Actor.CurrentCar($PLAYER_ACTOR)
046C: 1@ = car 0@ driver
if 003c: $PLAYER_ACTOR == 1@
then
for 1@ = 1 to 2047 step 1
call @get_td_pool_by_id 2 id 1@ offset 0x0 retr_to 2@
if 2@ == true
then
call @get_td_pool_by_id 2 id 1@ offset 0x2400 retr_to 2@
0A8D: 3@ = read_memory 2@ size 1 virtual_protect 0
if and
3@ <> 0x0
0C18: 3@ = strstr string1 2@ string2 "km/h__~h~Fuel"
then break
end
end
end
if 2@ <> 0
then
0C0D: struct 2@ offset 2403 size 4 = 0.0
0C0D: struct 2@ offset 2417 size 1 = 0
alloc 3@ 32
memset 3@ 0 32
while Actor.Driving($PLAYER_ACTOR)
wait 0
0B60: convert_game_screen_coords 130.0 400.0 to_window_screen_coords 4@ 5@
0B6A: render draw_box_with_border_pos 4@ 5@ size 600 105 color 0xaaeaeaea border_size 2 border_color 0xab323232
// -- MAIN
4@ += 5
5@ += 4
call @getAllValues 2 str 2@ to_array 3@
// Speed
0C0E: 6@ = array 3@ element vSpeed
if and
6@ >= 0
6@ <= 34
then 7@ = 0xffcc3333
else
if and
6@ > 34
6@ <= 87
then 7@ = 0xffffd000
else 7@ = 0xff49d039
end
end
Render.DrawText(30@, "Скорость", 4@, 5@, 0xff00a5ff)
8@ = Render.FontDrawLength(30@, "Скорость")
8@ += 10
005a: 4@ += 8@
5@ += 3
call @draw_bar 9 pos_xy 4@ 5@ size_xy 100 15 value 6@ max_value 130 color 7@ bg_color 0xff323232 draw_value 1
// NUMBER
format 29@ = "%d" 6@
9@ = Render.FontDrawLength(30@, 29@)
9@ /= 2
0A8F: 9@ = 50 - 9@
005a: 9@ += 4@
5@--
call @draw_label 5 pos_xy 9@ 5@ font 28@ color -1 text 29@
5@++
// --
0062: 4@ -= 8@
// ------------------------------
005a: 5@ += 31@
// Fuel
0C0E: 6@ = array 3@ element vFuel
if and
6@ >= 0
6@ <= 15
then 7@ = 0xffcc3333
else
if and
6@ > 15
6@ <= 75
then 7@ = 0xffffd000
else 7@ = 0xff49d039
end
end
Render.DrawText(30@, "Бензин", 4@, 5@, 0xff00a5ff)
8@ = Render.FontDrawLength(30@, "Бензин")
8@ += 10
005a: 4@ += 8@
5@ += 3
call @draw_bar 9 pos_xy 4@ 5@ size_xy 100 15 value 6@ max_value 150 color 7@ bg_color 0xff323232 draw_value 1
// NUMBER
format 29@ = "%d" 6@
9@ = Render.FontDrawLength(30@, 29@)
9@ /= 2
0A8F: 9@ = 50 - 9@
005a: 9@ += 4@
5@--
call @draw_label 5 pos_xy 9@ 5@ font 28@ color -1 text 29@
5@++
// --
0062: 4@ -= 8@
// ------------------------------
005a: 5@ += 31@
// Damage status
0C0E: 6@ = array 3@ element vDamage
6@ /= 10
if and
6@ >= 0
6@ <= 39
then 7@ = 0xffcc3333
else
if and
6@ > 39
6@ <= 65
then 7@ = 0xffffd000
else 7@ = 0xff49d039
end
end
Render.DrawText(30@, "Состояние авто", 4@, 5@, 0xff00a5ff)
8@ = Render.FontDrawLength(30@, "Состояние авто")
8@ += 10
005a: 4@ += 8@
5@ += 3
call @draw_bar 9 pos_xy 4@ 5@ size_xy 100 15 value 6@ max_value 100 color 7@ bg_color 0xff323232 draw_value 1
// NUMBER
format 29@ = "%d" 6@
9@ = Render.FontDrawLength(30@, 29@)
9@ /= 2
0A8F: 9@ = 50 - 9@
005a: 9@ += 4@
5@--
call @draw_label 5 pos_xy 9@ 5@ font 28@ color -1 text 29@
5@++
// --
0062: 4@ -= 8@
// ------------------------------
0062: 5@ -= 31@
0062: 5@ -= 31@
5@ -= 11
4@ += 300
call @render_sep 4 s_xy 4@ 5@ e_xy 0 102
// --
4@ += 5
if call @checkValue 3 array 3@ el vDoorS value 0
then Render.DrawText(30@, "Автомобиль закрыт", 4@, 5@, 0xff49d039)
else Render.DrawText(30@, "Автомобиль открыт", 4@, 5@, 0xffcc3333)
end
005a: 5@ += 31@
if call @checkValue 3 array 3@ el vSpeedL value 1
then Render.DrawText(30@, "Ограничитель включен", 4@, 5@, 0xffcc3333)
else Render.DrawText(30@, "Ограничитель выключен", 4@, 5@, 0xff49d039)
end
005a: 5@ += 31@
if call @checkValue 3 array 3@ el vFuelS value 1
then Render.DrawText(30@, "В бензопаке мало топлива", 4@, 5@, 0xffcc3333)
else Render.DrawText(30@, "В бензопаке достаточно топлива", 4@, 5@, 0xff49d039)
end
005a: 5@ += 31@
if call @checkValue 3 array 3@ el vEngineS value 1
then Render.DrawText(30@, "Двигатель заведён", 4@, 5@, 0xff49d039)
else Render.DrawText(30@, "Двигатель не заведён", 4@, 5@, 0xffcc3333)
end
005a: 5@ += 31@
if call @checkValue 3 array 3@ el vLightS value 1
then Render.DrawText(30@, "Свет включен", 4@, 5@, 0xff49d039)
else Render.DrawText(30@, "Свет выключен", 4@, 5@, 0xffcc3333)
end
// ------------------------------
end
free 3@
end
end
end
end
:render_sep
0A8E: 4@ = 0@ + 2@
0A8E: 5@ = 1@ + 3@
0B68: render draw_line_point1 0@ 1@ point2 4@ 5@ width 2 color 0xff323232
ret 0
:getAllValues
// call @getAllValues 2 str 0@ to_array 1@
0AD4: 2@ = scan_string 0@ format "%d_km/h__~h~Fuel_%d__~b~%d" 3@ 4@ 5@
0C0F: array 1@ element vSpeed = 3@
0C0F: array 1@ element vFuel = 4@
0C0F: array 1@ element vDamage = 5@
if 0C18: 2@ = strstr string1 0@ string2 "~g~~h~Open" // door status
then 0C0F: array 1@ element vDoorS = 1 // open
else 0C0F: array 1@ element vDoorS = 0 // close
end
if 0C18: 2@ = strstr string1 0@ string2 "~w~max" // speed limit.
then 0C0F: array 1@ element vSpeedL = 0 // no
else 0C0F: array 1@ element vSpeedL = 1 // yes
end
if 0C18: 2@ = strstr string1 0@ string2 "~w~E" // fuel status
then 0C0F: array 1@ element vFuelS = 0 // full
else 0C0F: array 1@ element vFuelS = 1 // empty
end
if 0C18: 2@ = strstr string1 0@ string2 "~w~M" // Engine status
then 0C0F: array 1@ element vEngineS = 0 // don't work
else 0C0F: array 1@ element vEngineS = 1 // work
end
if 0C18: 2@ = strstr string1 0@ string2 "~w~L" // light
then 0C0F: array 1@ element vLightS = 0 // off
else 0C0F: array 1@ element vLightS = 1 // on
end
ret 0
:checkValue
// call @checkValue 3 array 0@ el 1@ value 2@
0C0E: 3@ = array 0@ element 1@
if 003b: 3@ == 2@
then ret 0 1
end
ret 0
:draw_bar
// call @draw_bar 9 pos_xy 0@ 1@ size_xy 2@ 3@ value 4@ max_value 5@ color 6@ bg_color 7@ draw_value 8@
if 9@ < 0
then
lo 9@ 9@
0A8D: 9@ = read_memory 9@ size 4 virtual_protect 0
end
0085: 10@ = 2@
0073: 10@ /= 5@
006b: 10@ *= 4@
if 001d: 10@ > 2@
then 0085: 10@ = 2@
end
0B6A: render draw_box_with_border_pos 0@ 1@ size 2@ 3@ color 7@ border_size 1 border_color 0xff000000
0B6A: render draw_box_with_border_pos 0@ 1@ size 10@ 3@ color 6@ border_size 1 border_color 0x00000000
ret 0
:draw_label
// call @draw_label 5 pos_xy 0@ 1@ font 2@ color 3@ text 4@
if 4@ < 0
then lo 4@ 4@
end
Render.DrawText(2@, 4@, 0@, 1@, 3@)
ret 0
:get_td_pool_by_id
var
0@ : int // id
1@ : int // offset
2@ : int
end
2@ = SAMP.Base()
2@ += 0x212A80
0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
2@ += 0x3D9
0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
0@ *= 4
1@ += 0@
2@ += 1@
0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
ret 1 2@