13.08.2011, 10:38
Could someone help?
This is my house loading script
This is my house loading script
pawn Код:
stock LoadBusinesses()
{
new count = 0;
for(new i=0; i<MAX_BUSS; i++)
{
format(String,sizeof(String),"Business/%i.ini",i);
if(dini_Exists(String))
{
BusinessInfo[i][PU] = CreateDynamicPickup(1272, 1, dini_Float(String, "BusX"),dini_Float(String, "BusY"),dini_Float(String, "BusZ"),-1, -1, -1,50.0);
if(!strcmp(GetBusOwner(i), NO_OWNER, CASE_SENSETIVE))
{
format(Label, sizeof(Label), "Business Name: %s\nOwner: No Owner\nCost: $%i\nPayout: $%i",dini_Get(String, "Name"),dini_Int(String, "Cost"),dini_Int(String, "Payout"));
BusinessInfo[i][bLabel] = Create3DTextLabel(Label,White,dini_Float(String, "BusX"),dini_Float(String, "BusY"),dini_Float(String, "BusZ")+1,100.0,0,1);
}
if(strcmp(GetBusOwner(i), NO_OWNER, CASE_SENSETIVE))
{
format(Label, sizeof(Label), "Business Name: %s\nOwner: %s\nCost: $%i\nPayout: $%i",dini_Get(String, "Name"), dini_Get(String, "Owner"),dini_Int(String, "Cost"),dini_Int(String, "Payout"));
BusinessInfo[i][bLabel] = Create3DTextLabel(Label,White,dini_Float(String, "BusX"),dini_Float(String, "BusY"),dini_Float(String, "BusZ")+1,100.0,0,1);
}
count++;
}
}
return printf("Total Businesses Loaded: %i",count);
}