Jump to content
Sign in to follow this  
ColonelKernel

Get object and unit's in-game name

Recommended Posts

Hi.

How can I get the "in-game" name of objects? (for example instead of the long and weird name you get by "typeOf" for HEMTT you actually get "HEMTT")

Edit:

I just realized it's called "displayName" of a unit!

 

Share this post


Link to post
Share on other sites

Hey bro, try this :)

getText (configFile >> "cfgVehicles" >> typeOf xXxXx >> "displayName")
 

  • Like 2

Share this post


Link to post
Share on other sites

There's only one way for this, like palatine said:

getText (configFile >> "cfgVehicles" >> typeOf vehicle player >> "displayName");

Will return "HEMTT" when inside a HEMTT.

 

Using the config browser lets you dig through various stuff inside the config, mostly things that can't be accessed other than using getText/getNumber or getArray to read stuff from the config.

 

Cheers

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
7 hours ago, palatine said:

Hey bro, try this :)

getText (configFile >> "cfgVehicles" >> typeOf xXxXx >> "displayName")
 

Thanks bro!

 

6 hours ago, Grumpy Old Man said:

There's only one way for this, like palatine said:


getText (configFile >> "cfgVehicles" >> typeOf vehicle player >> "displayName");

Will return "HEMTT" when inside a HEMTT.

 

Using the config browser lets you dig through various stuff inside the config, mostly things that can't be accessed other than using getText/getNumber or getArray to read stuff from the config.

 

Cheers

Thanks!

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  

×