28.07.2012, 04:30
I was working a CreateObject counting system,
suddenly it always shows the total of create object is 397
even i remove one or more than 2 createobject it still shows as 397.
code
suddenly it always shows the total of create object is 397
even i remove one or more than 2 createobject it still shows as 397.
code
pawn Код:
new objects = 0;
#if defined _CreateObject
#undef CreateObject
#endif
#define CreateObject x_CreateObject
x_CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0)
{
objects++;
CreateObject(modelid, X, Y, Z, rX, rY, rZ, DrawDistance);
}
main()
{
printf("Total of Server Objects created: %d", objects);
}