Vehicle Loading [MySQL]
#1

So I have been attempting to revamp the Vortex 2 vehicle system and I have manage to set it to save correctly, insert the right car key and what not but whenever I relog, I can't get the vehicle to stream in.

Here's the current stock I'm using to load the vehicles with no luck:
pawn Код:
stock SpawnPlayerVehicles(playerid) {

    new
        vcModel,
        vColor[2],
        vPrice,
        vcOID,
        Float:vcPos[4],
        vID,
        LicPlate[16],
        vcPaintJob,
        vcOName[MAX_PLAYER_NAME];
       
    mysql_query("SELECT * FROM `playervehicles` WHERE `pvOwnerName` = '%d'", playerVariables[playerid][pInternalID]);
    mysql_store_result();
   
    if(mysql_num_rows() > 0) {
        while(mysql_fetch_row(szQueryOutput)) {
            sscanf(szQueryOutput, "p<|>iiis[64]ffffdddds[16]", vID, vcModel, vcOID, vcOName, vcPos[0], vcPos[1], vcPos[2], vcPos[3], vColor[0], vColor[1], vcPaintJob, vPrice, LicPlate);
           
            pvVariables[vID][pvModel] = vcModel;
            pvVariables[vID][pvColour1] = vColor[0];
            pvVariables[vID][pvColour2] = vColor[1];
            pvVariables[vID][pvOwnerID] = vcOID;
            pvVariables[vID][pvOwnerName] = vcOName;
            pvVariables[vID][pvPos][0] = vcPos[0];
            pvVariables[vID][pvPos][1] = vcPos[1];
            pvVariables[vID][pvPos][2] = vcPos[2];
            pvVariables[vID][pvPos][3] = vcPos[3];
            pvVariables[vID][pvPaintjob] = vcPaintJob;
            pvVariables[vID][pvStaticPrice] = vPrice;
            strmid(pvVariables[vID][pvLicPlate], LicPlate, 0, 32, 32);
           
            new
                vcCarID = CreateVehicle(pvVariables[vID][pvModel], pvVariables[vID][pvPos][0], pvVariables[vID][pvPos][1], pvVariables[vID][pvPos][2], pvVariables[vID][pvPos][3], pvVariables[vID][pvColour1], pvVariables[vID][pvColour2], 500000);
            format(pvVariables[vID][pvLicPlate], 16, "%s", pvVariables[vID][pvLicPlate]);
            SetVehicleNumberPlate(vcCarID, pvVariables[vID][pvLicPlate]);
           
            if(playerVariables[playerid][pCarKey1] == -1) {
                playerVariables[playerid][pCarKey1] = vcCarID;
            }
            else if(playerVariables[playerid][pCarKey2] == -1) {
                playerVariables[playerid][pCarKey2] = vcCarID;
            }
            else if(playerVariables[playerid][pCarKey3] == -1) {
                playerVariables[playerid][pCarKey3] = vcCarID;
            }

            systemVariables[vehicleCounts][0] ++;
            SaveOwnedCar(vcCarID);
        }
    }
    mysql_free_result();
    return 1;
}
Any ideas?
Reply


Messages In This Thread
Vehicle Loading [MySQL] - by Boooth - 14.09.2012, 01:21
Re: Vehicle Loading [MySQL] - by Boooth - 14.09.2012, 02:56
Re: Vehicle Loading [MySQL] - by doreto - 14.09.2012, 06:53
Re: Vehicle Loading [MySQL] - by mamorunl - 14.09.2012, 09:10
Re: Vehicle Loading [MySQL] - by Boooth - 14.09.2012, 11:53
Re: Vehicle Loading [MySQL] - by Boooth - 14.09.2012, 11:58
Re: Vehicle Loading [MySQL] - by SuperViper - 14.09.2012, 14:25
Re: Vehicle Loading [MySQL] - by mamorunl - 14.09.2012, 15:39
Re: Vehicle Loading [MySQL] - by Smally - 15.09.2012, 17:38
Re: Vehicle Loading [MySQL] - by Smally - 16.09.2012, 14:15

Forum Jump:


Users browsing this thread: 1 Guest(s)