Area Types?
#6

Quote:
Originally Posted by amirm3hdi
Посмотреть сообщение
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;
}
Sorry I think you're missing the point. I appreciate you trying to help but I'm trying to AVOID looping as much as possible. This will just end up with the same result of looping and checking things where as I can just pass key variables and use them with the areaid as shown above by Gammix. I was just rather blind when looking through what I could actually achieve with incognitos streamer.
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: 4 Guest(s)