0A30: repair_car 0@
{$CLEO}
0662: "TH3RM4L"
:LABEL_1
wait 0
if and
not SAMP.ChatInputOpened()
Actor.Driving($PLAYER_ACTOR)
0AB0: 82
jf @LABEL_1
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0@ = Actor.CurrentCar($PLAYER_ACTOR)
4@ = Car.Angle(0@)
31@ = Car.Health(0@)
02E3: 6@ = car 0@ speed
wait 100
04BA: set_car 0@ speed_to 1250.0
goto @LABEL_2
:LABEL_2
wait 0
if
8AB0: not 82
jf @LABEL_2
if
Actor.Driving($PLAYER_ACTOR)
jf @LABEL_1
Actor.PutAt($PLAYER_ACTOR, 1@, 2@, 3@)
Car.Angle(0@) = 4@
0A30: repair_car 0@
Car.Health(0@) = 31@
04BA: set_car 0@ speed_to 6@
wait 500
goto @LABEL_1
well7FF link=topic=8951.msg51972#msg51972 date=1407048024]
Nice, just with a flaw in this (I think)
Set's vehicle HP to 1000 (afaik), which some server limit it to 998 or 997.Code:0A30: repair_car 0@
My suggestion is, restoring the old vehicle HP on :LABEL_2
Code:{$CLEO} 0662: "TH3RM4L" :LABEL_1 wait 0 if and not SAMP.ChatInputOpened() Actor.Driving($PLAYER_ACTOR) 0AB0: 82 jf @LABEL_1 Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@) 0@ = Actor.CurrentCar($PLAYER_ACTOR) 4@ = Car.Angle(0@) 31@ = Car.Health(0@) 02E3: 6@ = car 0@ speed wait 100 04BA: set_car 0@ speed_to 1250.0 goto @LABEL_2 :LABEL_2 wait 0 if 8AB0: not 82 jf @LABEL_2 if Actor.Driving($PLAYER_ACTOR) jf @LABEL_1 Actor.PutAt($PLAYER_ACTOR, 1@, 2@, 3@) Car.Angle(0@) = 4@ 0A30: repair_car 0@ Car.Health(0@) = 31@ 04BA: set_car 0@ speed_to 6@ wait 500 goto @LABEL_1
Why do u have to restore the HP's , u can just do this: (Car's HP set in CLEO is not synch anyway )7FF link=topic=8951.msg51972#msg51972 date=1407048024]
Nice, just with a flaw in this (I think)
03F5: set_car $car apply_damage_rules 0
Why do u have to restore the HP's , u can just do this: (Car's HP set in CLEO is not synch anyway )D.Kay link said:[quote author=bin]7FF link=topic=8951.msg51972#msg51972 date=1407048024]
Nice, just with a flaw in this (I think)
03F5: set_car $car apply_damage_rules 0