SA-MP Forums Archive
house help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: house help (/showthread.php?tid=114669)



house help - radi - 20.12.2009

hello i got maked random prices for my biz and house system
but it work for allhouses so all houses get same price
how can i make it for every house diferent

pawn Код:
public SellBusiness(businessid)
{
  strmid(BusinessInfo[businessid][bOwner], "For Sale", false, strlen("For Sale"), 16);
    BusinessInfo[businessid][bOwned] = 0;
    BusinessInfo[businessid][bLocked] = 0;
    BusinessInfo[businessid][bEnterPrice] = 0;
    BusinessInfo[businessid][bMoney] = 0;
    BusinessInfo[businessid][bNotUsed] = 0;
   
    RandomBizMoney = MinBizMoney+random(MaxBizMoney-MinBizMoney);
    BusinessInfo[businessid][bPrice] = RandomBizMoney;
    return 1;
}



Re: house help - radi - 20.12.2009

bump
if i use
pawn Код:
for(new i = 0; i <MAX_HOUSES; i++)
will it work ?


Re: house help - Marcel - 21.12.2009

pawn Код:
for(new i = 0; i <MAX_HOUSES; i++)
{
    RandomBizMoney = MinBizMoney+random(MaxBizMoney-MinBizMoney);
    BusinessInfo[i][bPrice] = RandomBizMoney;
}



Re: house help - radi - 23.12.2009

Bump dont work