Quote:
Originally Posted by .Owyn.
i need an array to store a individual string for every player, so i can campare it with other strings and use it like string_array[id] = string1; or a simular way, i looked thru my codes and.. do i have to use ArrayGetString() and like that just for this purpose?
|
To create an array of strings just make a 2 dimensional array. The first dimension is the number of strings you want to hold and the second dimension must be sized large enough for the largest possible string you wish to hold.
Suppose you want to put the following in an array:
Hello
this
is
an
array
new szArray[5][6];
Dimension 1 = 5 for 5 words
Dimension 2 = 6 because longest words are hello\array, each 5 chars in length + 1 for null so 6.
To store data in them, pass it as you would with a normal string except include the array element you wish to use.
new szAuthID[33][33];
get_user_authid( id , szAuthID[id] , 32 );
__________________