Make array from texts and numbers
#1

Hi,

How to make array that i can use number and text


Код:
new Arrayp[][] = {
{8078},
{22},
{444}
};
Код:
new Arrayp[][] = {
{"PPH"},
{"Hghgh"},
{"Hottt"}
};
And do something like that:

Код:
new Arrayp[][] = {
{8078,"PPH","Hghgh"},
{22, "Hottt"},
{954646,"fgfgfg","hlgooty","hhghgrtrt"}
};
And i could get values
Код:
Arrayp[ 0 ][ 0 ] - 8078
Arrayp[ 0 ][ 1 ] - PPH
Arrayp[ 0 ][ 2 ] - Hghgh

Arrayp[ 2 ][ 0 ] - 954646
Arrayp[ 2 ][ 1 ] - fgfgfg
Arrayp[ 2 ][ 2 ] - hlgooty
Arrayp[ 2 ][ 3 ] - hhghgrtrt
Reply
#2

Here you go, just add an extra [].

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
example:
pawn Код:
new Array_3D_B [] [] [] =
{
    {float:102.14571,   "******",       4100},
    {float:452.45245,   "*******",      4012},
    {float:124.78951,   "Memebase",     4501}
};
Another one:
pawn Код:
new Array_3D_C [] [] [] =
{
    { {'A', 'C', 'E', '\0'}, 0xFF11FF25, float:4.154,  36},
    { {'B', 'A', 'M', '\0'}, 0xFFFFFFFF, float:6.154,  43},
    { {'Y', 'A', 'Y', '\0'}, 0x0,        float:74.154, 46}
};
Original thread
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)