03.08.2013, 02:00
Hi i want to create a script with an array dynamic for optimise my script.
On my old script i use 1 loop on a loop for calculate the numbers players in team private connected
But example with 30 players, with a loop on a loop 30 x 30 (900), it's the reason why i want know if it's possible to create an array dynamic example.
ps: i tested pvar (array dynamic) with my loop at 900 it's fast
https://sampforum.blast.hk/showthread.php?tid=362842
On my old script i use 1 loop on a loop for calculate the numbers players in team private connected
But example with 30 players, with a loop on a loop 30 x 30 (900), it's the reason why i want know if it's possible to create an array dynamic example.
PHP код:
new MAXNUMBERTEAMID;
foreach(new i : Player)
{
if(gLogged[i])
{
if(MAXNUMBERTEAMID < PlayerInfo[i][pTeamId] && PlayerInfo[i][pTeamId] > 0) MAXNUMBERTEAMID = PlayerInfo[i][pTeamId];
}
}
new TestV[MAXNUMBERTEAMID+1];// but it's bad
https://sampforum.blast.hk/showthread.php?tid=362842