Loop an enum
#10

Yes instead of that use this (provided from above test code posted)
PHP код:
#include <a_samp>
enum ENUMERATOR
{
    
value,
    
string[24]
}
new ARRAY[][
ENUMERATOR]={
{
1,"Ghost"},
{
2,"dariyon"},
{
3,"kalcor"}
}

main()
{
 
    for(new 
03;++i)
    {
        
printf("string %s \n", ARRAY[i][ENUMERATOR:1]);
        
printf("digit %d \n ",ARRAY[i][ENUMERATOR:0]);
    }

Prints

Код:
string Ghost
digit 1 
string dariyon
digit 2
string kalcor
digit 3
Hope that was clear to you @op
Also order is an important thing here.As the data type is to be known (array or plane).
Reply


Messages In This Thread
Loop an enum - by Dayrion - 02.06.2017, 20:45
Re: Loop an enum - by CheezIt - 03.06.2017, 03:34
Re: Loop an enum - by Dayrion - 03.06.2017, 12:00
Re: Loop an enum - by SyS - 03.06.2017, 12:35
Re: Loop an enum - by Dayrion - 03.06.2017, 14:07
Re: Loop an enum - by GhostHacker9 - 03.06.2017, 14:27
Re: Loop an enum - by Dayrion - 04.06.2017, 00:55
Re: Loop an enum - by CheezIt - 04.06.2017, 01:21
Re: Loop an enum - by SyS - 04.06.2017, 01:45
Re: Loop an enum - by SyS - 04.06.2017, 02:37

Forum Jump:


Users browsing this thread: 1 Guest(s)