tell me if i'm wrong but i thought this line
?(_dammage <= 0.1): goto "end"
will check if vehicles dammage is equal or less than 0.1 which is nearly completely destroyed.
if this condition isn't true, then the goto command will be ignored and proceed with the next line which will jump to the beginning of the loop.
I wouldn't use de canmove command since the driver could run the truck against a tree without destroying the vehic but beeing unable to move. But even then you can use this truck for rearm/refuel purposes.
:edit:
i'm a little unsure now...is 0 full health and 1 destroyed or is it vice versa? The 0.1 in the script presumes tha 0 is destroyed. If it's otherwise i'm sorry, just replace 0.1 with 0.9 and the < with >