array help
#1

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
Reply
#2

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

You need an enum.

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


Forum Jump:


Users browsing this thread: 1 Guest(s)