Is it possible inside a multi dimensional array?
#1

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

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, {206207208 ... }, {00}} 
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?
Reply
#2

Why not just load them dynamically from an SQLite database? or some other saving system.
Reply
#3

Sjn, you are just wasting your time by making some big ass arrays over there, just make database for that and you can also change those coordinates ingame.
Reply
#4

Ah well, I planned to move them into the db a long ago, idk why didn't I. I think I should move them now. Anyway, thanks for the replies.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)