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

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
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
I thought about that but during the loop, the loop will set every value equal to the listitem value right?

but when on dialogresponse, should i loop again and make a check through all player vehicles or ?
because if i don't, the value of "vehicle_to_make" will be set to the listitem value i think because of the loop
otherwise, should i use "break;"
kinda confused here
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)