Jump to content
Sign in to follow this  
Gudsawn

Possible to get the displayName of an object?

Recommended Posts

I'm using a vehicle rearm script that displays each classname of the ammunition it is reloading. However, instead of displaying the classname would it be possible to get the display name of each object? e.g. instead of "30Rnd_65x39_caseless" it would display "30 Rnd STANAG Mag".

Thanks,

J

Share this post


Link to post
Share on other sites

Those routines look good, but where would they typically be placed? I assume that the functions would be called as needed.

Share this post


Link to post
Share on other sites

Place them in an SQF file, let's call it "configFunctions.sqf", in the init.sqf (on client or server, or wherever you're going to use it):

call compile preProcessFile "configFunctions.sqf";

then do:

"30Rnd_65x39_caseless" call ISSE_Cfg_Magazine_GetName;

When you want to access the information.

Note: It was written for ARMA2 so there might be problems, but it should be fine.

Share this post


Link to post
Share on other sites

It works great. Use it like this:

_type = typeOf _object;
_vehicleName = _type call ISSE_Cfg_Vehicle_GetName;

Edited by Jacmac

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×