Tostm8 1 Posted August 27, 2018 (edited) Hello, I need some help here. I want to find another way to do this basically: _vehicle = _this select 0; vehicleType = ""; if (typeOf _vehicle == "B_Truck_01_mover_F") then {vehicleType = "HEMTT"}; if (typeOf _vehicle == "B_Truck_01_ammo_F") then {vehicleType = "HEMTT Ammo"}; if (typeOf _vehicle == "B_Truck_01_fuel_F") then {vehicleType = "HEMTT Fuel"}; if (typeOf _vehicle == "B_Truck_01_medical_F") then {vehicleType = "HEMTT Medical"}; if (typeOf _vehicle == "B_Truck_01_Repair_F") then {vehicleType = "HEMTT Repair"}; if (typeOf _vehicle == "B_Truck_01_transport_F") then {vehicleType = "HEMTT Transport"}; if (typeOf _vehicle == "B_Truck_01_covered_F") then {vehicleType = "HEMTT Transport (Covered)"}; I don't want to have to type out every different variation because I'm lazy haha. Is there another way around this? Thanks, Toasty. *EDIT* !SOLVED! Here's the solution / an example of its use: _nearVehicles = nearestObjects [player, ["Car"], 200]; { _description = getDescription _x; _className = _description select 0; _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName"); _marker = createMarker [str(_x), getPos _x]; _marker setMarkerColor "ColorRed"; _marker setMarkerShape "ICON"; _marker setMarkerType "mil_end"; _marker setMarkerText _displayName; } forEach _nearVehicles; This will add a marker onto every "car" with its name within a 200-meter radius. Edited August 27, 2018 by Tostm8 Share this post Link to post Share on other sites
Schatten 267 Posted August 27, 2018 @Tostm8, _displayName = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"); 1 1 Share this post Link to post Share on other sites
gc8 970 Posted August 27, 2018 This way, I think... getText (configFile >> "CfgVehicles" >> (typeof _vehicle) >> "displayName") 1 Share this post Link to post Share on other sites
gc8 970 Posted August 27, 2018 lol Schatten beat me. by a second :) 1 2 Share this post Link to post Share on other sites
Tostm8 1 Posted August 27, 2018 (edited) Thank you both! I reckon that should work. Ta. *EDIT* Works like a charm. Thank you very much guys! Edited August 27, 2018 by Tostm8 Thanks Share this post Link to post Share on other sites