[Ajuda] Ongamemodeinit nгo carrega
#5

Quote:
Originally Posted by zSuYaNw
Посмотреть сообщение
Coloque no "main()"

pawn Код:
OnGameModeInit()

--

Colocar itens no main ou OnGameModeInit й a mesma coisa, porйm no main й mais otimizado e seguro.
Descobri o erro que era, mas nгo sei o porque do erro, se alguйm puder me ajudar, estб й a stock que da problema:

@EDIT й problema no loop " if(i == 1), ele carrega de boas, mas no " ELSE " que й pra se for maior que 1,nгo vai, nгo carrega os outros.
PHP код:
stock LoadCars()
{
    new 
FileName[60];
    new 
carstring[256];
    for(new 
0MAX_CARS; ++i)
    {
        
format(FileNamesizeof(FileName), "Cars/car_%d.ini"i);
        if(
DOF2_FileExists(FileName))
        {
            
CarInfo[i][CarModel] = DOF2_GetInt(FileName"CarModel");
            
CarInfo[i][CarPrice] = DOF2_GetInt(FileName"CarPrice");
            
CarInfo[i][CarX] = DOF2_GetFloat(FileName"CarX");
            
CarInfo[i][CarY] = DOF2_GetFloat(FileName"CarY");
            
CarInfo[i][CarZ] = DOF2_GetFloat(FileName"CarZ");
            
CarInfo[i][CarF] = DOF2_GetFloat(FileName"CarF");
            
CarInfo[i][CarSpawnX] = DOF2_GetFloat(FileName"CarSpawnX");
            
CarInfo[i][CarSpawnY] = DOF2_GetFloat(FileName"CarSpawnY");
            
CarInfo[i][CarSpawnZ] = DOF2_GetFloat(FileName"CarSpawnZ");
            
CarInfo[i][CarSpawnF] = DOF2_GetFloat(FileName"CarSpawnF");
            
CarInfo[i][CarColor] = DOF2_GetInt(FileName"CarColor");
            
CarInfo[i][CarColor] = DOF2_GetInt(FileName"CarColor2");
            if(
== 1)
            {
                
format(carstring,sizeof(carstring),"{7CFC00}Modelo: {FFFFFF}%s\n{7CFC00}Preзo: {32CD32}R$%d\n\n{7CFC00}ID: {FFFFFF}%d{FFAF00} .",vNome[CarInfo[i][CarModel]-400],CarInfo[i][CarPrice],i);
                
CarInfo[i][CarText] = Create3DTextLabel(carstring, -10.00.00.015.00);
                 
CarInfo[i][CarID] = AddStaticVehicleEx(CarInfo[i][CarModel],CarInfo[i][CarX],CarInfo[i][CarY],CarInfo[i][CarZ],CarInfo[i][CarF],CarInfo[i][CarColor],CarInfo[i][CarColor2],1);
                
Attach3DTextLabelToVehicle(CarInfo[i][CarText], CarInfo[i][CarID], 0.00.00.0);
    
//            SetVehicleVirtualWorld(i,255);
                
CarInfo[i][DealerShipCar] = 1;
            }
            else
            {
                
format(carstring,sizeof(carstring),"{7CFC00}Modelo: {FFFFFF}%s\n{7CFC00}Preзo: {32CD32}R$%d\n\n{7CFC00}ID: {FFFFFF}%d{FFAF00}",vNome[CarInfo[i][CarModel]-400],CarInfo[i][CarPrice],i);
                
CarInfo[i][CarText] = Create3DTextLabel(carstring, -10.00.00.015.00);
                 
CarInfo[i][CarID] = AddStaticVehicleEx(CarInfo[i][CarModel],CarInfo[i][CarX],CarInfo[i][CarY],CarInfo[i][CarZ],CarInfo[i][CarF],CarInfo[i][CarColor],CarInfo[i][CarColor2],1); // Blade ID 56
                
Attach3DTextLabelToVehicle(CarInfo[i][CarText], CarInfo[i][CarID], 0.00.00.0);
                
CarInfo[i][DealerShipCar] = 1;
            }
            
SpawnedCars++;
        }
    }
    return 
1;

Reply


Messages In This Thread
Ongamemodeinit nгo carrega - by LucasDias - 14.07.2015, 14:21
Re: Ongamemodeinit nгo carrega - by SkullFire - 14.07.2015, 14:36
Re: Ongamemodeinit nгo carrega - by LucasDias - 14.07.2015, 14:41
Re: Ongamemodeinit nгo carrega - by zSuYaNw - 14.07.2015, 14:50
Re: Ongamemodeinit nгo carrega - by LucasDias - 14.07.2015, 15:53

Forum Jump:


Users browsing this thread: 1 Guest(s)