How to check if there's a number in a string and get that number as a variable
#9

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
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)