Jump to content

HELP Custom Car Names


Recommended Posts

Posted

Well there you are doing something wrong if you want "carname[model]" to actually do something since its just a key value/string being search for, not any table position thought.

Posted

The carnames, I saved those in a server sided script.

That's what I use to let the carname show when I enter the car *Thanks to MrTasty*

.. tostring(carname[getElementModel(source)][1]) .. 

Posted
That did work!

I got another problem

table.insert(content, {"   -  " ..(getElementData(source, "carname[model]") or getVehicleNameFromModel( getElementModel( source ) ))} ) 

I've tried some options neither did they work. I actually want the custom carname to show instead of the mta model

Aren't you just trying to take out the value from the table? No point of getElementData.

I'm pretty sure this'll work:

table.insert(content,{ "  -  " ..(carname[getElementModel(source)] or getVehicleNameFromModel(getElementModel(source)))}) 

But what exactly are you trying to do by putting the custom name into a table?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...