When purchasing a car, a foreign citizen has the same rights as a Croatian citizen. The differences lie in the registration: a foreign citizen with a temporary stay permit is assigned a green license plate. This registration is valid for one year. If the temporary stay is extended, the registration is renewed, with a green license plate.
In accordance with Croatian regulations foreigners or nationals of Member States of the European Economic Area, which the Republic of Croatia has been granted temporary or permanent residence, can register vehicles at the Croatian competent authority according to their whereabouts.
You can read more about this topic here: Ministry of Foreign Affairs of the Republic of Croatia - Temporary residence and vehicle registration in Croatia