15.02.2012, 19:14
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.
That's part of the code, do I have to stop InfoBoxForPlayer from working?
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");
}
}