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: Arrays (
/showthread.php?tid=306105)
Arrays -
SDraw - 25.12.2011
Hi,
I need to make an array like that:
PHP Code:
new Array[number][paths][] = {
{float,float,string[],string[]}
};
Is it real? I don't know how make it. And you?
Re: Arrays -
[HiC]TheKiller - 25.12.2011
The easiest way is probably to use an enum
pawn Code:
enum arrayenum
{
float1,
float2,
string1[50], //50 = size
string2[50] //50 = size
}
new Array[][arrayenum] =
{
{1.412, 13.321, "stringie", "stringie2"},
{4.442, 23.151, "lolstring", "lolstring2"}
};
That's just an example.
Re: Arrays -
SDraw - 25.12.2011
Thanks you
I really forgot about enum's