Err, heres the simplest way I can think..
Make the liscensing person, with an addaction..
------=------
liscaction = this addaction ["Buy liscence","buylis.sqs"]
------=------
Then, make a script :
buylis.sqs
------=------
lisperson removeaction liscaction
HINT "Thanks for getting a liscene,\nDrive carefully!"
buyaction = redskoda Addaction ["Buy this car",{[redskoda,100] exec "buycar.sqs"}]
buyaction = redskoda Addaction ["Buy this car",{[blueskoda,300] exec "buycar.sqs"}]
;...etc....
EXIT
------=------
So, that will make the redskoda cost 100 thingys, and the blueskoda cost 300 thingys
You keep copy/pasting them, editing the the car name ([carname,cost] exec "buycar.sqs")
Heres the buycar.sqs script :
------=------
_car = this select 0
_carcost = this select 1
?(carcost > totalmoney):EXIT
_car locked false
totalmoney=totalmoney- _carmoney
HINT FORMAT ["Thank you for buying this fine car! It cost %1 \n You have %2 left!",_carcost,totalmoney]
_car removeaction buyaction
EXIT
------=------
And when you buy the car, it checks you have enough money, if not, it quits.. It then unlocks the car, takes the money away for the car (I guess you have a money system? If not, put a line in your INIT.sqs - totalmoney=100)
It then says thank you, tells you how much the car costs, and how much you have left, takes the Buy Car action away, then exits.
If you don't understand this.. I can make up a demo mission with it for you
- Ben
[Edit - messed up the code tags]
[Edit 18
- WTF it wrong! The tags keep getting messed up! >:|]
[Edit 19.. - Remove all the code tags, replaced 'em with
------=------
]