SA-MP Forums Archive
Need help about Arrays - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help about Arrays (/showthread.php?tid=312886)



Need help about Arrays - basicllsw - 23.01.2012

I want to have arrays in arrays
ex: PlayerInfo[playerid][pSkill[1-20]]


How to Get this


ps. sorry for my bad english T_T


Re: Need help about Arrays - Lee_Percox - 23.01.2012

pawn Код:
enum myskill
{
    pSkill
};
new PlayerInfo[MAX_PLAYERS][myskill];
Then you can just do in your code the PlayerInfo[playerid][pSkill] stuff.


Re: Need help about Arrays - basicllsw - 24.01.2012

thank u Lee_Percox and ****** but i have little question about it

how to create PlayerInfo[playerid][pSkill[0]],PlayerInfo[playerid][pSkill[1]],PlayerInfo[playerid][pSkill[2]]

i cant create pSkill1 2 3 it's usefull

ps. sorry for my bad english


Re: Need help about Arrays - =WoR=Varth - 24.01.2012

https://sampwiki.blast.hk/wiki/Keywords:Initialisers#enum


Re: Need help about Arrays - MP2 - 24.01.2012

pawn Код:
enum enumname
{
    pSkill[3]
}

new arrayname[MAX_PLAYERS][enumname];

arrayname[playerid][pSkill][0]



Re: Need help about Arrays - basicllsw - 26.01.2012

thank so lot ^^"