Problem with setting Vehicle ID
#1

Ok so for some reason the Owned Vehicle ID#'s aren't being set to the variable m in the following code. I don't know why, and it's a BIG problem. Whats wrong and how can I make it set the vehicles ID to m?

Here's the code:
pawn Код:
for(new m = 1; m < sizeof(CarInfo); m++)
    {
        format(string2, sizeof(string2), "LARP/Vehicles/%d.ini",m);
        if(dini_Exists(string2))
        {
            //new PlatePossible[][] ={"AVIF", "ZISA", "VYQH", "AUBS", "IFQX", "SQUY", "QUGX", "PTRA", "BRWG", "CTID", "BTAA", "DPFA", "EAGF", "FPAH", "GJDD", "HFIQ", "JTVS", "KUBK", "LPQP", "MATA", "NXTB", "OFYC", "RESX", "TEHF", "SVPX", "VAWS", "WHFG", "XQWS", "YGJG", "ZGOA", "KDFG", "LTSP", "JOSD"};
            //new string[128];
            //new randdr = random(sizeof(PlatePossible));
            //format(string, sizeof(string), "%s - %d", PlatePossible[randdr],m);
            ownedcar[m] = AddStaticVehicleEx(CarInfo[m][cModel],CarInfo[m][cLocationx],CarInfo[m][cLocationy],CarInfo[m][cLocationz]+1.0,CarInfo[m][cAngle],CarInfo[m][cColorOne],CarInfo[m][cColorTwo],60000)

Thanks in Advance!

PS: To test the variable m (which is the # of the vehicles .ini file- all different #'s) I set the license plate to m and it displayed correctly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)