23.06.2016, 11:36
I have an array that holds all the job locations, more than 300 locations are added and my problem is; locations where the passenger spawns for taxi mission are more than any other class'. The location IDs are from 206 to 348 for taxi mission.
The location IDs are added like this inside the job array
So, while adding the start points, adding all the locations like 206, 207, 208 to 348 would take a lot of lines and make the code look messy as well. Is it possible to shorten them somehow? So it would count from 206 to 348 at once. For example, inside the switch we can do case 206 .. 348 is it possible to do something like this here?
The location IDs are added like this inside the job array
PHP код:
new g_Job[MAX_JOB][e_JOB_DATA] = {
{"null", 0, {0}, {0}}, // Null, doesn't count
// Some more
// Start points // End points
// v v v v
{"Passenger", VEHICLE_TYPE_TAXI, {206, 207, 208 ... }, {0, 0}}