28.07.2012, 17:16
I was working in VB.NET and I came up with an idea to make a plugin. Something like "ReDim'.
ReDim in VB.NET changes the size of an array on-the-fly.
So, what I suggest to someone is to create this function:
and the usage would be like this:
This is not the best example I can come up with but there would be situations where it would be really handy if a array could be resized.
(And this can save up amx size alot)
ReDim in VB.NET changes the size of an array on-the-fly.
So, what I suggest to someone is to create this function:
Code:
native ReNew(array[],MaxSize=1,bool:PreserveData=true);
Code:
new bool:Respawned[2] = {false,...};
new AOVOS = GetAmountOfVehiclesOnServer();
ReNew(Respawned,AOVOS ,false);
for(new i = 0; i < AOVOS; ++i)
{
SetVehicleToRespawn(i);
Respawned[i] = true;
}
(And this can save up amx size alot)

