Hmm.. Maybe it goes something like this then:
E: Nope, fail.
_x=0
#start
_vehicles=[civtruck,kar1,ur1,ur2,uaz1,uaz2];
?civtruck distance place < 30 : _x=1; goto "begin"
?_x=0 : goto "start"
#begin
_vehicles select _x addaction ["Sell car","sold.sqs"]
?sold : goto "dinz"
?not sold : goto "begin"
#dinz
_vehicles select _x removeaction 0;
_vehicles=_vehicles - _x;
_money=_money + 200;
sold=false;
_x=0;
goto "start"
Have to go try it out.
E:
This one almost worked. The 'car distance place < 30' doesn't work for some reason
_vehicles=[civtruck,kar1,ur1,ur2,uaz1,uaz2];
_x=0;
#start
?civtruck distance place < 30 : _x=1; /everything worked but this. You
can only sell this car because _x is always 1...
?kar1 distance place < 30 : _x=2;
?_x=1 : goto "begin1";
?_x=2 : goto "begin1";
?_x=0 : goto "start";
#begin1
_vehicles select _x addaction ["Sell car","sold.sqs"];
#begin2
?sold : goto "dinz";
goto "begin2";
#dinz
(_vehicles select _x) removeaction 0;
_vehicles select _x setpos (position awway);
sold=false;
_x=0;
hint "sold";
goto "start";
E2:
_vehicles=[civtruck,kar1,ur1,ur2,uaz1,uaz2];
_x=10; / ? _x=0 I think it selects civtruck anyways. Sneaky.
#start
?civtruck in (list array1) : _x=1; /array1 is the name of a trigger with conditions 'anybody' and 'repeatedly', tested to work with everything else but it won't work here.
?kar1 in (list array1) : _x=2;
?_x=10 : goto "start";
?_x=1 : goto "begin1";
?_x=2 : goto "begin1";
#begin1
_vehicles select _x addaction ["Sell car","sold.sqs"];
#begin2
?sold : goto "dinz";
goto "begin2";
#dinz
(_vehicles select _x) removeaction 0;
_vehicles select _x setpos (position awway);
sold=false;
_x=10;
hint "sold";
goto "start";
Now I'm out of ideas...