Streamer; Dynamic3DTextLabel
#5

I've currently removed that loop and fixed the problems with the labels.
The problem from the label doesn't exist anymore. But, a new one is from the pickups.
Anyways, here is the stock:
pawn Код:
stock LoadHouses()
{
    for(new i = 1; i < MAX_HOUSES; i++)
    {
        format(Kweri, 128, "SELECT * FROM `"Houses_Table"` WHERE HouseID = '%i'", i);
        mysql_query(Kweri);
        mysql_store_result();
        if(mysql_num_rows() == 0) break;
        else if(mysql_num_rows() == 1)
        {
            mysql_fetch_row_format(Kweri);
            sscanf(Kweri, "e<p<|>iiis[25]iiiiffffff>", HouseInfo[i]);
            mysql_free_result();
            new lString[256];
            switch(HouseInfo[i][hOwned])
            {
                case 0:
                {
                    format(lString, sizeof(lString), "House ID: "WHITE"%i\n"BLUE"House Owned: "WHITE"No\n"BLUE"House Owner: "WHITE"None\n"BLUE"House Price: "WHITE"$%i\n", HouseInfo[i][HouseID], HouseInfo[i][hPrice]);
                    HouseInfo[i][HouseIcon] = CreateDynamicMapIcon(HouseInfo[i][OutX], HouseInfo[i][OutY], HouseInfo[i][OutZ], 31, COLOR_GREEN, -1, -1, -1, 30.0);
                    HouseInfo[i][HouseEnterPickup] = CreateDynamicPickup(1273, 23, HouseInfo[i][OutX], HouseInfo[i][OutY], HouseInfo[i][OutZ], -1, -1, -1, 30.0);
                    HouseInfo[i][Label] = CreateDynamic3DTextLabel(lString,COLOR_BLUE, HouseInfo[i][OutX], HouseInfo[i][OutY], HouseInfo[i][OutZ]+0.5, 30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 50.0);
                }
                case 1:
                {
                    format(lString,sizeof(lString), "House ID: "GREEN"%i\n"RED"House Owned: "GREEN"Yes\n"RED"House Owner: "GREEN"%s\n"RED"House Price: "GREEN"$%i\n"RED"House Locked: "GREEN"%s", HouseInfo[i][HouseID], HouseInfo[i][hOwner], HouseInfo[i][hPrice], (HouseInfo[i][hLocked] == 1) ? ("Yes") : ("No"));
                    HouseInfo[i][HouseEnterPickup] = CreateDynamicPickup(1273, 23, HouseInfo[i][OutX], HouseInfo[i][OutY], HouseInfo[i][OutZ], -1, -1, -1, 30.0);
                    HouseInfo[i][HouseIcon] = CreateDynamicMapIcon(HouseInfo[i][OutX], HouseInfo[i][OutY], HouseInfo[i][OutZ], 32, COLOR_RED, -1, -1, -1, 30.0);
                    HouseInfo[i][Label] = CreateDynamic3DTextLabel(lString, COLOR_RED, HouseInfo[i][OutX], HouseInfo[i][OutY], HouseInfo[i][OutZ]+0.5, 30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 50.0);
                    HouseInfo[i][HouseExitPickup] = CreateDynamicPickup(1273,23,HouseInfo[i][IntX], HouseInfo[i][IntY], HouseInfo[i][IntZ], HouseInfo[i][hWorld], -1, -1, 30.0);
                }
            }
            HousesCreated++;
        }
    }
    printf(".::. Loaded %i houses .::.",HousesCreated);
    return 1;
}
The pickups are correctly created. Nothing happens when I pick those pickups, it's remaining non-respondent.
Reply


Messages In This Thread
Streamer; Dynamic3DTextLabel - by biker122 - 01.10.2014, 13:11
Re: Streamer; Dynamic3DTextLabel - by Sascha - 01.10.2014, 14:42
Re: Streamer; Dynamic3DTextLabel - by biker122 - 02.10.2014, 06:22
Re: Streamer; Dynamic3DTextLabel - by Cell_ - 02.10.2014, 06:32
Re: Streamer; Dynamic3DTextLabel - by biker122 - 02.10.2014, 07:47
Re: Streamer; Dynamic3DTextLabel - by Cell_ - 02.10.2014, 07:54
Re: Streamer; Dynamic3DTextLabel - by biker122 - 02.10.2014, 07:59
Re: Streamer; Dynamic3DTextLabel - by Cell_ - 02.10.2014, 08:02
Re: Streamer; Dynamic3DTextLabel - by biker122 - 02.10.2014, 08:05
Re: Streamer; Dynamic3DTextLabel - by Cell_ - 02.10.2014, 08:11

Forum Jump:


Users browsing this thread: 1 Guest(s)