Capture zones >>JimmyCh's Tutorial<<
#3

Quote:
Originally Posted by pds2k12
Посмотреть сообщение
Explanation inside.

pawn Код:
//creating a definition of 'MAX_CAPZONE, easier to loop it when it's needed'
#define MAX_CAPZONE \
    ( 30 )

#define CAPZONE
#define CAPZONE1
#define CAPZONE2
// and so on, until 29 + 1 = 30

//creating an array with a size of 30 and it should be 1 Dimensional array
new
    tCP[ MAX_CAPZONE ]
;

//I do not suggest using Else if etc.. I suggest you using 'switch statement + loop', for example

new
    i = 0; // creating an i variable

while(i < MAX_CAPZONE) // creating a loop, there's 2 way to create a loop, try searching the for(...)
{
    switch( tCP[i]
    {
        case CAPZONE: // and so on
    }
}

// or


while(i < MAX_CAPZONE) // creating a loop, there's 2 way to create a loop, try searching the for(...)
{
    switch( tCP[i]
    {
        case 0: // and so on
    }
}
Eh, alright, i will try to process that, lol.
If not, i will bump this topic tomorrow or so :d
Reply


Messages In This Thread
Capture zones >>JimmyCh's Tutorial<< - by Kyance - 01.01.2014, 18:09
Re: Capture zones >>JimmyCh's Tutorial<< - by Patrick - 01.01.2014, 18:28
Re: Capture zones >>JimmyCh's Tutorial<< - by Kyance - 01.01.2014, 18:30
Re: Capture zones >>JimmyCh's Tutorial<< - by Kyance - 01.01.2014, 18:37
Re: Capture zones >>JimmyCh's Tutorial<< - by Kyance - 02.01.2014, 08:14

Forum Jump:


Users browsing this thread: 1 Guest(s)