07.11.2015, 22:10
SetPlayerMapicon(playerid, icon, vehicleInfo[vehicle_to_make][X],vehicleInfo[vehicle_to_make][Y],vehicleInfo[vehicle_to_make][Z], etc);
The way I set it up (make sure you look after the edit) will set vehicle_to_make to the ID you got in the initial loop (when using the command). You can rename vehicle_to_make to whatever you want of course, wasn't sure what you were doing entirely so the naming may seem a bit off. listitem will always equal to the vehicle id if playerpersonalVehicle[v] contains the vehicles ID.
You can think of it doing;
PersonalVehicle_1 is set in the initial loop
if you select the second item (0,1,2 etc) in the list, it will pull an int from PersonalVehicle_1
The way I set it up (make sure you look after the edit) will set vehicle_to_make to the ID you got in the initial loop (when using the command). You can rename vehicle_to_make to whatever you want of course, wasn't sure what you were doing entirely so the naming may seem a bit off. listitem will always equal to the vehicle id if playerpersonalVehicle[v] contains the vehicles ID.
You can think of it doing;
PersonalVehicle_1 is set in the initial loop
if you select the second item (0,1,2 etc) in the list, it will pull an int from PersonalVehicle_1