07.08.2013, 00:12
pawn Код:
public LoadBusiness()
{
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
for(new i = 0; i < rows; i++)
{
// Loading all of the stuff from the database, all fine.
// Just incase I reload the whole business
DestroyDynamicCP(BusinessInfo[i][bCP]);
DestroyDynamic3DTextLabel(BusinessInfo[i][bText]);
// Problems here
new string[94];
if(strcmp(BusinessInfo[i][bOwner], "None", true, 0))
{
format(string, sizeof(string),
"Name: %s",
BusinessInfo[i][bName]);
}
else
{
format(string, sizeof(string),
"Name: %s\n\
Price: %d",
BusinessInfo[i][bName],
BusinessInfo[i][bPrice]);
}
BusinessInfo[i][bCP] = CreateDynamicCP(BusinessInfo[i][bEnterX], BusinessInfo[i][bEnterY], BusinessInfo[i][bEnterZ], 1);
BusinessInfo[i][bText] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, BusinessInfo[i][bEnterX], BusinessInfo[i][bEnterY], BusinessInfo[i][bEnterZ], 5.0);
}
// Problems end here
printf("Businesses Loaded: %d", rows), gBusiness = rows;
}
return 1;
}