SA-MP Forums Archive
InfoBoxForPlayer Staying There? - 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: InfoBoxForPlayer Staying There? (/showthread.php?tid=318591)



InfoBoxForPlayer Staying There? - Smithy - 15.02.2012

I have a problem. Everytime I enter a InfoBoxForPlayer location it stays there, changes when I reach another but never disappears when I leave the location.

pawn Код:
foreach (Player, i)
    {
        if(gPlayerLogged[i] == 1)
        {
            GetPlayerPos(i, oldposx, oldposy, oldposz);
            if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0)
            {
                for(new h = 0; h < sizeof(SBizzInfo); h++)
                {
                    if(PlayerToPoint(2.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
                    {
                        if(SBizzInfo[h][sbOwned] == 1)
                        {
                            format(string, sizeof(string), "~b~SHOP:~w~%s~b~~n~OWNER:~w~%s~n~~b~VALUE:~w~ $%d",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbEntranceCost]);

                        }
                        else
                        {
                            format(string, sizeof(string), "~w~%s~w~~n~This business is for sale~n~Cost: ~g~$%d ~w~Level : %d ~n~~b~/buybiz ~w~to buy this Business",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);

                        }
                        InfoBoxForPlayer(i, string);
                        SendDebugMessage("CustomPickups, SBizInfo");

                    }

                }
That's part of the code, do I have to stop InfoBoxForPlayer from working?


Re: InfoBoxForPlayer Staying There? - Smithy - 15.02.2012

Fixed.