03.02.2012, 15:53
You need an array which holds the vehicle names in chronological order (lowest model ID is 400, so you start with the name of vehicle model 400, go on with 401, 402 etc).
When a player enters a vehicle, you get the model ID of the vehicle and substract 400 from it (e.g. he entered vehicle model ID 405, you substract 400 from it = 5). Now you get the string at position 5 from this array (in this case "Name of 405"), put it into the textdraw and then show the textdraw to the player.
Search the forum for some speedometers which have a textdraw for the vehicle menu and look into the code to get the idea.
pawn Код:
new VehicleNames[][] =
{"Name of 400","Name of 401","Name of 402","Name of 403","Name of 404","Name of 405",[...]};
Search the forum for some speedometers which have a textdraw for the vehicle menu and look into the code to get the idea.