SA-MP Forums Archive
[HowTo?]Count your "produced" objects - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HowTo?]Count your "produced" objects (/showthread.php?tid=108353)



[HowTo?]Count your "produced" objects - DeathOnaStick - 13.11.2009

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


Re: [HowTo?]Count your "produced" objects - dice7 - 13.11.2009

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;
}



Re: [HowTo?]Count your "produced" objects - DeathOnaStick - 13.11.2009

Oh thanks. Didn't get the clue


Re: [HowTo?]Count your "produced" objects - chris23 - 02.12.2009

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

thanks.