30.06.2014, 07:45
i buy the business in-game and everything is ok it shows whos the owner etc.
but while i leave and join again the textlabels are removed it just shows the checkpoint!
this is the stock to load the business labels
but while i leave and join again the textlabels are removed it just shows the checkpoint!
this is the stock to load the business labels
pawn Код:
stock loadbizzes()
{
new count5 = 0;
for(new i=0; i<MAX_BUSS; i++)
{
format(String,sizeof(String),"biznese/%i.ini",i);
if(dini_Exists(String))
{
BusinessInfo[i][C_P] = CreateDynamicCP(dini_Float(String, "BusX"),dini_Float(String, "BusY"),dini_Float(String, "BusZ"),1.0,dini_Int(String, "World"),dini_Int(String, "Interior"),-1,100.0);
if(!strcmp(BusOwner(i), NOTOWNED, 56SENSETIVE))
{
format(Label, sizeof(Label), "{999999}%s [Cost]: $%i",dini_Get(String, "Name"),dini_Int(String, "Cost"));
BusinessInfo[i][bizLabel] = Create3DTextLabel(bLabel,White,dini_Float(String, "BusX"),dini_Float(String, "BusY"),dini_Float(String, "BusZ"),20.0,0,1);
}
if(strcmp(BusOwner(i), NOTOWNED, 56SENSETIVE))
{
format(Label, sizeof(Label), "{999999}%s [Cost]: $%i",dini_Get(String, "Name"), dini_Get(String, "Owner"),dini_Int(String, "Cost"),i);
BusinessInfo[i][bizLabel] = Create3DTextLabel(bLabel,White,dini_Float(String, "BusX"),dini_Float(String, "BusY"),dini_Float(String, "BusZ"),20.0,0,1);
}
count5++;
}
}
return printf("Your server has loaded %i businesses",count5);
}