Area Types?
#5

Check this out:

Код:
#define AREA_TYPE_BUSINESS 1;
#define AREA_TYPE_BLAHBLAH 2;

enum areas_info {
    Type,
    AreaID
}

new Areas[MAX_AREAS][areas_info];

AreasInt()
{
     Areas[0][Type] = AREA_TYPE_BUSINESS;
     Areas[0][AreaID] = CreateDynamicRectangle(...);

     Areas[1][Type] = AREA_TYPE_BUSINESS;
     Areas[1][AreaID] = CreateDynamicRectangle(...);

     Areas[2][Type] = AREAY_TYPE_BLAHBLAH;
     Areas[2][AreaID] = CreateDynamicRectangle(...);
}

IsBusinessArea(areaid)
{
    // If is business
    if (Areas[10][Type] == AREA_TYPE_BUSINESS)
        return true;

    // If not
    return false;
}
Reply


Messages In This Thread
Area Types? - by FarTooBaked - 05.02.2016, 13:05
Re: Area Types? - by Gammix - 05.02.2016, 13:23
Re: Area Types? - by FarTooBaked - 05.02.2016, 15:06
Re: Area Types? - by FarTooBaked - 05.02.2016, 15:27
Re: Area Types? - by amirm3hdi - 05.02.2016, 15:51
Re: Area Types? - by FarTooBaked - 05.02.2016, 17:21
Re: Area Types? - by Gammix - 05.02.2016, 22:24
Re: Area Types? - by AmigaBlizzard - 05.02.2016, 23:21

Forum Jump:


Users browsing this thread: 2 Guest(s)