Array Dynamic
#1

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.

PHP код:
new MAXNUMBERTEAMID;
    foreach(new 
Player)
    {
        if(
gLogged[i])
        {
            if(
MAXNUMBERTEAMID PlayerInfo[i][pTeamId] && PlayerInfo[i][pTeamId] > 0MAXNUMBERTEAMID PlayerInfo[i][pTeamId];
        }
    }
    new 
TestV[MAXNUMBERTEAMID+1];// but it's bad 
ps: i tested pvar (array dynamic) with my loop at 900 it's fast
https://sampforum.blast.hk/showthread.php?tid=362842
Reply


Messages In This Thread
Array Dynamic - by Kyra - 03.08.2013, 02:00
Re: Array Dynamic - by Alternative112 - 03.08.2013, 02:46
Re: Array Dynamic - by Bakr - 03.08.2013, 05:39
Re: Array Dynamic - by Sinner - 03.08.2013, 09:14
Re: Array Dynamic - by Edix - 03.08.2013, 12:09

Forum Jump:


Users browsing this thread: 2 Guest(s)