[HowTo?]Count your "produced" objects
#1

Hey @ all.

I just reached the limit of objects and it would be really nice for me, if i could count my objects somehow, without counting it myself, just with the script, so it will be displayed, when starting the server. Would be very nice if you could give me some advice. Thanks
Reply
#2

Try something like

pawn Код:
new objects = 0;
// replace all CreateObject with CreateObjectEx
stock CreateObjectEx(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ)
{
  CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
  objects++;
  return 1;
}

public OnGameModeInit()
{
  printf("Total objects: %d", objects);
  return 0;
}
Reply
#3

Oh thanks. Didn't get the clue
Reply
#4

it always says "Total objects: 2000". what did i wrong?

thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)