SA-MP Forums Archive
array help - 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: array help (/showthread.php?tid=629327)



array help - pelican1 - 24.02.2017

hi!

i'd like make an array like this

Код:
new g_RankInfo[11][E_RANKDATA] =
{
    {"Private",                 0,             0.0},
    {"Corporal",                50,            10.0},
    {"Sergeant",                100,        20.0},
    {"Master Sergeant",         150,        30.0},
    {"Lieutenant",              200,        40.0},
    {"Major",                   500,        50.0},
    {"Captain",                 1000,        60.0},
    {"Brigadier",               1500,        70.0},
    {"General",                 2500,        80.0},
    {"Filed Marshal",           5000,        90.0},
    {"Master of War",           10000,        100.0}
};
But on this line:

Quote:

new g_RankInfo[11][E_RANKDATA]

I dont know what to put on this line to be able to use it for example: g_RankInfo[1][2]

Can you help me, thanks


Re: array help - ISmokezU - 24.02.2017

This may help. ( https://sampforum.blast.hk/showthread.php?tid=318212 )


Re: array help - Unte99 - 24.02.2017

You need an enum.

https://sampforum.blast.hk/showthread.php?tid=318307