mysql command out of sync
#10

okay, I changed the script with THIS: the cars are loading nice but they won't spawn, wtf it's wrong?

pawn Код:
stock initiateCars()
{
    new
        id,
        vModel,
        vPos[8],
        vColors[2],
        vOwner[MAX_PLAYER_NAME],
        vDesc[MAX_PLAYER_NAME],
        vPrice,
        vLicense[32],
        vLicensedef[32],
        vOwned,
        vLocked,
        vMod[17],
        vPaintjob,
        vLock,
        totalcars
    ;
    mysql_query("SELECT * FROM `cars` WHERE `id` < 66 ORDER BY id");
    mysql_store_result();

    if(mysql_num_rows() > 0)
    {
        while(mysql_fetch_row_format(Query, "|"))
        {
            sscanf(Query, "p<|>iffffffffiis[24]s[24]is[32]s[32]iiiiiiiiiiiiiiiiiiiii",
            id, vModel, vPos[0], vPos[1], vPos[2], vPos[3], vPos[4], vPos[5], vPos[6], vPos[7], vColors[0], vColors[1], vOwner, vDesc, vPrice, vLicense, vLicensedef, vOwned, vLocked,
            vMod[0], vMod[1], vMod[2], vMod[3], vMod[4], vMod[5], vMod[6], vMod[7], vMod[8], vMod[9], vMod[10], vMod[11], vMod[12], vMod[13], vMod[14], vMod[15], vMod[16],
            vPaintjob, vLock);
            CarInfo[id][cModel] = vModel;
            CarInfo[id][cLocationx] = vPos[0]; CarInfo[id][cLocationy] = vPos[1]; CarInfo[id][cLocationz] = vPos[2]; CarInfo[id][cAngle] = vPos[3];
            CarInfo[id][cLocationxdef] = vPos[4]; CarInfo[id][cLocationydef] = vPos[5]; CarInfo[id][cLocationzdef] = vPos[6]; CarInfo[id][cAngledef] = vPos[7];
            CarInfo[id][cColorOne] = vColors[0]; CarInfo[id][cColorTwo] = vColors[1];
            strmid(CarInfo[id][cOwner], vOwner, 0, MAX_PLAYER_NAME, MAX_PLAYER_NAME);
            strmid(CarInfo[id][cDescription], vDesc, 0, MAX_PLAYER_NAME, MAX_PLAYER_NAME);
            CarInfo[id][cValue] = vPrice;
            strmid(CarInfo[id][cLicense], vLicense, 0, 32, 32);
            strmid(CarInfo[id][cLicensedef], vLicensedef, 0, 32, 32);
            CarInfo[id][cOwned] = vOwned;
            CarInfo[id][cLocked] = vLocked;
            CarInfo[id][cMod1] = vMod[0]; CarInfo[id][cMod2] = vMod[1]; CarInfo[id][cMod3] = vMod[2]; CarInfo[id][cMod4] = vMod[3];
            CarInfo[id][cMod5] = vMod[4]; CarInfo[id][cMod6] = vMod[5]; CarInfo[id][cMod7] = vMod[6]; CarInfo[id][cMod8] = vMod[7];
            CarInfo[id][cMod9] = vMod[8]; CarInfo[id][cMod10] = vMod[9]; CarInfo[id][cMod11] = vMod[10]; CarInfo[id][cMod12] = vMod[11];
            CarInfo[id][cMod13] = vMod[12]; CarInfo[id][cMod14] = vMod[13]; CarInfo[id][cMod15] = vMod[14]; CarInfo[id][cMod16] = vMod[15]; CarInfo[id][cMod17] = vMod[16];
            CarInfo[id][cPaintjob] = vPaintjob;
            CarInfo[id][cLock] = vLock;
            totalcars++;
            CreateVehicle(CarInfo[id][cModel],CarInfo[id][cLocationx],CarInfo[id][cLocationy],CarInfo[id][cLocationz]+1.0,CarInfo[id][cAngle],CarInfo[id][cColorOne],CarInfo[id][cColorTwo], 600000);
            //gCarLock[id] = 1;
            //SetVehicleNumberPlate(id,CarInfo[id][cLicense]);
            //LoadComponents(id);
            //IsAnOwnable[id] = 1;
        }
    }
    mysql_free_result();
    printf("Total cars: %d", totalcars);
    return 1;
}
oh, i'm sorry for bumping the topic, I didn't saw
Reply


Messages In This Thread
loading cars problem - by fordawinzz - 12.01.2012, 10:12
Re: mysql command out of sync - by [HiC]TheKiller - 12.01.2012, 10:22
Re: mysql command out of sync - by fordawinzz - 12.01.2012, 10:31
Re: mysql command out of sync - by [HiC]TheKiller - 12.01.2012, 10:39
Re: mysql command out of sync - by fordawinzz - 12.01.2012, 10:43
Re: mysql command out of sync - by [HiC]TheKiller - 12.01.2012, 10:52
Re: mysql command out of sync - by fordawinzz - 12.01.2012, 10:59
Re: mysql command out of sync - by [HiC]TheKiller - 12.01.2012, 11:04
Re: mysql command out of sync - by fordawinzz - 12.01.2012, 11:07
loading cars problem - by fordawinzz - 12.01.2012, 17:47

Forum Jump:


Users browsing this thread: 1 Guest(s)