Simple question
#1

I need to load the houses
pawn Код:
stock LoadHouses(name[],value[])
{
    new file[60],houseowner[24];
    for(new i = 0; i < MAX_HOUSES_BUILT;i++)
    {
        format(file,sizeof(file),"Houses/%i.ini",i);
        new INI:File = INI_Open(file);
        INI_Int("Price", HInfo[i][Price]);
        INI_Int("Owned", HInfo[i][Owned]);
        INI_Float("posX", HInfo[i][posX]);
        INI_Float("posY", HInfo[i][posY]);
        INI_Float("posZ", HInfo[i][posZ]);
        INI_Int("VirtualWorld", HInfo[i][VW]);
        INI_String("Owner", HInfo[i][Owner], 24);
        format(houseowner, sizeof(houseowner), "%s", HInfo[i][Owner]);
        HousesEntrance[i] = CreateDynamicCP(HInfo[i][posX], HInfo[i][posY], HInfo[i][posZ], 1.5, HInfo[i][VW]);
        HousesExit[i] = CreateDynamicCP(443.9237, 509.4609, 1001.4195, 1.5, HInfo[i][VW]);
        new labelstring[100];
        switch(HInfo[i][Owned])
        {
            case 0:{format(labelstring, sizeof(labelstring), ""#COL_GREEN#"Owned: "#COL_RED#"No \n"#COL_GREEN#"Price: "#COL_YELLOW#"%i", HInfo[i][Price]);}
            case 1:{format(labelstring, sizeof(labelstring), ""#COL_GREEN#"Owned: "#COL_BLUE#"Yes \n"#COL_GREEN#"Price: "#COL_YELLOW#"%i \n"#COL_GREEN#"Owner: "#COL_VIOLET#"%s", HInfo[i][Price], HInfo[i][Owner]);}
        }
        HInfo[i][HouseLabel] = Create3DTextLabel(labelstring, 0xFF0000FF, HInfo[i][posX], HInfo[i][posY], HInfo[i][posZ], 25.0, HInfo[i][VW]);
        Housesnumbers++;
        INI_Close(File);
    }
    return 1;
}
I need to make it load OnGameModeInIt
somone?
Reply


Messages In This Thread
Simple question - by _Khaled_ - 24.07.2013, 06:31
Re: Simple question - by Tayab - 24.07.2013, 06:41
Re: Simple question - by _Khaled_ - 24.07.2013, 06:44
Re: Simple question - by Vince - 24.07.2013, 07:36
Re: Simple question - by Scottas - 24.07.2013, 07:46
Re: Simple question - by _Khaled_ - 24.07.2013, 09:49
Re: Simple question - by RajatPawar - 24.07.2013, 11:51
Re: Simple question - by _Khaled_ - 24.07.2013, 16:43
Re: Simple question - by _Khaled_ - 24.07.2013, 23:13
Re: Simple question - by _Khaled_ - 25.07.2013, 09:09

Forum Jump:


Users browsing this thread: 1 Guest(s)