It's a problem? Big array
#1

It's a problem?

I'll create my object system, but I'll need infos about each object. Create a array with 15000 size, for each object, or i wanna create a array and using the index 1, 2, 3.

N°1: Bad, but practice
pawn Код:
enum e_v
{
        o_SlotWear
};
new Obj[15000 /* X */][e_v];

// I can:
CreateObject(/* obj X */, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 0.0);
N°2: Good, small array, but not practice.
pawn Код:
enum e_v
{
        o_objID,
        o_SlotWear
};
new Obj[500][e_v];

// I can:
CreateObject(Obj[X][o_objID], 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 0.0);
It's a problem to create a array size 15000, 20000...
Thanks you,
Nlx
Reply
#2

use the small array one the second one
creating big arrays caz big LAG
Reply
#3

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
Since when?
I have 64k+ cell arrays for SIF entities which contain lots of enumerated properties.

But still, go with the second option though. If you're making something that extends/uses SA:MP objects then give that it's own set of IDs rather than using the existing ones from whatever entity you're extending/using.
Well it surely increases mem usage of players
and player with low end pc [ like me] have lags in areas with many objects
Reply
#4

Ok, anyways i'll use the second solution.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)