Vehicles not loading
#1

I cant get it to print out the Query or nothing, they don't load.

pawn Код:
stock VehicleLoad(vehicleID)
    {
    new
    Query[200], DBResult: Result;
    format(Query, sizeof(Query), "SELECT * FROM `VEHICLES` WHERE `ID` = %d LIMIT 1", vehicleID);
    Result = db_query(survival, Query);
    if(db_num_rows(Result))
        {
        new Field[30];
        db_get_field_assoc(Result, "MODEL", Field, 30);
        VehicleInfo[vehicleID][vModel] = strval(Field);
        db_get_field_assoc(Result, "COLOR1", Field, 30);
        VehicleInfo[vehicleID][vCol1] = strval(Field);
        db_get_field_assoc(Result, "COLOR2", Field, 30);
        VehicleInfo[vehicleID][vCol2] = strval(Field);
        db_get_field_assoc(Result, "ID", Field, 30);
        VehicleInfo[vehicleID][vID] = strval(Field);
        db_get_field_assoc(Result, "SPAWNX", Field, 30);
        VehicleInfo[vehicleID][vSpawnX] = floatstr(Field);
        db_get_field_assoc(Result, "SPAWNY", Field, 30);
        VehicleInfo[vehicleID][vSpawnY] = floatstr(Field);
        db_get_field_assoc(Result, "SPAWNZ", Field, 30);
        VehicleInfo[vehicleID][vSpawnZ] = floatstr(Field);
        db_get_field_assoc(Result, "SPAWNA", Field, 30);
        VehicleInfo[vehicleID][vSpawnA] = floatstr(Field);
        print(Query);
        }
    db_free_result(Result);
    CreateVehicle(VehicleInfo[vehicleID][vModel], VehicleInfo[vehicleID][vSpawnX], VehicleInfo[vehicleID][vSpawnY], VehicleInfo[vehicleID][vSpawnZ], VehicleInfo[vehicleID][vSpawnA], VehicleInfo[vehicleID][vCol1], VehicleInfo[vehicleID][vCol2], 999999);
    vCreated[vehicleID] = true;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)