Very good plugin suggestion (for scripters) and easy to make for the Plugin Developers! - 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: Plugin Development (
https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: Very good plugin suggestion (for scripters) and easy to make for the Plugin Developers! (
/showthread.php?tid=363762)
Very good plugin suggestion (for scripters) and easy to make for the Plugin Developers! -
Xentiarox - 28.07.2012
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:
Code:
native ReNew(array[],MaxSize=1,bool:PreserveData=true);
and the usage would be like this:
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;
}
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)