GetArrayIndex
#1

any way to do it in pawn?
Reply
#2

What is your array?
It depends what do you need exactly, like if it's a vehicle model id array and you wanted to locate Infernus (Model ID: 411) index in the array, this is our array and this is how we're doing it:
PHP код:
new aModels[] = {400521532452411529521};
for(new 
0sizeof aModelsi++)
{
    if(
aModels[i] == 411)
    {
        
// Now variable "i" is our index
        
printf("The index is: %i"i); // (It's 4, according to our aModels array)
        
break;
    }

Reply
#3

Quote:
Originally Posted by Aliassassin123456
Посмотреть сообщение
What is your array?
It depends what do you need exactly, like if it's a vehicle model id array and you wanted to locate Infernus (Model ID: 411) index in the array, this is our array and this is how we're doing it:
PHP код:
new aModels[] = {400521532452411529521};
for(new 
0sizeof aModelsi++)
{
    if(
aModels[i] == 411)
    {
        
// Now variable "i" is our index
        
printf("The index is: %i"i); // (It's 4, according to our aModels array)
        
break;
    }

thanks but I was asking for something like this

http://zone.ni.com/reference/en-XX/h...tarrayindex_m/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)