MYSQL problem :(
#1

pawn Код:
case GROUPVEH_QUERY_LOAD: {
            while(i_gID < MAX_GROUP_VEHICLES) {
                while(iIndex < MAX_GROUP_VEHICLES) {
                    cache_get_field_content(iIndex, "ID", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gSQLID] = strval(szResult);

                    cache_get_field_content(iIndex, "GroupID", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gGroupID] = strval(szResult);

                    cache_get_field_content(iIndex, "Upkeep", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gUpkeep] = strval(szResult);

                    cache_get_field_content(iIndex, "ModelID", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gModelID] = strval(szResult);

                    cache_get_field_content(iIndex, "Colour1", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gColour1] = strval(szResult);

                    cache_get_field_content(iIndex, "Colour2", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gColour2] = strval(szResult);

                    cache_get_field_content(iIndex, "RankRequired", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gVehRankReq] = strval(szResult);

                    cache_get_field_content(iIndex, "SpawnX", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gVehSpawn][0] = floatstr(szResult);

                    cache_get_field_content(iIndex, "SpawnY", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gVehSpawn][1] = floatstr(szResult);

                    cache_get_field_content(iIndex, "SpawnZ", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gVehSpawn][2] = floatstr(szResult);

                    cache_get_field_content(iIndex, "SpawnA", szResult, iConnectionHandle);
                    GroupVehicles[i_gID][iIndex][gVehSpawn][3] = floatstr(szResult);

                    if(GroupVehicles[i_gID][iIndex][gModelID] != 0) {
                        GroupVehicles[i_gID][iIndex][gVehID] = CreateVehicle(GroupVehicles[i_gID][iIndex][gModelID], GroupVehicles[i_gID][iIndex][gVehSpawn][0], GroupVehicles[i_gID][iIndex][gVehSpawn][1], GroupVehicles[i_gID][iIndex][gVehSpawn][2], GroupVehicles[i_gID][iIndex][gVehSpawn][3], GroupVehicles[i_gID][iIndex][gColour1], GroupVehicles[i_gID][iIndex][gColour2], 3600);
                    }
                   
                    i_gID++;
                    iIndex++;
                }
            }
        }
Is my loading code, it load's all the vehicles - But for eg:
I have 2 car's in group id 0(id 0 in max_groups) - Then when I load the cars, it seperates them, it puts one of them in group id 0 and the other in group id 1, etc - So if I had 10 cars, the first would be group 0, second, group 1, third, group 2 etc

I have no idea why too :/
Reply
#2

Anyone
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)