24.05.2016, 12:38 
	
	
	Код:
C:\Users\user\Desktop\SAMP\San Andreas Life Roleplay - Copy\gamemodes\SAL-RP_script.PWN(27642) : warning 213: tag mismatch C:\Users\user\Desktop\SAMP\San Andreas Life Roleplay - Copy\gamemodes\SAL-RP_script.PWN(27644) : warning 213: tag mismatch
PHP код:
LoadcDealerships()
{
    new string2[64];
    format(string2, sizeof(string2), "cardealerships.ini");
    new File: DealerFile = fopen(string2, io_read);
    if ( DealerFile )
    {
        new key[ 256 ] , val[ 256 ];
        new Data[ 256 ];
        while ( fread( DealerFile , Data , sizeof( Data ) ) )
        {
            new string[128];
            for(new f = 0; f < MAX_FAMILY; f++)
            {
                key = ini_GetKey( Data );
                format(string, 128, "cd%dOwned",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdOwned] = strval( val ); }
                format(string, 128, "cd%dOwner",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); strmid(CarDealershipInfo[f][cdOwner], val, 0, strlen(val)-1, 255); }
                format(string, 128, "cd%dEntranceX",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdEntranceX] = floatstr( val ); }
                format(string, 128, "cd%dEntranceY",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdEntranceY] = floatstr( val ); }
                format(string, 128, "cd%dEntranceZ",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdEntranceZ] = floatstr( val ); }
                format(string, 128, "cd%dExitX",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdExitX] = floatstr( val ); }
                format(string, 128, "cd%dExitY",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdExitY] = floatstr( val ); }
                format(string, 128, "cd%dExitZ",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdExitZ] = floatstr( val ); }
                format(string, 128, "cd%dMessage",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); strmid(CarDealershipInfo[f][cdMessage], val, 0, strlen(val)-1, 255); }
                format(string, 128, "cd%dTill",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdTill] = strval( val ); }
                format(string, 128, "cd%dInterior",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdInterior] = strval( val ); }
                format(string, 128, "cd%dVehicleSpawn0",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleSpawn][0] = floatstr( val ); }
                format(string, 128, "cd%dVehicleSpawn1",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleSpawn][1] = floatstr( val ); }
                format(string, 128, "cd%dVehicleSpawn2",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleSpawn][2] = floatstr( val ); }
                format(string, 128, "cd%dVehicleSpawn3",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleSpawn][3] = floatstr( val ); }
                format(string, 128, "cd%dRadius",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdRadius] = floatstr( val ); }
                format(string, 128, "cd%dPrice",f);
                if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdPrice] = strval( val ); }
                for(new fv = 0; fv < MAX_DEALERSHIPVEHICLES; fv++)
                {
                    format(string, 128, "cd%dVeh%dModelId",f, fv);
                    if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleModel][fv] = strval( val ); }
                    format(string, 128, "cd%dVeh%dCost",f, fv);
                    if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleCost][fv] = strval( val ); }
                    format(string, 128, "cd%dVeh%dSpawnX",f, fv);
                    if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleSpawnX][fv] = floatstr( val ); }
                    format(string, 128, "cd%dVeh%dSpawnY",f, fv);
                    if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleSpawnY][fv] = floatstr( val ); }
                    format(string, 128, "cd%dVeh%dSpawnZ",f, fv);
                    if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleSpawnZ][fv] = floatstr( val ); }
                    format(string, 128, "cd%dVeh%dSpawnA",f, fv);
                    if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleSpawnAngle][fv] = floatstr( val ); }
                    format(string, 128, "cd%dVeh%dColor1",f, fv);
                    if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleColor1][fv] = floatstr( val ); } // Error Code
                    format(string, 128, "cd%dVeh%dColor2",f, fv);
                    if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); CarDealershipInfo[f][cdVehicleColor2][fv] = floatstr( val ); } // Error Code
                }
            }
        }
        fclose(DealerFile);
    }
    return 1;
} 



