You are not logged in.
Пожалуйста, перейдите к сообщению #11!
{$CLEO}
0000:
while true
repeat
wait 0
0A8D: 0@ = read_memory 0xB6F3B8 size 4 virtual_protect 0
if
0@ == 0
then
continue
end
0@ += 0x79C
0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0
until 1@ <> 0
0A8D: 2@ = read_memory 0xB74490 size 4 virtual_protect 0 //get pPedPool
0AA8: call_function_method 0x4442D0 struct 2@ num_params 1 pop 0 ped 1@ store_to 0@ //get handle of ped
0AA6: call_method 0x4637E0 struct 0xA90850 num_params 2 pop 0 type 2 ped 1@ //add references to ped
if
056D: actor 0@ defined
then
0226: 3@ = actor 0@ health // (float)
0087: 2@ = 3@ // (float)
3@ /= 100.0
3@ *= 58.0
2@ /= 2.0
2@ += 547.6
03F0: enable_text_draw 1
038E: draw_box_position 576.6 66.5 size 62.0 8.0 RGBA 0 0 0 255
038E: draw_box_position 576.6 66.5 size 58.0 5.1 RGBA 0 172 172 255
038E: draw_box_position 2@ 66.5 size 3@ 5.0 RGBA 0 255 255 255
actor.RemoveReferences(0@)
end
endНоль получается чтоли? Выходит, что так. Не могу понять, где ошибка. Подскажите, пожалуйста..
Last edited by WinuX (05-11-2009 20:03)
Offline
Offline
всё, понял. 3@ должен иметь тип float.
Last edited by WinuX (05-11-2009 14:13)
Offline
Конечный код:
{$CLEO}
0000:
while true
repeat
wait 0
0A8D: 0@ = read_memory 0xB6F3B8 size 4 virtual_protect 0
if
0@ == 0
then
continue
end
0@ += 0x79C
0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0
until 1@ <> 0
0A8D: 2@ = read_memory 0xB74490 size 4 virtual_protect 0 //get pPedPool
0AA8: call_function_method 0x4442D0 struct 2@ num_params 1 pop 0 ped 1@ store_to 0@ //get handle of ped
0AA6: call_method 0x4637E0 struct 0xA90850 num_params 2 pop 0 type 2 ped 1@ //add references to ped
if
056D: actor 0@ defined
then
0226: 3@ = actor 0@ health
0093: 3@ = integer 3@ to_float
3@ /= 100.0
3@ *= 58.0
0087: 2@ = 3@
2@ /= 2.0
2@ += 547.6
03F0: enable_text_draw 1
038E: draw_box_position 576.6 66.5 size 62.0 8.0 RGBA 0 0 0 255
038E: draw_box_position 576.6 66.5 size 58.0 5.1 RGBA 0 172 172 255
038E: draw_box_position 2@ 66.5 size 3@ 5.0 RGBA 0 255 255 255
actor.RemoveReferences(0@)
end
endНу значит, беру я педа под прицел, убиваю, всё отлично. Сажусь в машину, тихо мирно еду - прекрасно. Проезжаю некоторое расстояние, и игра вылетает. Из-за этого скрипта, это точно.
Offline
Offline
Ага, спасибо..
А как броню педа узнать?
"Яблоко от яблони недалеко падает"
Поэксперементируй с оффсетом (ну там, вроде где 0x79C)
Offline
Offline
Код скрипта:
{$CLEO}
0000:
while true
repeat
wait 0
0A8D: 0@ = read_memory 0xB6F3B8 size 4 virtual_protect 0
if
0@ == 0
then
continue
end
0@ += 0x79C
0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0
until 1@ <> 0
0A8D: 2@ = read_memory 0xB74490 size 4 virtual_protect 0 //get pPedPool
0AA8: call_function_method 0x4442D0 struct 2@ num_params 1 pop 0 ped 1@ store_to 0@ //get handle of ped
0AA6: call_method 0x4637E0 struct 0xA90850 num_params 2 pop 0 type 2 ped 1@ //add references to ped
if and
056D: actor 0@ defined
not Actor.Driving($PLAYER_ACTOR)
then
if
0AB0: key_pressed 8
then
0223: set_actor 0@ health_to 1000
end
if
0AB0: key_pressed 46
then
0223: set_actor 0@ health_to 0
end
0226: 3@ = actor 0@ health
04DD: 20@ = actor 0@ armour
if
20@ > 0
then
21@ = 255
else
21@ = 0
end
4@ = 0
if
3@ > 100
then
4@ = 1
end
0093: 3@ = integer 3@ to_float
if
4@ == 1
then
3@ -= 100.0
3@ /= 900.0
else
3@ /= 100.0
end
3@ *= 58.0
0087: 2@ = 3@
2@ /= 2.0
2@ += 547.6
03F0: enable_text_draw 1
038E: draw_box_position 576.6 66.5 size 62.0 8.0 RGBA 0 0 21@ 255
if
4@ == 1
then
038E: draw_box_position 576.6 66.5 size 58.0 5.1 RGBA 0 255 255 255
038E: draw_box_position 2@ 66.5 size 3@ 5.0 RGBA 255 0 255 255
else
038E: draw_box_position 576.6 66.5 size 58.0 5.1 RGBA 172 172 172 255
038E: draw_box_position 2@ 66.5 size 3@ 5.0 RGBA 0 255 255 255
end
actor.RemoveReferences(0@)
end
endВылеты из игры постоянные, ежедесятиминутные. Что не так?
Offline