SA-MP Forums Archive
can't see icon house from far away - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: can't see icon house from far away (/showthread.php?tid=596374)



can't see icon house from far away - Barnwell - 16.12.2015

can't see house icon from far away

pawn Код:
stock OnPropTextdrawUpdate(update, id)
{
    LogCallback("OnPropTextdrawUpdate");
    new PropertyString[256];
    if(update == 1)
    {
        switch(id)
        {
            case 0 .. 798:
            {
                if(HouseInfo[id][hOwned] == 0)
                {
                    if(HouseInfo[id][hSetted] == 1)
                    {
                        DestroyDynamic3DTextLabel(HouseLabel[id]);
                        format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[id][hWorld], HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
                        HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FF00AA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  -1,  -1, -1, 30.0);
                    }
                }
                else if(HouseInfo[id][hOwned] == 1)
                {
                    new Rents[16];
                    if(HouseInfo[id][hRentabil] != 0)
                    {
                        format(Rents,sizeof(Rents),"$%d", HouseInfo[id][hRent]);
                    }
                    else
                    {
                        Rents = "Unrentable";
                    }
                    DestroyDynamic3DTextLabel(HouseLabel[id]);
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: %s \n Description: %s \n To Rent Type /rentroom", HouseInfo[id][hMessage],HouseInfo[id][hOwner],HouseInfo[id][hWorld], Rents, HouseInfo[id][hDiscription]);
                    HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FFFFAA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  -1,  -1, -1, 30.0);
                }
            }
            case 799 .. 816:
            {
                if(HouseInfo[id][hOwned] == 0)
                {
                    if(HouseInfo[id][hSetted] == 1)
                    {
                        DestroyDynamic3DTextLabel(HouseLabel[id]);
                        format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[id][hWorld], HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
                        HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FF00AA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  1,  18, -1, 30.0);
                    }
                }
                else if(HouseInfo[id][hOwned] == 1)
                {
                    new Rents[16];
                    if(HouseInfo[id][hRentabil] != 0)
                    {
                        format(Rents,sizeof(Rents),"$%d", HouseInfo[id][hRent]);
                    }
                    else
                    {
                        Rents = "Unrentable";
                    }
                    DestroyDynamic3DTextLabel(HouseLabel[id]);
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: %s \n Description: %s \n To Rent Type /rentroom", HouseInfo[id][hMessage],HouseInfo[id][hOwner],HouseInfo[id][hWorld], Rents, HouseInfo[id][hDiscription]);
                    HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FFFFAA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  1,  18, -1, 30.0);
                }
            }
            case 817 .. 834:
            {
                if(HouseInfo[id][hOwned] == 0)
                {
                    if(HouseInfo[id][hSetted] == 1)
                    {
                        DestroyDynamic3DTextLabel(HouseLabel[id]);
                        format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[id][hWorld], HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
                        HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FF00AA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  2,  18, -1, 30.0);
                    }
                }
                else if(HouseInfo[id][hOwned] == 1)
                {
                    new Rents[16];
                    if(HouseInfo[id][hRentabil] != 0)
                    {
                        format(Rents,sizeof(Rents),"$%d", HouseInfo[id][hRent]);
                    }
                    else
                    {
                        Rents = "Unrentable";
                    }
                    DestroyDynamic3DTextLabel(HouseLabel[id]);
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: %s \n Description: %s \n To Rent Type /rentroom", HouseInfo[id][hMessage],HouseInfo[id][hOwner],HouseInfo[id][hWorld], Rents, HouseInfo[id][hDiscription]);
                    HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FFFFAA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  2,  18, -1, 30.0);
                }
            }
            case 835 .. 852:
            {
                if(HouseInfo[id][hOwned] == 0)
                {
                    if(HouseInfo[id][hSetted] == 1)
                    {
                        DestroyDynamic3DTextLabel(HouseLabel[id]);
                        format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[id][hWorld], HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
                        HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FF00AA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  3,  18, -1, 30.0);
                    }
                }
                else if(HouseInfo[id][hOwned] == 1)
                {
                    new Rents[16];
                    if(HouseInfo[id][hRentabil] != 0)
                    {
                        format(Rents,sizeof(Rents),"$%d", HouseInfo[id][hRent]);
                    }
                    else
                    {
                        Rents = "Unrentable";
                    }
                    DestroyDynamic3DTextLabel(HouseLabel[id]);
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: %s \n Description: %s \n To Rent Type /rentroom", HouseInfo[id][hMessage],HouseInfo[id][hOwner],HouseInfo[id][hWorld], Rents, HouseInfo[id][hDiscription]);
                    HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FFFFAA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  3,  18, -1, 30.0);
                }
            }
            case 853 .. 870:
            {
                if(HouseInfo[id][hOwned] == 0)
                {
                    if(HouseInfo[id][hSetted] == 1)
                    {
                        DestroyDynamic3DTextLabel(HouseLabel[id]);
                        format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[id][hWorld], HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
                        HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FF00AA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  4,  18, -1, 30.0);
                    }
                }
                else if(HouseInfo[id][hOwned] == 1)
                {
                    new Rents[16];
                    if(HouseInfo[id][hRentabil] != 0)
                    {
                        format(Rents,sizeof(Rents),"$%d", HouseInfo[id][hRent]);
                    }
                    else
                    {
                        Rents = "Unrentable";
                    }
                    DestroyDynamic3DTextLabel(HouseLabel[id]);
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: %s \n Description: %s \n To Rent Type /rentroom", HouseInfo[id][hMessage],HouseInfo[id][hOwner],HouseInfo[id][hWorld], Rents, HouseInfo[id][hDiscription]);
                    HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FFFFAA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  4,  18, -1, 30.0);
                }
            }
            case 871 .. 888:
            {
                if(HouseInfo[id][hOwned] == 0)
                {
                    if(HouseInfo[id][hSetted] == 1)
                    {
                        DestroyDynamic3DTextLabel(HouseLabel[id]);
                        format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[id][hWorld], HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
                        HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FF00AA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  5,  18, -1, 30.0);
                    }
                }
                else if(HouseInfo[id][hOwned] == 1)
                {
                    new Rents[16];
                    if(HouseInfo[id][hRentabil] != 0)
                    {
                        format(Rents,sizeof(Rents),"$%d", HouseInfo[id][hRent]);
                    }
                    else
                    {
                        Rents = "Unrentable";
                    }
                    DestroyDynamic3DTextLabel(HouseLabel[id]);
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: %s \n Description: %s \n To Rent Type /rentroom", HouseInfo[id][hMessage],HouseInfo[id][hOwner],HouseInfo[id][hWorld], Rents, HouseInfo[id][hDiscription]);
                    HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FFFFAA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  5,  18, -1, 30.0);
                }
            }
            case 889 .. 906:
            {
                if(HouseInfo[id][hOwned] == 0)
                {
                    if(HouseInfo[id][hSetted] == 1)
                    {
                        DestroyDynamic3DTextLabel(HouseLabel[id]);
                        format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[id][hWorld], HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
                        HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FF00AA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  6,  18, -1, 30.0);
                    }
                }
                else if(HouseInfo[id][hOwned] == 1)
                {
                    new Rents[16];
                    if(HouseInfo[id][hRentabil] != 0)
                    {
                        format(Rents,sizeof(Rents),"$%d", HouseInfo[id][hRent]);
                    }
                    else
                    {
                        Rents = "Unrentable";
                    }
                    DestroyDynamic3DTextLabel(HouseLabel[id]);
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: %s \n Description: %s \n To Rent Type /rentroom", HouseInfo[id][hMessage],HouseInfo[id][hOwner],HouseInfo[id][hWorld], Rents, HouseInfo[id][hDiscription]);
                    HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FFFFAA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  6,  18, -1, 30.0);
                }
            }
            case 907 .. 924:
            {
                if(HouseInfo[id][hOwned] == 0)
                {
                    if(HouseInfo[id][hSetted] == 1)
                    {
                        DestroyDynamic3DTextLabel(HouseLabel[id]);
                        format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[id][hWorld], HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
                        HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FF00AA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  7,  18, -1, 30.0);
                    }
                }
                else if(HouseInfo[id][hOwned] == 1)
                {
                    new Rents[16];
                    if(HouseInfo[id][hRentabil] != 0)
                    {
                        format(Rents,sizeof(Rents),"$%d", HouseInfo[id][hRent]);
                    }
                    else
                    {
                        Rents = "Unrentable";
                    }
                    DestroyDynamic3DTextLabel(HouseLabel[id]);
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: %s \n Description: %s \n To Rent Type /rentroom", HouseInfo[id][hMessage],HouseInfo[id][hOwner],HouseInfo[id][hWorld], Rents, HouseInfo[id][hDiscription]);
                    HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FFFFAA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  7,  18, -1, 30.0);
                }
            }
            case 925 .. 942:
            {
                if(HouseInfo[id][hOwned] == 0)
                {
                    if(HouseInfo[id][hSetted] == 1)
                    {
                        DestroyDynamic3DTextLabel(HouseLabel[id]);
                        format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[id][hWorld], HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
                        HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FF00AA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  8,  18, -1, 30.0);
                    }
                }
                else if(HouseInfo[id][hOwned] == 1)
                {
                    new Rents[16];
                    if(HouseInfo[id][hRentabil] != 0)
                    {
                        format(Rents,sizeof(Rents),"$%d", HouseInfo[id][hRent]);
                    }
                    else
                    {
                        Rents = "Unrentable";
                    }
                    DestroyDynamic3DTextLabel(HouseLabel[id]);
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: %s \n Description: %s \n To Rent Type /rentroom", HouseInfo[id][hMessage],HouseInfo[id][hOwner],HouseInfo[id][hWorld], Rents, HouseInfo[id][hDiscription]);
                    HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FFFFAA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  8,  18, -1, 30.0);
                }
            }
            case 943 .. 1100:
            {
                if(HouseInfo[id][hOwned] == 0)
                {
                    if(HouseInfo[id][hSetted] == 1)
                    {
                        DestroyDynamic3DTextLabel(HouseLabel[id]);
                        format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[id][hWorld], HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
                        HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FF00AA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  -1,  -1, -1, 30.0);
                    }
                }
                else if(HouseInfo[id][hOwned] == 1)
                {
                    new Rents[16];
                    if(HouseInfo[id][hRentabil] != 0)
                    {
                        format(Rents,sizeof(Rents),"$%d", HouseInfo[id][hRent]);
                    }
                    else
                    {
                        Rents = "Unrentable";
                    }
                    DestroyDynamic3DTextLabel(HouseLabel[id]);
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: %s \n Description: %s \n To Rent Type /rentroom", HouseInfo[id][hMessage],HouseInfo[id][hOwner],HouseInfo[id][hWorld], Rents, HouseInfo[id][hDiscription]);
                    HouseLabel[id] = CreateDynamic3DTextLabel(PropertyString , 0x00FFFFAA, HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0,  -1,  -1, -1, 30.0);
                }
            }
        }
    }
    else if(update == 2)
    {
        if(BizzInfo[id][bOwned] == 0)
        {
            DestroyDynamic3DTextLabel(BizzLabel[id]);
            format(PropertyString,sizeof(PropertyString),"Bizz is Unowned! \n %s \n Bizz ID: %d \n Price: $%d \n Level Needed: %d \n To Buy This, Type /buybiz",BizzInfo[id][bMessage], BizzInfo[id][bVirWorld], BizzInfo[id][bBuyPrice], BizzInfo[id][bLevelNeeded]);
            BizzLabel[id] = CreateDynamic3DTextLabel(PropertyString, 0x00FF00AA, BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID,  0,  -1,  -1,  -1, 30.0);
        }
        else if(BizzInfo[id][bOwned] == 1)
        {
            DestroyDynamic3DTextLabel(BizzLabel[id]);
            format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n Bizz ID: %d \n Extortion: %s \n Entering Fee: $%d. \n To Enter This, /enter.",BizzInfo[id][bMessage],BizzInfo[id][bOwner], BizzInfo[id][bVirWorld], BizzInfo[id][bExtortion], BizzInfo[id][bEntranceCost]);
            BizzLabel[id] = CreateDynamic3DTextLabel(PropertyString, 0x00FFFFAA, BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID,  0,  -1,  -1,  -1, 30.0);
        }
    }
    LogCallback("OnPropTextdrawUpdate");
    return 1;
}
what the problem?


Re: can't see icon house from far away - UltraScripter - 16.12.2015

You probably use dynamic icons
Change the streamdistance