Код
{$CLEO}
0000:
while true
wait 0
IF AND
0c89: 115
00DF: actor $PLAYER_ACTOR driving
THEN
IF call @GetVehicleEngineState 0
then
0AF9: samp say_msg "/me провернул ключ зажигания на лево"
wait 1000
0AF9: samp say_msg "/do Двигатель машины заглох."
else
0AF9: samp say_msg "/me провернул ключ зажигания на право"
wait 1000
0AF9: samp say_msg "/do Машина завелась."
end
END
end
:GetVehicleEngineState
03C0: 0@ = actor $PLAYER_ACTOR car
0A97: 0@ = car 0@ struct
0A8E: 1@ = 0@ + 0x428
0A8D: 2@ = read_memory 1@ size 1 virtual_protect 1
if or
2@ == 24
2@ == 88
then
0485: return_true
else
if or
2@ == 8
2@ == 72
then
059A: return_false
end
end
ret 0