House/Bizz 3d text don't show :/
#1

Hello, i try to make 3dtext on house/bizz but it don't work does someone know?

pawn Код:
//OnGameModeInit

for(new i=0; i<MAX_PLAYERS; i++)
{
// House shit:
    /*for(new h = 0; h <MAX_HOUSES; h++)
    {*/

    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
        if(IsPlayerInRangeOfPoint(i, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
        {
            if(HouseInfo[h][hOwned] == 1)
            {
                    format(house_string, sizeof(house_string), "~w~This House is owned by: ~R~%s", HouseInfo[h][hOwner]);
                HouseLabel = Create3DTextLabel(house_string ,0x00FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],10, 0);
                //GameTextForPlayer(i, house_string, 2000, 3);
                return 1;
            }
            else
            {
                format(house_string, sizeof(house_string), "~w~House for sale~n~Cost: ~g~$%d,-~n~~b~Age: %d", HouseInfo[h][hValue], HouseInfo[h][hLevel]);
                HouseLabel = Create3DTextLabel(house_string ,0x00FFFFFF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],10, 0);
                //GameTextForPlayer(i, house_string, 2000, 3);
                return 1;
            }
        }
    }
    /*for(new b = 0; b <MAX_BUSINESSES; b++)
    {*/

    for(new b = 0; b < sizeof(BusinessInfo); b++)
    {
        if(IsPlayerInRangeOfPoint(i, 2, BusinessInfo[b][bEntrancex], BusinessInfo[b][bEntrancey], BusinessInfo[b][bEntrancez]))
        {
            if(BusinessInfo[b][bOwned] == 1)
            {
                format(house_string, sizeof(house_string), "%s~n~~w~Owned by: ~r~%s~n~Enter price: ~g~$%d,-", BusinessInfo[b][bDescription], BusinessInfo[b][bOwner], BusinessInfo[b][bEnterPrice]);
                BizzLabel = Create3DTextLabel(house_string ,0x00FF00FF,BusinessInfo[b][bEntrancex], BusinessInfo[b][bEntrancey], BusinessInfo[b][bEntrancez],10, 0);
                //GameTextForPlayer(i, house_string, 2000, 3);
                return 1;
            }
            else
            {
                format(house_string, sizeof(house_string), "%s~n~~w~Biz for sale~n~Cost: ~g~$%d,-~n~~b~Age: %d", BusinessInfo[b][bDescription], BusinessInfo[b][bPrice], BusinessInfo[b][bLevel]);
                BizzLabel = Create3DTextLabel(house_string ,0x00FF00FF,BusinessInfo[b][bEntrancex], BusinessInfo[b][bEntrancey], BusinessInfo[b][bEntrancez],10, 0);
                //GameTextForPlayer(i, house_string, 2000, 3);
                return 1;
            }
        }
    }
}


//OnHouseReload

for(new h = 0; h < sizeof(HouseInfo); h++)
{
    HouseLabel = Create3DTextLabel(house_string ,0x00FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],10, 0);
}


//OnBusinessReload

for(new b = 0; b < sizeof(BusinessInfo); b++)
{
  BizzLabel = Create3DTextLabel(house_string ,0x00FF00FF,BusinessInfo[b][bEntrancex], BusinessInfo[b][bEntrancey], BusinessInfo[b][bEntrancez],10, 0);
}


//OnHouseUpdate

Delete3DTextLabel(HouseLabel);


//OnBusinessUpdate

Delete3DTextLabel(BizzLabel);


//UpdatePlayerInfo

public UpdatePlayerInfo()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        // House shit:
        for(new h = 0; h <MAX_HOUSES; h++)
        {
            if(IsPlayerInRangeOfPoint(i, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
            {
                if(HouseInfo[h][hOwned] == 1)
                {
                    format(house_string, sizeof(house_string), "~w~This House is owned by: ~R~%s", HouseInfo[h][hOwner]);
                    //HouseLabel = Create3DTextLabel(house_string ,0x00FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],10, 0);
                    GameTextForPlayer(i, house_string, 2000, 3);
                    return 1;
                }
                else
                {
                    format(house_string, sizeof(house_string), "~w~House for sale~n~Cost: ~g~$%d,-~n~~b~Age: %d", HouseInfo[h][hValue], HouseInfo[h][hLevel]);
                    //HouseLabel = Create3DTextLabel(house_string ,0x00FFFFFF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],10, 0);
                    GameTextForPlayer(i, house_string, 2000, 3);
                    return 1;
                }
            }
        }
        for(new b = 0; b <MAX_BUSINESSES; b++)
        {
            if(IsPlayerInRangeOfPoint(i, 2, BusinessInfo[b][bEntrancex], BusinessInfo[b][bEntrancey], BusinessInfo[b][bEntrancez]))
            {
                if(BusinessInfo[b][bOwned] == 1)
                {
                    format(house_string, sizeof(house_string), "%s~n~~w~Owned by: ~r~%s~n~Enter price: ~g~$%d,-", BusinessInfo[b][bDescription], BusinessInfo[b][bOwner], BusinessInfo[b][bEnterPrice]);
                    //BizzLabel = Create3DTextLabel(house_string ,0x00FF00FF,BusinessInfo[b][bEntrancex], BusinessInfo[b][bEntrancey], BusinessInfo[b][bEntrancez],10, 0);
                    GameTextForPlayer(i, house_string, 2000, 3);
                    return 1;
                }
                else
                {
                    format(house_string, sizeof(house_string), "%s~n~~w~Biz for sale~n~Cost: ~g~$%d,-~n~~b~Age: %d", BusinessInfo[b][bDescription], BusinessInfo[b][bPrice], BusinessInfo[b][bLevel]);
                    //BizzLabel = Create3DTextLabel(house_string ,0x00FF00FF,BusinessInfo[b][bEntrancex], BusinessInfo[b][bEntrancey], BusinessInfo[b][bEntrancez],10, 0);
                    GameTextForPlayer(i, house_string, 2000, 3);
                    return 1;
                }
            }
        }
    }
    return 1;
}
Reply
#2

do you get any errors when compiling?

the wiki says
Код:
Create3DTextLabel(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS)
yours
Код:
Create3DTextLabel(house_string ,0x00FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],10, 0);
looks likes its missing a parameter
Reply
#3

That's right he is, if he would look a little closer he would see it
Reply
#4

Don't work ?, i see the text not :/
Reply
#5

Quote:
Originally Posted by cessil
do you get any errors when compiling?

the wiki says
Код:
Create3DTextLabel(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS)
yours
Код:
Create3DTextLabel(house_string ,0x00FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],10, 0);
looks likes its missing a parameter
No. The testLOS is not necessary to add as a parameter, afaik.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)