[C#] How can I spawn Cars by Name?
Hey Guys, im searching for a solution to spawn cars by name. Like you have a TextBox and there you type in the Vehicle name.
Maybe someone can give me a Code Example!
Greetings From Germany
Game.GetUserInputfor the text box.
If you want to spawn cars with a model name, just put the returned string from
If you want to spawn cars with their actual name:
Dictionary<Key, Value>with the keys set as vehicle names and values set as model names.
Put the returned string from
yourDictionaryVariable.TryGetValue(userInputReturnedStringHere, out variableForValue)to get the model name. Use that model name in