17.03.2013, 15:53
Ok so I changed something in my script and when I walk up to the point it makes my fps drop by 20 frames, Heres the code.
Could someone if they can tell me why the fps drops a bunch.
pawn Код:
for(new h = 0; h < sizeof(Businesses); h++)
{
if(GetPlayerVirtualWorld(i) == 0)
{
if(strcmp(Businesses[h][bOwner], "Nobody", true) == 0)
{
if(Businesses[h][bPrice] == -1)
{
format(string, sizeof(string), "Business %d (%s) Unavailable.", h, Businesses[h][bName]);
CreateDynamic3DTextLabel(string, YELLOW, Businesses[h][bExteriorX], Businesses[h][bExteriorY], Businesses[h][bExteriorZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 5.0);
}
else
{
format(string, sizeof(string), "Business %d (%s) Available to buy for %d (/buybusiness).", h, Businesses[h][bName], Businesses[h][bPrice]);
CreateDynamic3DTextLabel(string, YELLOW, Businesses[h][bExteriorX], Businesses[h][bExteriorY], Businesses[h][bExteriorZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 5.0);
}
}
else
{
format(string, sizeof(string), "Business %d (%s) Owner: %s. Press ~k~~PED_DUCK~ to enter", h, Businesses[h][bName], Businesses[h][bOwner]);
CreateDynamic3DTextLabel(string, YELLOW, Businesses[h][bExteriorX], Businesses[h][bExteriorY], Businesses[h][bExteriorZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 5.0);
}
}